Apachetop is a command line utility useful for monitoring a web server’s connections and other statistics in real time. Similar to top, apachetop reads the acces_log file in /var/log/httpd and displays the results in real time.
How to Install Apachetop
We will install Apachetop on our CentOS system using the third-party EPEL repositories. If you are not already using EPEL, enable the repository by running the correct command for your CentOS version and 32/64-bit architecture:
CentOS 5 / 32-bit
rpm -Uvh http://mirror.chpc.utah.edu/pub/epel/5/i386/epel-release-5-4.noarch.rpm
CentOS 5 / 64-bit
rpm -Uvh http://mirror.chpc.utah.edu/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
CentOS 6 / 32-bit
rpm -Uvh http://mirror.chpc.utah.edu/pub/epel/6/i386/epel-release-6-7.noarch.rpm
CentOS 6 / 64-bit
rpm -Uvh http://mirror.chpc.utah.edu/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm
CentOS 7 / 64-bit
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
Now that you have EPEL enabled, you can install apachetop automatically via yum.
yum install -y apachetop
Hopefully, the installation succeeds without any errors. Now you can run apachetop simply by running the command apachetop at the command line. Enjoy!
This article applies to…
- CentOS 7 and earlier and corresponding RHEL releases