Apachetop is a realtime monitoring tool, which fetches the apache log information from the log file and display it as human readable mode. So that we can easily understand the apache realtime statistics.
After installing the apache web server in your linux box install apachetop.
For Debian based distros use : apt-get update
For rpm based distros use : yum update
How to install ans use apachetop ?
For Debian based distros use : apt-get install apachetop
For rpm based distros use : yum install apachetop
For various options check out the man page : man apachetop
apachetop -f /var/log/apache2/access.log
It will displays a result as shown below
You can see the individual number of return codes a given item has generated by pressing ‘n’. This alternates the numbers columns between hits/bytes and return codes for each item.
You may sort this list by any of the first four columns; first press ‘s’ to enter the ‘sort submenu’, and then one of the following
r Sort by REQUESTS
R Sort by REQUESTS/SECOND
b Sort by BYTES
B Sort by BYTES/SECOND
If you are viewing return code breakdown, then you’ll see the following:
Thus you can see where all your Page Not Founds are coming from and so on. Each sort order is individually maintained, so you can sort by 3xx, and Bytes, for example, then freely switch between number modes (using ‘n’) without losing either setting.
Additionally, you can press d during runtime to switch the list of displayed items between URLs, IPs, and REFERRERs. URLs is the default, and simply groups together hits on your site and provides collated stats for each one. IPs, similarly, groups hits from each IP and shows you stats for it. So you can see how much bandwidth is being used by any given IP. REFERRERs is handy if you want to see where your traffic is coming from. The stats here reflect how many pages/kbytes have been served as a result of a particular referrer.
To hold the current screen at any time, press p – statistics will still be generated in the background, but whatever is displayed at the current time is kept onscreen until you press p again.
The asterisk beside the URL/IP/Referrer entry in the table can be used to restrict the display to any entry you’re interested in. Use Up/Down arrow keys to move the asterisk to an entry you’re interested in (you can use ‘p’ to freeze the display to give you more time to do so) and then press Right arrow to enter the display specific for that item.
If the item you expanded is a URL, then IPs and Referrers specific to that URL will be shown; ie, IPs (or hosts) which are visiting that URL, and Referrers which are referring people to that URL.
If the item is an IP/Host, then URLs that IP/Host is visiting will be displayed, along with the referrers that IP is coming from. If the item is a Referrer, then URLs and IPs will be shown which have that Referrer.
You may turn off any of these subcolumns; press ‘t’ to enter the toggle submenu, then
u Toggles URL subdisplay
r Toggles REFERRER subdisplay
h Toggles HOSTS subdisplay
Thus you can only display HOSTS that are visiting a given URL, etc. Use Left arrow to return to the previous display.
If you found any other simple realtime monitoring tool, please let me know through comments