I have a dynamic IP address, I used everydns.net as a DNS server. I have
a bash script that runs with cron that checks the current IP of the
machine with the DNS record so that if my IP changes; it can run the
update program.
I would like to do some thorough availability reports, so I started by
Watty wrote:
I have a dynamic IP address, I used everydns.net as a DNS server. I have
a bash script that runs with cron that checks the current IP of the
machine with the DNS record so that if my IP changes; it can run the
update program.
I would like to do some thorough availability reports, so
Watty wrote:
I would like to do some thorough availability reports, so I started by
writing the result of the bash script to a log file. I want to parse the
log file to give me availability reports. The log file is in the form:
08/14/04 09:10:01 [TAB] S - when the IP
into the log when the computer shuts down.
Watty
-Original Message-
From: John Holmes [mailto:[EMAIL PROTECTED]
Sent: 15 August 2004 01:52
To: Watty
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Log parsing
Watty wrote:
I would like to do some thorough availability reports, so I started
John Holmes wrote:
Watty wrote:
We know because the IP check run every 5 minutes by
cron, and if it has no run within 5:01 minutes then
the computer is off, or the script isn't working.
But we should assume that the computer is off is there
is not a record for that 5 minute slot.
PROTECTED]
Subject: Re: [PHP] Log parsing
Watty wrote:
I would like to do some thorough availability reports, so I started
by
writing the result of the bash script to a log file. I want to parse
the
log file to give me availability reports. The log file is in the
form:
08/14/04 09:10:01
I'll try that in another way; feel free to give me your hacks for it:
?php
$file = file_get_contents( ./ip );
$line = explode( \n, $file );
## Number of log entries
$total = 0;
$unavail = 0;
$unavaillog = FALSE;
## Establish the standard difference between log entries of 5 minutes
$diff =
7 matches
Mail list logo