How VPS - How to use/setup VPS
  • 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
10
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
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

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

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

Deploy Kubernetes With Kubeadm on CentOS 7

How to Install Zikula on CentOS 7

How to Install Tiny Tiny RSS on CentOS 7

Leave a Reply Cancel reply

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

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

MTR – A Network Diagnostic Tool for Linux

4 years ago

How to Deploy Ghost v0.11 LTS on Fedora 25

3 years ago

Install WordPress on OpenBSD 6.2

3 years ago

5 Ways to Empty or Delete a Large File Content in Linux

4 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • 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

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

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

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

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
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • 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”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • 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

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

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