nginx: See Active connections / Connections Per Seconds

You can use the nginx status module to view active connections and connections per second for your Nginx server. The status module provides real-time information about the status and performance of your Nginx server.

To view active connections and connections per second, you’ll need to access the status page provided by the status module. This is usually done by making an HTTP request to the Nginx server.

Here’s an example of how to view the status page in a web browser:

http://your-nginx-server/nginx_status

Note: You may need to configure your Nginx server to allow access to the status page, depending on your security settings.

Once you have access to the status page, you can view the number of active connections and connections per second. The number of active connections is shown under the “Active connections” header, and the number of connections per second is shown under the “Reading” and “Writing” headers.

Here’s an example of what the status page might look like:

Active connections: 1
server accepts handled requests
16 16 29
Reading: 0 Writing: 1 Waiting: 0

Explanation:

  • The first line shows the number of active connections to the Nginx server.
  • The second line shows the total number of server accepts, handled requests, and requests that have been processed by Nginx.
  • The third line shows the number of connections currently in the “Reading” state, the number of connections in the “Writing” state, and the number of connections waiting for a task to complete.
  • The fourth line shows the number of connections per second for each of the “Reading” and “Writing” states.

By monitoring the status page, you can get a real-time view of the performance of your Nginx server and identify any potential performance issues.

Leave a Comment