1998-04-21 21:58:18 +00:00
|
|
|
*** src/support/log_server_status.orig Tue Mar 31 16:53:50 1998
|
|
|
|
--- src/support/log_server_status Tue Apr 21 17:18:10 1998
|
1997-10-22 23:51:35 +00:00
|
|
|
***************
|
1998-04-21 21:58:18 +00:00
|
|
|
*** 67,76 ****
|
1997-10-22 23:51:35 +00:00
|
|
|
#
|
|
|
|
require 'sys/socket.ph';
|
|
|
|
|
|
|
|
! $wherelog = "/var/log/graph/"; # Logs will be like "/var/log/graph/960312"
|
|
|
|
$server = "localhost"; # Name of server, could be "www.foo.com"
|
|
|
|
$port = "80"; # Port on server
|
1997-11-21 21:10:28 +00:00
|
|
|
! $request = "/status/?auto"; # Request to send
|
|
|
|
|
|
|
|
sub tcp_connect
|
|
|
|
{
|
1998-04-21 21:58:18 +00:00
|
|
|
--- 67,76 ----
|
1997-10-22 23:51:35 +00:00
|
|
|
#
|
|
|
|
require 'sys/socket.ph';
|
|
|
|
|
|
|
|
! $wherelog = "/var/log/httpd-status-"; # Logs will be like "/var/log/graph/960312"
|
|
|
|
$server = "localhost"; # Name of server, could be "www.foo.com"
|
|
|
|
$port = "80"; # Port on server
|
1997-11-21 21:10:28 +00:00
|
|
|
! $request = "/server-status/?auto"; # Request to send
|
|
|
|
|
|
|
|
sub tcp_connect
|
|
|
|
{
|
1997-10-22 23:51:35 +00:00
|
|
|
***************
|
1998-04-21 21:58:18 +00:00
|
|
|
*** 93,103 ****
|
1997-10-22 23:51:35 +00:00
|
|
|
### Main
|
|
|
|
|
|
|
|
{
|
|
|
|
! $date=`date +%y%m%d:%H%M%S`;
|
|
|
|
chop($date);
|
|
|
|
($day,$time)=split(/:/,$date);
|
|
|
|
$res=&tcp_connect($server,$port);
|
|
|
|
! open(OUT,">>$wherelog$day");
|
|
|
|
if ($res) {
|
|
|
|
print OUT "$time:-1:-1:-1:-1:$res\n";
|
|
|
|
exit 1;
|
1998-04-21 21:58:18 +00:00
|
|
|
--- 93,103 ----
|
1997-10-22 23:51:35 +00:00
|
|
|
### Main
|
|
|
|
|
|
|
|
{
|
|
|
|
! $date=`LC_TIME=C date +%y%m%d:%H%M%S`;
|
|
|
|
chop($date);
|
|
|
|
($day,$time)=split(/:/,$date);
|
|
|
|
$res=&tcp_connect($server,$port);
|
|
|
|
! open(OUT,">>$wherelog$day.log");
|
|
|
|
if ($res) {
|
|
|
|
print OUT "$time:-1:-1:-1:-1:$res\n";
|
|
|
|
exit 1;
|