[collectd] Patch to make wireless plugin compatible to more drivers.

xm at leipzig.freifunk.net xm at leipzig.freifunk.net
Fri Jun 6 02:20:16 CEST 2008


Hi list,

I currently develop an embedded statistics application and web interface
for OpenWrt Kamikaze based on Collectd and RRDTool.

While working with the wireless plugin I noticed some incompatibilities
with different drivers, namely the Broadcom proprietary driver and madwifi.


  /proc/net/wireless on Broadcom:

   Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
    face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 18
      wl0: 0000    2.  179.  163.       0      0   8040    723      0        0

  With the Broadcom proprietary driver you get the actual signal and noise
  dbm units by substracting 255 from the values in /proc:

   level: 179 - 255 = -76 dBm
   noise: 163 - 255 = -92 dBm


  /proc/net/wireless on Atheros SoC:

   Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE
    face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22
     ath0: 0004   21.  -73.  -94.   21841      0      0      0      0        0

  Madwifi writes the actual dBm values into /proc.


So we have (at least for now) three possible types of values:

   ( x > 0.0   && x <= 100.0 )	current implementation: x is in percent (?)

   ( x > 100.0 && x <= 255.0 )	broadcom: range intersects with percents but
				values below 100.0 (100.0 - 255.0 = -155.0 dBm)
				are somewhat unlikely to occur

   ( x < 0.0 )			atheros: value is already in dBm


A patch which implements the two additional possibilities in collectd's wireless
plugin can be found in the OpenWrt Trac:

https://dev.openwrt.org/browser/packages/utils/collectd/patches/200-wireless-compat.patch


The patch was made against v4.4.0 of collectd but should work with v4.4.1 too.
It would be nice to have this in the next release or so :)


Greetings,
JoW



More information about the collectd mailing list