[collectd] Problems with 'traffic' plugin

Florian Forster octo at verplant.org
Tue May 2 00:29:24 CEST 2006


Hi Sune,

On Sun, Apr 30, 2006 at 09:14:36PM +0200, Sune Marcher wrote:
> configure autodetects these settings:
> HAVE_SYS_SOCKET_H, HAVE_LINUX_IF_H, HAVE_LINUX_NETDEVICE_H,
> HAVE_GETIFADDRS, HAVE_IFADDRS_H

with these defines the traffic plugin will use `getifaddrs(3)' to read
system statistics..

> while the following aren't defined:
> HAVE_STRUCT_IF_DATA, HAVE_LIBKSTAT
> 
> Could that be the problem?

No, `libkstat' is only ever used under Solaris and `struct if_data' is a
BSD thing..

The behavior you describe either happends if `getifaddrs(3)' doesn't
return anything at all or none of the structures returned contain the
counters needed for graphing the traffic.. Unfortunatly there is no
debug-statement there, so simply compiling with ``--enable-debug'' won't
help..
If you feel like experimenting you can add a call to `DBG' or `syslog'
in `src/traffic.c':~164..
Could you send some more information about your system? You
Kernel(-version), libc version, gcc version, ...?

> The module *does* build and load without problems, though.

Could you check for a message reading ``Plugin traffic doesn't provide a
read function.''? It should be in the syslog right after you start
collectd. If it's there, it's a compile-time issue. If not, it's a
runtime problem..

> Also, do you know whether it's possible to get stats for interface
> aliases (ie, "eth0:1")? /proc/net/dev doesn't list the aliases, but
> perhaps there's some other API that can do it?

No, sorry, I don't know.. But I wouldn't be surprised if `getifaddrs(3)'
returned interface aliases as well..

> Finally, RRDTool seems like a complex beast... does anyone have some
> good references, or is it google time? :)

The various rrdtool-manpages are pretty good, though somewhat academic..
A little easier to understand could be the `rrdtutorial' by Alex van den
Bogaerdt: <http://oss.oetiker.ch/rrdtool/tut/rrdtutorial.en.html>. IIrc
the RRDTool homepage has some links to more documentation..

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20060502/9799daf7/attachment.pgp


More information about the collectd mailing list