blob: f473a3127fa0e00bb6ea01e7b5019eea7427c868 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
--- src/support/log_server_status.orig Fri Jun 4 10:54:19 1999
+++ src/support/log_server_status Sat Nov 13 19:42:02 1999
@@ -67,10 +67,10 @@
#
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
+$request = "/server-status/?auto"; # Request to send
sub tcp_connect
{
@@ -93,14 +93,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;
|