At 07.08.2001 03:51, Craig Westerman wrote:
> >I'm wanting to chart the server load average data displayed when you run
>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
>
>
>I'm running FreeBSD. I'll see if if I can find source as you suggest.

for FreeBSD it might be a bit harder, as it doesn't have a /proc/loadav (by 
default),
you might find a /kern/loadav(g) (if you've got kernfs).

If you wanna speed up the process (to get a truer number), you'll have to 
implement
your own little solution. Using uptime or w would involve some extra 
cpucycles, but
not too much.

The solution in C would be pretty simple, I guess it shouldn't be too hard 
to hack it
into your own little php function either (which would make a neat php 
function, why
didn't I think of that earlier?).

The man pages for uptime and getloadavg should give you all the info needed...

btw. don't cc you posts to me, I'm still subscribed to the list, and I 
haven't got any
plans of altering that yet...


-- 
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]

Reply via email to