Statistics on number of users in 24h period
Keith.Neufeld at wichita.edu
Thu Sep 12 15:00:48 UTC 2013
> As a public library, we are really interested in determining the number of unique devices that connect to our wireless network daily.
If you configure the DHCP software to log to a syslog server, the log file will have entries somewhat like this:
Sep 12 09:56:26 netsvc-507 dhcpd: DHCPACK on 18.104.22.168 to 00:1a:a0:4b:6b:67 (GW-223-KIOSK3) via 22.214.171.124
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.
perl -ne 'print "$1\n" if /DHCPACK on \S+ to (\S+) /' dhcp.log | sort -u | wc -l
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.
Director of Network and Data Center Operations
Wichita State University
More information about the dhcp-users