View the number of concurrent workers and processes of apache ApacheLinux (Tutorial) and number of workers apachelinux
1. Check the current number of concurrent workers of apache:
Netstat-an | grep ESTABLISHED | wc-l
Compare the Number Difference of MaxClients in httpd. conf.
2. Check the number of processes:
Ps aux | grep httpd | wc-l
3. You can use the following parameters to view data:
Server-status? Auto
# Ps-ef | grep httpd | wc-l
1388
Count the number of httpd processes. A single request starts a process and is used on the Apache server.
This indicates that Apache can process 1388 concurrent requests. Apache can automatically adjust this value based on the load.
# Netstat-nat | grep-I "80" | wc-l
4341
Netstat-an prints the current network connection status of the system, while grep-I "80" is used to extract connections related to port 80. wc-l is used to calculate the number of connections.
The final number returned is the total number of requests on all port 80.
# Netstat-na | grep ESTABLISHED | wc-l
376
Netstat-an prints the current network connection status of the system, and grep ESTABLISHED extracts information about the ESTABLISHED connection. Then wc-l statistics.
The number returned is the total number of established connections on all port 80.
Netstat-nat | grep ESTABLISHED | wc-allows you to view detailed records of all ESTABLISHED connections.
View the number of concurrent Apache requests and their TCP connection status:
Linux Command:
Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]}'?
(This statement was obtained from Wang dawang, Technical Director of Sina interaction community division, Sina interaction community division. It is very good.) return result example:
LAST_ACK 5
SYN_RECV 30
ESTABLISHED 1597
FIN_WAIT1 51
FIN_WAIT2 504
TIME_WAIT 1057
The
SYN_RECV indicates the number of requests waiting for processing;
ESTABLISHED indicates the normal data transmission status;
TIME_WAIT indicates the number of requests that have been processed and wait for the timeout to end.