I wanted to get a quick sense of what one of my Apache web servers was up to, so I through together the following:
- I ssh'ed to the server
- Enabled mod_status, so the URL http://servername.com/server-status would work. I did this by adding in the following to my httpd.conf file:
<Location /server-status> SetHandler server-status Order Deny,Allow Deny from all Allow from localhost </Location>
- Restarted the web server to have the above take effect
- Kicked off the command:
lynx -dump http://localhost/server-status | head -30
The result is a screen that refreshes every 2 seconds and tells me which processes in Apache are busy, and with what. Here's a sample screenshot:
Gosh I love Unix.
Probably you meant :
ReplyDeletewatch 'lynx -dump http://znih.com/znih-server-status-monitor|head -n 30'