By checking the concurrent connections of nginx, we can clear the load of the website. There are two ways to view Nginx concurrency (the reason is that I only know two ways), one is through the web interface, the other is through the command, web View is more accurate than command view. The following describes the two methods for viewing No
By checking the concurrent connections of nginx, we can clear the load of the website. There are two ways to view Nginx concurrency (the reason is that I only know two ways), one is through the web interface, the other is through the command, web View is more accurate than command view. The following describes the two methods for viewing No
NginxStatusMonitoring
By viewing the Nginx concurrent connections, we can clear the load of the website. There are two ways to view Nginx concurrency (the reason is that I only know two ways), one is through the web interface, the other is through the command, web View is more accurate than command view. The following two viewing methods are described:
No1. view in a browser
Nginx needs to enable the status module when viewing through the web interface, that is, add-with-http_stub_status_module when installing Nginx and then configure Nginx. conf, add the following content in the server point
Location/nginx_status {stub_status on; access_log off; allow 192.168.1.100; access IP deny all ;}
After the configuration is complete, restart Nginx. Then, you can access http: // localhost/status in the browser, as shown in figure
650) this. width = 650; "border =" 0 "alt =" "src =" http://cdn.verydemo.com/upload/2013_04_05/13651301539440.jpg "/>
Resolution:
Active connections // number of Active connections currently being processed by Nginx.
Server accepts handledrequests // a total of 8 connections are processed, 8 handshakes are created successfully, and a total of 500 requests are processed.
Reading // Number of headers that nginx reads to the client.
Writing // Number of headers that nginx returns to the client.
Waiting // when keep-alive is enabled, this value is equal to active-(reading + writing), meaning Nginx has processed the resident connection Waiting for the next request command
No2, view through commands
# Netstat-n | awk '/^ tcp/{++ S [$ NF]} END {for (a in S) print a, S [a]}'
TIME_WAIT 17
ESTABLISHED 3254
LAST_ACK 236
FIN_WAIT_1 648
FIN_WAIT_2 581
CLOSING 7
CLOSE_WAIT 4916
Resolution:
CLOSED // No connection is active or in progress
LISTEN // the server is waiting for the incoming call
SYN_RECV // a connection request has arrived, waiting for confirmation
SYN_SENT // The application has started. Open a connection.
ESTABLISHED // NORMAL Data TransmissionStatus/Current number of concurrent connections
FIN_WAIT1 // The application says it has been completed
FIN_WAIT2 // the other side has agreed to release
ITMED_WAIT // wait until all groups die
CLOSING // both sides attempt to close at the same time
TIME_WAIT // the other side has initialized a release
LAST_ACK // wait until all groups die
When you are happy, I am not here, when I am happy, you are not