# How do i measure/count concurrent connections?



## wyn (Jan 15, 2010)

Hello All, 

I have a FreeBSD bridge / transparent firewall running ipfw in a webhosting environment with 100+ servers. 
Can someone explain me how i can count the number of concurrent connections? 

Best regards, 

Wyn


----------



## Alt (Jan 15, 2010)

Quick solution - you can setup ipfw rule like this

```
ipfw add xxxx count ip from any to any 80 setup
```
Now each 60 second take command 

```
ipfw show xxxx | awk '{print $2;}'
```
And pass it to rrdtool in counter mode. Or pass these info to cacti.. Then you can get a graph width avg connection requests per minute.
If you want count *concurrent connections* you must hack/dig your webserver (apache/nginx/etc) for current keepalives/status information, ipfw will not help


----------

