Monday, 30 April 2012

Checking apache log files using ApacheTop

 ApacheTop watches a log-file generated by Apache (in standard common or combined logformat, and generates human-parsable output in realtime like the output of top command from shell. Several other options are also available as a syntax to get furnished results (ie..like results based of hits, query-strings, segments and protocols etc)

 # cd /usr/src
 # wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz
 # cd apachetop-0.12.6
 # ./configure
 # make && make install

# wget http://packages.sw.be/apachetop/<select the latest version and arch>
# rpm -ivh apachetop-0.12.6-2.el6.rf.x86_64.rpm

 Apachetop is very much useful to monitor the stats if you have a combined access logs (iee..a common access_log for all your virtualhost). If you have separate access logs configured for your vhosts then you need to use the -f option to view the stats, For example.

# apachetop -f /var/log/httpd/gnutoolbox_com.access.log

No comments:

Post a Comment