You are here: System specific information gathering « PHP « IT news, forums, messages
System specific information gathering

Posted by Vidyut Luther on 07/22/05 08:57

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

[vluther@terrence 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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация