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