For Apache, I want to monitor

  1. Busy workers
  2. Idle workers
  3. Queued requests

Monitoring would be done throughout the day, taking a sample every min., in a graphical manner.

If such a tool is not available for free, then any script which can dump this data in a tabular format and I can import that data in CSV format would be sufficient.

Is there any tool for doing that ?

  • How married are you to the idea of a pre-existing tool? And how precisely do you define "in a graphical manner"? "Must be GUI", or "must plot graphs"? – womble Aug 25 '11 at 5:02
  • Hi womble, Any script, which can generate this data in a tabular format will do, If I can dump that data in an csv file that would be excellent. – Kan Aug 25 '11 at 5:13

For the busy and idle workers, you can parse it from the status page, something like this:

busy_workers=`lynx -dump http://domain.com/server-status?auto | awk '/BusyWorkers/ { print $2 }'`
idle_workers=`lynx -dump http://domain.com/server-status?auto | awk '/IdleWorkers/ { print $2 }'`

For the waiting requests, you can calculate the numbers of concurrent connections and subtract to MaxClients directive:

concurrent_connections=`netstat -natp | grep httpd | grep ESTABLISHED | grep -v grep | wc -l`

From this result, you can plot a graph with any monitoring tools you want: gmetric (Ganglia), PNP4Nagios, ...


We use cacti with the Apache stats script, basically it parses the Server-Status page and generates the rrd Graph for cacti.

Cacti frontend is in php and stores data in MySQL. Also requires snmp (installation).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.