At 07.08.2001 03:19, Craig Westerman wrote:
> >>Does anyone here have a script to run uptime every ten minutes or so, log
> >>output, then display daily output in a nice friendly chart?
>
> >Seems a bit daft running it every ten minutes, as a server should be up
>24/7,
> >how do you plan to check it otherwise?
>
>
>I'm wanting to chart the server load average data displayed when you run
>uptime not how many days it has been running.
>
>%uptime
> 6:10PM up 321 days, 6:59, 3 user, load averages: 0.20, 0.16, 0.15
>%uptime
> 6:19PM up 321 days, 7:08, 3 user, load averages: 0.15, 0.16, 0.16
>%uptime
>10:15PM up 321 days, 11:04, 3 user, load averages: 0.19, 0.24, 0.22
The correct way to do that would be to read it straight from the source,
(eg. /proc/loadav for linux with procfs).
That would be much quicker, and it would also save your server a fork
for each reading (unless you are running php as a cgi ;-)
nice uptime btw...
--
Andreas D Landmark / noXtension
Real Time, adj.:
Here and now, as opposed to fake time, which only occurs there
and then.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]