[collectd] Collecting more detail network statistics
octo at verplant.org
Sat Feb 28 12:23:56 CET 2009
On Fri, Feb 27, 2009 at 12:10:10PM -0800, Ulf Zimmermann wrote:
> I am looking at how I could collect more detailed network (interface)
> statistics. Extra numbers I am interested in are (all on Linux
> database servers):
> netstat -in
Bruno already mentioned the Netlink plugin , I think it's exactly
what you want for interface errors.
> cat /proc/net/snmp
I think IP, TCP, and UDP statistics are currently not available. Since
apparently `netstat' simply reads from these files
octo at leeloo:~ $ strace -ttt -v -s 1024 -o /tmp/netstat.strace -- netstat -s >/dev/null
octo at leeloo:~ $ egrep 'open.*proc' /tmp/netstat.strace
1235815119.609463 open("/proc/meminfo", O_RDONLY) = 3
1235815119.609754 open("/proc/net/snmp", O_RDONLY) = 3
1235815119.610715 open("/proc/net/netstat", O_RDONLY) = 3
I'd say it's relatively safe to assume they won't change dramatically in
> Is anyone collecting these numbers right now? Any hints how you would
> collect them?
I've just written and pushed a small plugin called `protocols' which
does precisely that: Read from `/proc/net/snmp' and `/proc/net/netstat'
and dispatch the values.
It's very simple and dispatches all values as the new type
`protocol_counter'. The vast majority of those values are counters, but
`Tcp: CurrEstab' for example isn't. So most values should work just
fine, but those that are not counters (`CurrEstab' is the only one I've
seen so far) will be totally worthless.
Any feedback is of course welcome :)
Florian octo Forster
Hacker in training
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090228/758d48d0/attachment.pgp
More information about the collectd