Never mind Text-DHCPparse. Paul Kraus ----------------------- PEL Supply Company Network Administrator
> -----Original Message----- > From: Paul Kraus [mailto:[EMAIL PROTECTED] > Sent: Monday, January 05, 2004 8:59 AM > To: [EMAIL PROTECTED] > Subject: Squid Log Parser > > For kicks I am trying to write a squid log parser. The access.log file is > the easy part. I am having trouble with translating the ip information in > the dhcpd.leases file. The way I see it I will need to read the file > backwards. Analyzing each lease block and skipping lease blocks which I > have > already defined. As far as perl its simply going to be a hash > ($users{ipaddress}=computer name). Any thoughts would be appreciative. > Don't > solve this but help me out with suggestions on how to process the block of > next. Here is an example of the dhcpd.leases file. The problem is you > could > have 20 different leases for a user depending on how far back the log file > goes. > > lease 192.168.XXX.XXX { > starts 1 2004/01/05 13:02:10; > ends 1 2004/01/05 13:12:10; > binding state active; > next binding state free; > hardware ethernet XXX; > uid "\001\000\003G\241\031\037"; > client-hostname "Agullifer"; > } > lease 192.168.XXX.XXX { > starts 1 2004/01/05 13:02:20; > ends 1 2004/01/05 13:12:20; > binding state active; > next binding state free; > hardware ethernet XXX; > uid "[EMAIL PROTECTED]"; > client-hostname "ROBIN"; > } > > Paul Kraus > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>