Apachetop is a curses-based top-like display for Apache information, including requests per second, bytes per second, most popular URLs, etc.

Apachetop watches a logfile generated by Apache (in standard common or combined logformat, although it doesn’t (yet) make use of any of the extra fields in combined) and generates human-parsable output in realtime.

Installing on Ubuntu

sudo apt-get install apachetop

Installing from Source on CentOS

wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz

yum install readline-devel
yum install ncurses-devel
tar xvzf apachetop-0.12.6.tar.gz

cd apachetop-0.12.6
./configure
make
make install

The binary can be found in src/apachetop, and you can copy it anywhere you’d like.

Installing from Source on Ubuntu

wget http://www.webta.org/apachetop/apachetop-0.12.6.tar.gz

sudo apt-get install ncurses-dev
sudo apt-get install libreadline5-dev
tar xvzf apachetop-0.12.6.tar.gz

cd apachetop-0.12.6
./configure
make
make install

Using Apachetop

Once you’ve installed the utility (instructions below), you can launch it by simply running apachetop from the command line. Since apachetop sometimes defaults to the wrong directory for the logfiles, you can pass in the -f parameter to specify the location of the logfile. This is also helpful when you have many virtual hosts on the same box.

apachetop -f /var/www/vhosts/howtogeek.com/statistics/logs/access_log