Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i am using ab command to hit the http request to my local host .

now on server side i want to check how many request currently getting handled by my nginx server.

like in case of DB we can check the list of db-connection made by any application....

same way how to check .....

share|improve this question
add comment

1 Answer

Add this to you localhost config (default):

server {
  server_name  localhost;
      [---snip---]
  location /nginx_status {
    stub_status on;
    access_log   off;
    allow 127.0.0.1;
    deny all;
  }
      [---snip---]
}

Then read (from localhost only) with:

$ wget -O - -q http://localhost/nginx_status

gives (for example):

Active connections: 2 
server accepts handled requests
 31432 31432 631255 
Reading: 0 Writing: 2 Waiting: 0 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.