This "server-status" Apache module based tool is very basic and visually dull, but it is simple to set up and probably has very low overhead. Will Shott's sysinfo page is a nicer looking all round system tool - if you colourise it - that uses only linux commands to work, so is a good beginner's exercise in script and html programming and to learn some of the system tools.
Unfortunately it is only a system snapshot, so requires the shell script to run periodically to update the webpage. I set a cronjob every hour just for the exercise. The original Post was 2 years ago, with some additions yesterday.
Info for server-status is found at:
Enabling Status Support
To enable status reports only for browsers from the example.com domain add this code to your httpd.conf configuration file
Require host example.com
You can now access server statistics by using a Web browser to access the page http://your.server.name/server-status
You can get the status page to update itself automatically if you have a browser that supports "refresh". Access the page http://your.server.name/server-status?refresh=N to refresh the page every N seconds.
Checking the current server status shows unset:
You can find the files contained in the above text via:
grep -R "SetHandler server-status" /etc/apache2/*
/etc/apache2/mods-available/status.conf: SetHandler server-status
/etc/apache2/mods-enabled/status.conf: SetHandler server-status
Open the first listed above:
sudo vi /etc/apache2/mods-available/status.conf
Change and uncomment below to something to suit your network e.g. from:
#Require ip 192.0.2.0/24
in my network's subnet case, to:
Require ip 192.168.1.0/24
sudo service apache2 restart
* Restarting web server apache2 [ OK ]
Refresh your server page with F5:
This is only a static page though, so needs to be refreshed every say, 1 second by appending “?refresh=1” to the menu bar. Now you should see changes e.g:
Server uptime: 4 minutes 31 seconds
Server uptime: 4 minutes 32 seconds
At the page bottom you can see:
To obtain a full report with current status information you need to use the ExtendedStatus On directive.
The ExtendedStatus module shows extra CPU, PID info. It is set on by editing the same files found via:
grep -iR "extendedstatus" /etc/apache2/*
# Keep track of extended status information for each request
restart Apache and F5 the browser again. The PID key list is now replaced by a list of users connected to allocated SRV sessions: