Home  >  Article  >  Operation and Maintenance  >  Do you know how to check the number of concurrent connections in nginx?

Do you know how to check the number of concurrent connections in nginx?

王林
王林forward
2020-08-21 17:15:103470browse

Do you know how to check the number of concurrent connections in nginx?

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"; }

Do you know how to check the number of concurrent connections in nginx?

Add the above code to the server, and then enter in the browser:

Do you know how to check the number of concurrent connections in nginx?

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!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete