[collectd] Collecting more detail network statistics

Ulf Zimmermann ulf at openlane.com
Mon Mar 2 16:30:15 CET 2009


> -----Original Message-----
> From: Florian Forster [mailto:octo at verplant.org]
> Sent: 02/28/2009 03:24
> To: Ulf Zimmermann
> Cc: collectd at verplant.org
> Subject: Re: [collectd] Collecting more detail network statistics
> 
> Hi Ulf,
> 
> 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 [0], 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
> the future..
> 
> > 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 :)
> 
> Regards,
> -octo

I will see to build an updated rpm for our environment (or finally go to
a standard build and install just a custom config).

Need to look at grapher again too. Haven't spent much time lately on
this.

Regards, Ulf.

---------------------------------------------------------------------
OPENLANE Inc., T: 650-532-6382, F: 650-532-6441
4600 Bohannon Drive, Suite 100, Menlo Park, CA 94025
---------------------------------------------------------------------



More information about the collectd mailing list