[Commotion-dev] collectd number of users

Benjamin Chodoroff ben at theworkdept.com
Wed Nov 21 14:25:26 UTC 2012


On Tue 20 Nov 2012 10:00:30 PM EST, Sean McIntyre wrote:
> Hey list,
>
> I'm trying to figure out what collectd mod to use to keep track of the
> number of users on a node. I think some of you have talked in other
> channels saying that keeping track of DHCP leases is the way to go. It
> also sounds like one of you (Seamus?) has done this before.
>
> I installed the iptables mod from pre-built packages here
> <http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/> but
> for some reason am not getting any data out of it. Here's the relevant
> config lines in /etc/collectd.conf.
>
> LoadPlugin iptables
> <Plugin "iptables">
>   Chain "filter" "FORWARD"
>   Chain6 "filter" "OUTPUT"
> </Plugin>
>
> Let me know if you see anything / if you've made this work before. I'm
> kinda wondering if a special collectd mod needs to be made for this
> purpose...? (hope not!)
>
> Sean

Just spent a minute looking around for a dhcp lease count collectd 
plugin, but didn't find one. Iptables is one way of doing it, or 
another option is to write a shell script collectd plugin using 
https://collectd.org/wiki/index.php/Plugin:Exec that runs "cat 
/var/dhcpd.leases | wc -l"

iptables will give a more accurate picture of instantaneous # of users, 
i think.

-b

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 551 bytes
Desc: OpenPGP digital signature
URL: <http://lists.chambana.net/pipermail/commotion-dev/attachments/20121121/233c7cbf/attachment.sig>


More information about the Commotion-dev mailing list