Install ApacheTop on Raspberry Pi

Install ApacheTop on Raspberry Pi

ApacheTop is a command line tool that allows to monitor traffic for Apache HTTP server. This tool watches access log file generated by Apache and displays website traffic statistics that updated after certain amount of time.

This tutorial demonstrates how to install ApacheTop on Raspberry Pi.

Prepare environment

Before starting, Apache HTTP server needs to be installed on the system.

Install ApacheTop

Use SSH to connect to Raspberry Pi. Update the package lists and install ApacheTop with commands:

sudo apt update
sudo apt install -y apachetop

After the installation is completed, we can check ApacheTop version:

apachetop -v

Testing ApacheTop

Check IP address of the Raspberry Pi:

hostname -I

Open a web browser and enter Raspberry Pi's IP address. Then run apachetop from the command line:

apachetop

Refresh a page few times. ApacheTop will display requests per second, how many times pages have been visited, and other information.

Traffic statistics using ApacheTop on Raspberry Pi

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

apachetop -T 300

Uninstall ApacheTop

If you want to completely remove ApacheTop and related dependencies, run the following command:

sudo apt purge --autoremove -y apachetop

Leave a Comment

Cancel reply

Your email address will not be published.