How to view the running status of the APAHCE server through other hosts _linux

Source: Internet
Author: User
Tags cpu usage

To view the running status of the Apache server, you can use the <Location> command to implement it. The specific steps are as follows:

1. Locate the following in the Apache main configuration file/etc/httpd/conf/httpd.conf:

Copy Code code as follows:

<Location/server-status>
SetHandler Server-status
Order Deny,allow
Deny from all
Allow from. example.com
</Location>

Remove the previous comment ("#") and modify it to allow client 192.168.1.4 access:

Copy Code code as follows:

<Location/server-status>
SetHandler Server-status
Order Deny,allow
Deny from all
Allow from 192.168.1.4
</Location>

2. In order for the server to display its own running state so that the client is at your command, you need to remove the comment before the statement extendedstatus on.

3. After setting up, only 192.168.1.4 this host can access Apache server status.

Windows 2003 view the running status of Apache

Check the Apache 80 port connection number to detect the number of httpd connections in real time:

Netstat-an | FIND/C ": 80"

Set the maximum number of Apache connections

Threadsperchild #最大的线程数
Maxrequestsperchild #请求的超时时间设置, 0 Delegates are not limited, recommended

(Maxrequestsperchild cannot be set to 0 and may cause server crashes due to memory leaks)


turn on Apache Server-status.

Locate the configuration file httpd.conf below Apache to find

#LoadModule Status_module modules/mod_status.so

Modified into
LoadModule Status_module modules/mod_status.so
Extendedstatus on
<Location/server-status>
SetHandler Server-status
Order Deny,allow
Deny from all
Allow from IP
</Location>

Extendedstatus on Gets a complete report with current status information
Allow from IP is an IP that allows access to the Apache run state

Open the view to use Http://IP/server-status to access, if you need to automatically update, you can use
Http://IP/server-status?refresh=N,N is the update time, and the default is seconds.

Each field in the output of the server-status represents the following meanings:
Field description
Version of server version Apache servers.
Server Built when the Apache server compiles the installation.
Current time of the system.
Restart Time Apache reboot.
Parent Server Generation The generation number of the Apache parent program (parent process), which is the number of reboots that httpd received sighup.
Server uptime The time it has elapsed since Apache was started.
Total accesses to the current number of online quantities and the amount of data transmitted to Apache for this purpose.
CPU Usage The current CPU usage situation.
_swss ..... The current state of all Apache process. Each character represents a program that can display up to 256 program states.
Scoreboard Key the above state description. The following are the meanings expressed by each character symbol:
* _: Wait for the link.
* S: in boot.
* R: The request is being read.
* W: The response is being sent.
* K: Is in the status of staying online.
* D: Looking for DNS.
* C: Closing the link.
* L: Writing a record file.
* G: Enter the normal closing procedure.
* I: Handle idle.
*.: There is no such program.
The SRV number for the generation of this program and its parent program.
PID Process ID for this program.
ACC represents the number of accesses that are online and processed by this program respectively.
M the current state of the program.
CPU resources consumed by this program.
SS distance from the last time the request was processed.
Req the time spent in 1 per thousand seconds for the last processing of the request.
Conn The amount of data delivered this time online.
The amount of data that the child is sent by the subroutine.
Slot The amount of data transmitted by the Slot.
Addresses of client clients.
Vhost belongs to which virtual host or IP of this host.
Request information presented by the request online.
It's good, it's very intuitive.

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.