May 312011

Sometimes, we prefer to view statistics in graphical form rather than numerical values​​, which is not too attractive to be displayed. Nginx supports stub_status directive module, which we can use to print:

  • Active connections
  • Server accepts handled requests
  • Reading
  • Writing
  • Waiting

For example:

Active connections: 6
server accepts handled requests
 15561 15561 26602
Reading: 4 Writing: 2 Waiting: 0

However, This module is not compiled by default and must be specified using this argument when compiling nginx.


First, to get statistics like the above example, you should modify nginx config file and add location directive this

server {
	location /nginx_status {
		stub_status on;
		access_log   off;
		deny all;

perl scripts used to generate statistical images can be downloaded here:

Rename to and make it executable
Continue reading »