View the current number of concurrent accesses and processes in Apache

Source: Internet
Author: User

1. View the current number of concurrent accesses to Apache:
Netstat-an | grep established | Wc-l

Compare the number of maxclients in httpd.conf.

2. How many processes are viewed:
PS Aux|grep httpd|wc-l

3, you can use the following parameters to view the data
Server-status?auto

#ps-ef|grep Httpd|wc-l
1388
Count the number of httpd processes, and a single request initiates a process that is used for the Apache server.
Indicates that Apache can handle 1388 concurrent requests, which Apache can automatically adjust according to the load situation.

#netstat-nat|grep-i "|wc-l"
4341
Netstat-an will print the current network link state of the system, while Grep-i "80" is used to extract connections related to port 80, wc-l the number of connections counted.
The final number returned is the total number of requests for all 80 ports currently.

#netstat-na|grep Established|wc-l
376
Netstat-an Prints the current network link state of the system, and grep established extracts information about the established connection. Then wc-l statistics.
The final number returned is the total number of established connections for all current 80 ports.

netstat-nat| | grep ESTABLISHED|WC-To see detailed records of all established connections

To view the number of concurrent requests for Apache and its TCP connection status:
Linux commands:
Netstat-n | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '

(this statement was obtained from Wang Lu, technical director of Sina Interactive Community Division, Sina Interactive Community division.) returns an example of the result:
Last_ack 5
SYN_RECV 30
Established 1597
Fin_wait1 51
Fin_wait2 504
Time_wait 1057
One of the
SYN_RECV indicates the number of requests waiting to be processed;
Established indicates the normal data transmission status;
Time_wait indicates the number of requests that have finished processing and waiting for the timeout to expire.

View the current number of concurrent accesses and processes in Apache

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.