[techtalk] dhcpd log entries

Daniel Manrique roadmr at entropia.com.mx
Wed May 9 14:21:50 EST 2001


On Wed, 9 May 2001, Hans Tegnerud wrote:

> Does anyone know if it's possible to configure dhcpd only to log
> critical errors to the syslog (or not at all)? dhcpd is is slowly
> filling my /var/log/messages files with DHCPREQUESTs and DHCPACKs of
> which I'm not all that interrested.

dhcpd itself has two ways of controlling where the log output goes.

The first is by specifying a different syslog server with an option in the
dhcpd.conf file:

 option log-servers ip-address [, ip-address ... ];

       The  log-server option specifies a list of MIT-LCS UDP log
       servers available to the client.  Servers should be listed
       in order of preference.

If you don't have a separate server for your logs (and who does?), you can
start dhcpd with the -d flag, asking it to log to stderr instead of
syslog, and then redirecting the output to a file of your choice:

dhcpd -d >/var/log/whatever 2>&1

of course, if you'd rather have *no* logs, then direct the output to
/dev/null :)

> Tried to filter out dhcpd entries using syslog.conf, but now I know
> how syslogd works... :)

well, if you know how it works, you'll see that the level of control you
have is not very good. You could either use an external program to massage
your logs, or use an alternative logging daemon. syslog-ng (look it up in
freshmeat) has regexp-based filtering and might just fit the bill.


	- Roadmaster

----------------
*
Save a tree- use E-Mail!			roadmr at entropia.com.mx
*





More information about the Techtalk mailing list