Install ApacheTop on Ubuntu 22.04

Install ApacheTop on Ubuntu 22.04

ApacheTop is a command line tool for monitoring traffic of the Apache HTTP server. ApacheTop parses the access log file of Apache and shows website traffic statistics that updated after certain amount of time.

This tutorial explains how to install ApacheTop on Ubuntu 22.04.

Prepare environment

Make sure you have installed Apache HTTP server.

Install ApacheTop

Update the package lists:

sudo apt update

Install ApacheTop using the following command:

sudo apt install -y apachetop

Check ApacheTop version:

apachetop -v

Testing ApacheTop

Open a web browser and enter IP address of the system. Then run apachetop from the command line:

apachetop

After refreshing the page a few times, ApacheTop shows information such as requests per second, how many times pages have been visited, and other.

Traffic statistics using ApacheTop on Ubuntu

By default, ApacheTop display stats in the last 30 seconds. The -T option can be used to specify the number of seconds for how long ApacheTop will remember visited pages. For example, the following command shows stats in the last 300 seconds:

apachetop -T 300

Uninstall ApacheTop

To completely remove ApacheTop and related dependencies, execute the following command:

sudo apt purge --autoremove -y apachetop

Leave a Comment

Cancel reply

Your email address will not be published.