• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Saturday, June 21, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

Use Apachetop To Monitor Web Server Traffic In Real Time

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
14
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Installing apachetop
  2. Running apachetop
  3. The apachetop Interface
  4. Want to contribute?


In this tutorial, we will be covering the process of instilling and using apachetop, a command line-based piece of software that allows real-time traffic monitoring for Apache, Nginx web servers. It it also expected to work with other web servers such as Litespeed and Lighttpd.

Using apachetop allows a server administrator to view visitors, their IP Addresses, accessed URLs, referrers etc… — all in real time.

Installing apachetop

The apachetop package is available under the EPEL Yum Repository:

sudo yum -y install epel-release
sudo yum clean all
sudo yum -y update
sudo yum -y install apachetop

Running apachetop

sudo apachetop

The above command will launch apachetop and will will try to find the access log of an Apache server in its location: /var/log/httpd/access_log.

If you customized your vhost to use a custom log path, you will need to specify the custom path using the -f parameter as follows:

sudo apachetop -f /var/log/nginx/wordpress_http_access.log

By default, apachetop will display the statistics for the visits from the last 30 seconds. You can modify that using the -H and -T parameters as follows:

sudo apachetop -f /var/log/nginx/wordpress_http_access.log -H 1000

The command above will display stats on the last 1000 hits.

sudo apachetop -f /var/log/nginx/wordpress_http_access.log -T 600

The command above will display stats on the last 600 seconds.

The apachetop Interface

On the top of the screen, you will find a short summary for visits, stats etc…

last hit: 13:59:43         atop runtime:  0 days, 00:42:31             14:02:14
All:           19 reqs (   0.0/sec)        111.3K (  151.8B/sec)    6001.0B/req
2xx:      12 (63.2%) 3xx:       7 (36.8%) 4xx:     0 ( 0.0%) 5xx:     0 ( 0.0%)
R ( 30s):       0 reqs (   0.0/sec)          0.0B (    0.0B/sec)       0.0B/req
2xx:       0 ( 0.0%) 3xx:       0 ( 0.0%) 4xx:     0 ( 0.0%) 5xx:     0 ( 0.0%)

The first line consists of:

  • last hit: the time of the last hit
  • atop runtime: apachtop running time, and
  • the current time of the server.

The second and the third lines provide statistics on all visits since the apachetop program gets started. 2xx, 3xx, 4xx, and 5xx represent corresponding web server response codes.

The fourth and the fifth lines provide the same statistics as the two lines above, except that they focus on visits in a specified scope which is 30 seconds by default.

Below the summary is a list of all visits and requests:

REQS REQ/S    KB KB/S URL
    1  0.10   9.8  1.0/
    1  0.14  13.6  1.9*/2016/01/25/hello-world/
    2  0.18  18.2  1.7 /category/uncategorized/
    1  0.07   9.9  0.7 /2016/01/

The asterisk represents a Selected Line.

Additional, apachetop contains built-in shortcuts:

  • Up/Down arrow keys: switch to another request.
  • Right arrow key: see the details of the request you have chosen, including the visitor’s IP address and the referrer, etc.
  • Left arrow key: return to the list.
  • p: pause the display.
  • q: quit the program.
  • h: display help info.

This concludes our tutorial. Thank you for reading.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How To Setup Two-Factor Authentication (2FA) for SSH on CentOS 6 using Google Authenticator

Next Post

Deploy Kubernetes With Kubeadm on CentOS 7

Next Post

Deploy Kubernetes With Kubeadm on CentOS 7

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In