DHCP Help Again

Roger L. Smith roger at ERC.MsState.Edu
Thu Apr 11 11:02:46 PDT 2002


On Thu, 11 Apr 2002, Robert G. Brown wrote:

> > But I'm sure there are better ways to do this?
>
> Not that I know of.  Maybe somebody else knows of one.  I'd just use
> perl or bash (either would probably work, although parsing is generally
> easier in perl), parse e.g.
>
> Apr 11 08:18:09 lucifer dhcpd: DHCPREQUEST for 192.168.1.140 from 00:20:e0:6d:a0:05 via eth0
> Apr 11 08:18:09 lucifer dhcpd: DHCPACK on 192.168.1.140 to 00:20:e0:6d:a0:05 via eth0
>
> from /var/log/messages on the dhcp server, and write an output routine
> to generate

It's actually easier to grab them out of /var/lib/dhcpd.leases, since some
of the information that you're looking for is already in the format that
you need it.

 _\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_\|/_
| Roger L. Smith                        Phone: 662-325-3625               |
| Systems Administrator                 FAX:   662-325-7692               |
| roger at ERC.MsState.Edu                 http://WWW.ERC.MsState.Edu/~roger |
|                       Mississippi State University                      |
|_______________________Engineering Research Center_______________________|




More information about the Beowulf mailing list