Hello,
I have a question on how to get Server side system specific information via PHP, or just general direction on how to parse some of the information found in /proc

For example, I want to be able to display the system uptime.. number of users logged in, and load average.

In the shell, I just do uptime, and it gives me all that information

[EMAIL PROTECTED] proc]$ uptime
00:47:42  up 15 days,  7:07,  7 users,  load average: 0.44, 0.41, 0.39

Now i can always do a split on , and then based on that parse out the info, or I could cat /proc/uptime and /proc/loadavg

For the number of users I can do w -h | wc -l

I can call all these commands via the system() function, but my question is, is there a better way of obtaining such info ?

http://us2.php.net/manual/en/ref.info.php doesn't seem to offer much, except for the php_uname() function.

I just want to be able to display system information like uptime, on some of my web pages. Any help is appreciated.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to