6ff6953fd8
Submitted by: Masahiro TAKEMURA <mastake@msel.t.u-tokyo.ac.jp>
29 lines
924 B
Text
29 lines
924 B
Text
--- src/support/log_server_status.orig Tue Jan 16 02:06:38 2001
|
|
+++ src/support/log_server_status Mon Oct 22 20:44:59 2001
|
|
@@ -70,7 +70,7 @@
|
|
#
|
|
require 'sys/socket.ph';
|
|
|
|
-$wherelog = "/var/log/graph/"; # Logs will be like "/var/log/graph/19960312"
|
|
+$wherelog = "/var/log/httpd-status-";
|
|
$server = "localhost"; # Name of server, could be "www.foo.com"
|
|
$port = "80"; # Port on server
|
|
$request = "/status/?auto"; # Request to send
|
|
@@ -96,14 +96,14 @@
|
|
### Main
|
|
|
|
{
|
|
- $year=`date +%y`;
|
|
+ $year=`LC_TIME=C date +%y`;
|
|
chomp($year);
|
|
$year += ($year < 70) ? 2000 : 1900;
|
|
- $date = $year . `date +%m%d:%H%M%S`;
|
|
+ $date = $year . `LC_TIME=C date +%m%d:%H%M%S`;
|
|
chomp($date);
|
|
($day,$time)=split(/:/,$date);
|
|
$res=&tcp_connect($server,$port);
|
|
- open(OUT,">>$wherelog$day");
|
|
+ open(OUT,">>$wherelog$day.log");
|
|
if ($res) {
|
|
print OUT "$time:-1:-1:-1:-1:$res\n";
|
|
exit 1;
|