Monitoring Apache with mod_status

I was put into a situation at office where i had to check if apache was crashing or not, hits on vhosts, and etc, so i enabled mod_status and went ahead with it. Here is an excerpt from an article that helped me getting started:

When you have an Apache server serving multiple virtual hosts it becomes difficult to keep track of what it’s serving at each moment – because in most cases each virtual host will log to a different place, you cannot read all the logfiles simultaneously.

There are tools which will process a single apache logfile, and show you what is happening with a particular virtual host for example apachetop – but this will not allow you to view two or three virtual hosts at the same time.

If you’re interested in this kind of information you’ve got a couple of choices:
Log all virtualhosts to the same access.log file
Use mod_status to allow a real-time viewing of all the server’s activity.

Using mod_status you get to see:

  • The number of children serving requests
  • The number of idle children
  • The status of each child, the number of requests that child has performed and the total number of bytes served by child
  • A total number of accesses and byte count served
  • The time the server was started/restarted and the time it has been running for
  • Averages giving the number of requests per second, the number of bytes served per second and the average number of bytes per request
  • The current percentage CPU used by each child and in total by Apache
  • The current hosts and requests being processed

Read More/Original

Tags: , , , , , ,

Leave a Comment