Statistics on number of users in 24h period

Brett Charbeneau brett at wrl.org
Thu Sep 12 15:29:54 UTC 2013


	I'm grateful for your response, Keith!
	And the neat perl script is useful too.
	This is the exact tree I was trying to bark up, but I can't seem to get 
DD-WRT's implementation of DHCP (purported to be 4.1-ESV-R2-1) to log at that 
level.
	This may be a limitation/feature of DD-WRT. They offer "mini" and "mega" 
firmware versions, I've yet to try the latter which may offer this flexibility.
	Thanks again for the tip!

-- 
********************************************************************
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
********************************************************************

On Thu, 12 Sep 2013, Neufeld, Keith wrote:

NK> > As a public library, we are really interested in determining the number of unique devices that connect to our wireless network daily.
NK> 
NK> If you configure the DHCP software to log to a syslog server, the log file will have entries somewhat like this:
NK> 
NK> Sep 12 09:56:26 netsvc-507 dhcpd: DHCPACK on 156.26.72.147 to 00:1a:a0:4b:6b:67 (GW-223-KIOSK3) via 156.26.72.8
NK> 
NK> which will allow you to determine the number of unique clients; whereas analyzing the current lease file will only show you the last client that used each particular IP, so reuse of IPs will not get counted.
NK> 
NK> Running
NK> 
NK> perl -ne 'print "$1\n" if /DHCPACK on \S+ to (\S+) /' dhcp.log | sort -u | wc -l
NK> 
NK> on today's DHCP syslog file gives me 11236 unique clients granted IPs on our network so far today.  It could be more sophisticated, but it's quick and easy -- if you're able to syslog.



More information about the dhcp-users mailing list