Page 1 of 1

Show server information

Posted: Wed Jul 27, 2011 2:48 pm
by unplugme71
I need to be able to show the following information

Distro Name:
Uptime:
Last Boot:
Current Users:


Distro Name - I'm able to show Debian Linux/GNU 6.0 - but I just want it to show Debian 6.0 or whatever OS I'm currently using.
For "Last Boot", i'm using this print(exec("who -b")); however, I only want it to show the date and time, and not 'system boot' or anything else.
I can't figure out how to show how many users are logged into the server like 'top' shows.

Re: Show server information

Posted: Thu Jul 28, 2011 9:07 am
by Celauran
The uptime command will show how long the machine has been up, as well as the number of current users.