# Bandwidth usage per file

**URL:** <https://www.ruby-forum.com/t/bandwidth-usage-per-file/202482>\
**Category:** NGINX\
**Created:** [January 30, 2011, 12:23pm UTC](https://www.ruby-forum.com/t/bandwidth-usage-per-file/202482 "2011-01-30T12:23:09Z")\
**Posts on this page:** 3\
**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:** [January 30, 2011, 12:23pm UTC](https://www.ruby-forum.com/t/bandwidth-usage-per-file/202482/1 "2011-01-30T12:23:09Z")

</div>

I need to know the exact bandwidth used to server each file,  
Does Nginx support this feature?

Posted at Nginx Forum:

> **[Bandwidth usage per file](https://forum.nginx.org/read.php?2,170777,170777#msg-170777)**
>
> I need to know the exact bandwidth used to server each file, Does Nginx support this feature?

---

<div class="post-metadata">

**Author:** ![goles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@goles](https://www.ruby-forum.com/u/goles)\
**Post date:** [January 30, 2011, 12:41pm UTC](https://www.ruby-forum.com/t/bandwidth-usage-per-file/202482/2 "2011-01-30T12:41:20Z")

</div>

I mean bandwidth used to SERVE file,

Posted at Nginx Forum:

> **[Re: Bandwidth usage per file](https://forum.nginx.org/read.php?2,170777,170781#msg-170781)**
>
> I need to know the exact bandwidth used to server each file, Does Nginx support this feature?

---

<div class="post-metadata">

**Author:** ![goles](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8edcca/32.png) [@goles](https://www.ruby-forum.com/u/goles)\
**Post date:** [January 31, 2011, 1:50am UTC](https://www.ruby-forum.com/t/bandwidth-usage-per-file/202482/3 "2011-01-31T01:50:37Z")

</div>

I have a module to measure the bandwidth of based of the _accounting\_id_  
set  
in the config file.

http {  
http\_accounting on;  
…

server / {  
…

```
location /path/to/myfile {
    http_accounting_id "myfile";

    ....
}

```

}  
}

the result is write to syslog device, you may filter the result in  
syslog.

get the code from google code(  
[Google Code Archive - Long-term storage for Google Code Project Hosting.](http://code.google.com/p/ltliu-ngx-http-accounting-module)),  
or github([GitHub - Lax/traffic-accounting-nginx-module: Monitor the incoming and outgoing traffic metrics in realtime for NGINX](http://github.com/Lax/ngx_http_accounting_module))

[http://code.google.com/p/ltliu-ngx-http-accounting-module/](http://code.google.com/p/ltliu-ngx-http-accounting-module/)
