Statistics on number of users in 24h period

Brett Charbeneau brett at wrl.org
Thu Sep 12 14:45:03 UTC 2013


         I'd be very grateful for any help anyone can find the time to offer!

         As a public library, we are really interested in determining the number 
of unique devices that connect to our wireless
network daily. The solution
seemed to be using the DHCP server's lease file to count unique clients.
         Does anyone know of a tool that does such a thing?
         We have used the ISC DHCP server for years (presently on verion 4.2 via 
Debian) and I've been using this bit of code to
sort out unique hardware addresses:

cat /var/lib/dhcp/dhcpd.leases  | grep "hardware ethernet" > stat_temp
sort -u stat_temp > stats_sorted
cat stats_sorted | grep -c hardware

         After running the script adn archive the resulting number I overwrite 
dhcpd.leases with an empty version and then
restart the DHCP server.
         Easy.
         HOWEVER, when I try a similiar routine on a DD-WRT box running 
4.1-ESV-R2-1 on the

/tmp/dnsmasq.leases

         file, and grep on the first three octects of the IP address I get some 
RADICALLY different numbers.
         And I'm stumped.
         Does ESV behave differently than the regular release when it comes to 
the lease files?

-- 
********************************************************************
Brett Charbeneau, GSEC Gold, GCIH Gold
Network Administrator
Williamsburg Regional Library
7770 Croaker Road
Williamsburg, VA 23188-7064
(757)259-4044          www.wrl.org
(757)259-4079 (fax)    brett at wrl.org
********************************************************************



More information about the dhcp-users mailing list