Is there a tool/command to show connections per sec?
I've tried a few iptraf and iftop but I can't see anything about connection rates.
Is there a tool/command to show connections per sec?
I've tried a few iptraf and iftop but I can't see anything about connection rates.
I believe you can use /proc/net/
to view the number of connections at that instant. Check this every second.
# cat /proc/net/sockstat
sockets: used 124
TCP: inuse 23 orphan 0 tw 20 alloc 28 mem 10
UDP: inuse 6 mem 0
RAW: inuse 5
FRAG: inuse 0 memory 0
And to count the number of TCP connections at this moment, do:
# wc -l /proc/net/tcp
28 /proc/net/tcp