Hello, friends. In this post, you will learn how to install ApacheTop on Ubuntu 22.04. It’s pretty simple to do, so let’s go.
According to the GitHub profile of the tool:
ApacheTop watches a logfile generated by Apache (in standard common or
Combined logformat, and generates human-parsable output in realtime.
Actually, it is a tool with which you can examine the behavior of Apache on your server. Some of its functions allow you to get basic statistics about how the server is working.
It is actually effortless to use and allows some interesting options that are always good to have at hand.
Install ApacheTop on Ubuntu 22.04
As a logical first step before installing ApacheTop, is to install Apache web server on the system. This guide assumes that you have it installed, running and configured to your needs.
However, to install Apache web server on Ubuntu 22.04 just run
sudo apt install apache2
This will, of course, install Apache, but you will still need to get it set up. This depends on your needs, but for this post, it will suffice.
Next, you can install ApacheTop since it is present in the official repositories of the distribution and so the installation will be much easier.
So, to install it then you have to run
sudo apt install apachetop
Then, you can check the version that has been installed with the command line
Using ApacheTop on Ubuntu 22.04
Once the tool is installed correctly, we can use it without any problem.
The easiest way to do it is to run:
You will get an output screen like this
The output screen is sorted by requests, and you will be able to consult a simple but effective statistic to know how the server is behaving.
By default, ApacheTop only displays statistics for the last 30 seconds. You can change this behavior using the
apachetop -T 500
The above command will show statistics for the last 500 seconds.
In this post, you learned how to install ApacheTop on Ubuntu 22.04 These simple tools are what can alert a sysadmin about abnormal behavior in Apache.