# Obtaining req/s or connections/sec sent to a backend-server?

**URL:** <https://www.ruby-forum.com/t/obtaining-req-s-or-connections-sec-sent-to-a-backend-server/236119>\
**Category:** NGINX\
**Created:** [August 6, 2013, 11:55pm UTC](https://www.ruby-forum.com/t/obtaining-req-s-or-connections-sec-sent-to-a-backend-server/236119 "2013-08-06T23:55:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [August 6, 2013, 11:55pm UTC](https://www.ruby-forum.com/t/obtaining-req-s-or-connections-sec-sent-to-a-backend-server/236119/1 "2013-08-06T23:55:14Z")

</div>

Hello Nginx

I understand that nginx when uses as a reverse proxy does not allow me  
to poll for stats regarding the amount of connections/requests sent to  
backend servers. Id like to know if there is creative way I can do this  
without parsing the logs ? I want to do this almost as a live feed and  
parsing the logs would mean a very cpu intenstive job.

Iam sure many of us have been faced with the same dilema…  
Perhaps a way to query the kernel network stack efficiently and directly  
with the backend ips as keys?

Thanks  
Alex

---

<div class="post-metadata">

**Author:** ![Alex\_Flex](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Alex\_Flex](https://www.ruby-forum.com/u/Alex_Flex)\
**Post date:** [August 7, 2013, 3:06am UTC](https://www.ruby-forum.com/t/obtaining-req-s-or-connections-sec-sent-to-a-backend-server/236119/2 "2013-08-07T03:06:16Z")

</div>

Hello!

On Tue, Aug 6, 2013 at 2:54 PM, Alex Flex wrote:

> to poll for stats regarding the amount of connections/requests sent to  
> backend servers. Id like to know if there is creative way I can do this  
> without parsing the logs ?

This is a trivial task if you write a simple tool based on systemtap  
or dtrace 🙂

Take a look at my Nginx Systemtap Toolkit for some examples:

```
https://github.com/agentzh/nginx-systemtap-toolkit

```

Best regards,  
-agentzh
