Statistics on number of users in 24h period

Neufeld, Keith Keith.Neufeld at
Thu Sep 12 16:05:30 UTC 2013

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

We have in dhcpd.conf:

	log-facility local1;

and then in /etc/syslog-ng/syslog-ng.conf:

	destination d_logh { tcp("" port(5140)); };
	destination dhcplog { file("/var/log/dhcp/dhcp.log" perm(0644)); };

	filter f_dhcp { facility(local1); };

	log { source(s_sys); destination(d_logh); };
	log { source(s_sys); filter(f_dhcp); destination(dhcplog); };

which puts the DHCP logs into /var/log/dhcp/dhcp.log and sends a copy to our central log server, where a similar configuration teases them out into separate applications for central logging.  I'm not a systems guy any more so I'm not the one who set up the logging configuration ...

Since you mention DD-WRT, I'm assuming you're running dhcpd on a re-flashed consumer device.  If that's the case and if you have a Unix/Linux instance running somewhere else on commodity server hardware, you may want to use that as a central log server rather than burn through write cycles on your consumer device's NVRAM.  Or (if you have the option) attach an external USB hard drive to your device just for logging.

Keith Neufeld
Director of Network and Data Center Operations
Wichita State University

More information about the dhcp-users mailing list