# Connections per VH

**URL:** <https://www.ruby-forum.com/t/connections-per-vh/208765>\
**Category:** NGINX\
**Created:** [June 26, 2011, 4:09pm UTC](https://www.ruby-forum.com/t/connections-per-vh/208765 "2011-06-26T16:09:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [June 26, 2011, 4:09pm UTC](https://www.ruby-forum.com/t/connections-per-vh/208765/1 "2011-06-26T16:09:59Z")

</div>

Hi all

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

BTW

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:

> **[connections per VH](https://forum.nginx.org/read.php?2,210183,210183#msg-210183)**
>
> Hi all I undestand that there aren't any "server-satus" module like apache, BTW I have hundreds virtualhosts server by single nginx. How can I do to know which VH make more traffic/connection (in real time) ? Kind r

---

<div class="post-metadata">

**Author:** ![bsd3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@bsd3000](https://www.ruby-forum.com/u/bsd3000)\
**Post date:** [June 27, 2011, 3:48am UTC](https://www.ruby-forum.com/t/connections-per-vh/208765/2 "2011-06-27T03:48:23Z")

</div>

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:

> **[Re: connections per VH](https://forum.nginx.org/read.php?2,210183,210291#msg-210291)**
>
> Hi all I undestand that there aren't any "server-satus" module like apache, BTW I have hundreds virtualhosts server by single nginx. How can I do to know which VH make more traffic/connection (in real time) ? Kind r

---

<div class="post-metadata">

**Author:** ![bsd3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@bsd3000](https://www.ruby-forum.com/u/bsd3000)\
**Post date:** [June 29, 2011, 6:42am UTC](https://www.ruby-forum.com/t/connections-per-vh/208765/3 "2011-06-29T06:42:43Z")

</div>

try this:

> **[GitHub - Lax/traffic-accounting-nginx-module: Monitor the incoming and...](https://github.com/Lax/traffic-accounting-nginx-module)**
>
> Monitor the incoming and outgoing traffic metrics in realtime for NGINX - GitHub - Lax/traffic-accounting-nginx-module: Monitor the incoming and outgoing traffic metrics in realtime for NGINX

just set http\_accounting\_id in each VH config file.

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

---

<div class="post-metadata">

**Author:** ![bsd3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@bsd3000](https://www.ruby-forum.com/u/bsd3000)\
**Post date:** [June 29, 2011, 9:23pm UTC](https://www.ruby-forum.com/t/connections-per-vh/208765/4 "2011-06-29T21:23:18Z")

</div>

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

Regards

Tombar

---

<div class="post-metadata">

**Author:** ![bsd3000](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/6bbea6/32.png) [@bsd3000](https://www.ruby-forum.com/u/bsd3000)\
**Post date:** [June 29, 2011, 9:47pm UTC](https://www.ruby-forum.com/t/connections-per-vh/208765/5 "2011-06-29T21:47:26Z")

</div>

There is an sFlow module here:  
[http://nginx-sflow-module.googlecode.com](http://nginx-sflow-module.googlecode.com)

described here:

> **[NGINX](https://blog.sflow.com/2011/04/nginx.html)**
>
> The nginx-sflow-module project is an open source implementation of sFlow monitoring for the Nginx ( pronounced engine x) web server. T...

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  
common-logfile-format.

sFlow agents are also available for servers/hypervisors  
([http://host-sflow.sourceforge.net](http://host-sflow.sourceforge.net)); and for most ethernet switches  
([sFlow Products: Network Equipment @ sFlow.org](http://sflow.org/products/network.php)) so you might find you can  
instrument the system in other ways too.

Neil
