There are two ways to check the number of concurrent connections, namely:
(Recommended tutorial: nginx tutorial)
1 , configure in the nginx.config file, and then view it through the browser;
2. Use the command to view;
Here is the first way to demonstrate:
location /status { stub_status on; access_log logs/status.log; auth_basic "NginxStatus"; }
Add the above code to the server, and then enter in the browser:
Analysis:
Active connections //Current The number of active connections Nginx is handling.
server accepts handledrequests //A total of 22 connections were processed, 22 handshakes were successfully created, and a total of 64 requests were processed.
Reading //nginx reads the number of Header information from the client.
Writing //Nginx returns the number of Header information to the client.
Waiting //When keep-alive is turned on, this value is equal to active - (reading writing), which means that Nginx has finished processing the resident connection that is waiting for the next request command.
The above is the detailed content of Do you know how to check the number of concurrent connections in nginx?. For more information, please follow other related articles on the PHP Chinese website!