Apache checks the current number of concurrencies

步履不停
Release: 2019-07-27 09:19:09
Original
3684 people have browsed it

Apache checks the current number of concurrencies

1. Check the current number of concurrent accesses to apache:

netstat -an | grep ESTABLISHED | wc -l
Copy after login

Compare the numerical difference between MaxClients in httpd.conf.

2, Check how many processes there are :

ps aux|grep httpd|wc -l
Copy after login

3, You can use the following parameters to view the data:

server-status?auto
#ps -ef|grep httpd|wc -l
1388
Copy after login

Count the number of httpd processes. Each request will start a process for use on the Apache server.

indicates that Apache can handle 1388 concurrent requests. This value can be automatically adjusted by Apache according to the load.

#netstat -nat|grep -i "80"|wc -l
4341
Copy after login

netstat -an will print the current network link status of the system, while grep -i "80" is used to extract connections related to port 80, and wc -l performs connection number statistics.

The final number returned is the total number of current requests for all 80 ports.

#netstat -na|grep ESTABLISHED|wc -l
376
Copy after login

netstat -an will print the current network link status of the system, and grep ESTABLISHED will extract the information of 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 - You can view detailed records of all established connections

View the number of concurrent requests for Apache and its TCP connection status:

Linux command:

netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'
LAST_ACK 5
SYN_RECV 30
ESTABLISHED 1597
FIN_WAIT1 51
FIN_WAIT2 504
TIME_WAIT 1057
Copy after login

Among them:

SYN_RECV indicates the number of requests waiting to be processed;
ESTABLISHED indicates normal data transmission status;
TIME_WAIT indicates processing Completed, the number of requests waiting for the timeout to expire.

For more technical articles related to Apache, please visit the Apache Tutorial column to learn!

The above is the detailed content of Apache checks the current number of concurrencies. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template