Connections per VH

Hi all

I undestand that there aren’t any “server-satus” module like apache,


I have hundreds virtualhosts server by single nginx.

How can I do to know which VH make more traffic/connection (in real
time) ?

Kind regards

Posted at Nginx Forum:

There is a server status module called stub status, but it’s on a server
wide level, not vhost. You have to parse the access logs if you want
vhost granularity.

Posted at Nginx Forum:

try this:

just set http_accounting_id in each VH config file.

于 2011-6-26 22:09, bsd3000 写道:

Care to explain a little bit more how does it work? sounds pretty good.



There is an sFlow module here:

described here:

transactions are sampled at 1-in-N (to minimize the overhead) and send
via UDP to an sFlow collector for further analysis. For example, the
freeware “sflowtool” can turn it into an ascii feed in

sFlow agents are also available for servers/hypervisors
(; and for most ethernet switches
(sFlow Products: Network Equipment @ so you might find you can
instrument the system in other ways too.