Install Apachetop tool to monitor Apache operation in real time

Source: Internet
Author: User

We often need to know the server's real-time monitoring of the health of the server, such as which URLs are the largest number of visits, the server per second requests, which search engine is crawling our site? Faced with these problems, although we can go to the analysis of the statistical access log files, but it can not let us real-time statistics, can not give us intuitive statistical data. Now, apachetop This tool will be able to track log changes in real time, to see which files visitors are looking at, and what information they have on their visitors ' IP.

1. Apachetop Installation

# RPM-IVH http://mirrors.hustunique.com/epel/5/i386/epel-release-5-4.noarch.rpm
# yum Install Apachetop.

2. Apapchetop Use

# apachetop-h
Apachetop V0.12.6-usage:
File options:
-F LogFile Open logfile (assumed common/combined) [/var/log/httpd/access_log]
(repeat option for more than one source)

Url/host/referrer munging Options:
-Q Keep Request string [No]
-L All URLs lowercase [no]
-s num Keep URL path segment quantity [all]
-P preserves the protocol before referrer [No]
-R retains each host/IP [no]

Stats options:
Two parameters must be supplied. Default: [-T 30]
-h hits keep state only to how many clicks
-T secs hold state only to how many seconds

-D secs Refresh delay time [5]

-H This Help

When executed, there are also commands to toggle the display status:

One-touch COMMANDS
D: Toggle urls/referrers/hosts display Mode switch
N: Toggle hits & bytes or return code switch
H or? : Help Information
P: (un) pause display (freeze update)
Q: Exit Apachetop
Up/down: Moving the star sign Up/down
Right/left: Enter/exit display mode
Sub Menu:
S: Sort: [The appropriate menu would appear for your display]
R) Requests r) reqs/sec B bytes b) bytes/sec
2) 2xx 3) 3xx 4) 4xx 5) 5xx

T: Fixed display On/off:
u) (URL R) referrers h) hosts

F: Use filters:
A) Add/edit menu C) Clear all S show active (not done yet)
A:add FILTER Submenu
u) to URL R to referrers h) to hosts

3. apachetop Example


Apache

Apachetop can also monitor nginx logs in real time, but the Nginx access log format must be either generic or federated log format, otherwise some information is not statistically available.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.