[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lan-statistics logging

Newbie here - have just acquainted myself with iptraf and it looks
capable of doing what we're looking for.

I have the lan-stats monitor running background out of a cron job
every hour with a time limit of one hour. I previously configured
iptraf from the curses interface to log (using Ethernet address) at
65 minute intervals.

42 * * * * root export ext=`/root/bin/cmdtime.pl` ; /usr/local/bin/iptraf -l eth0 -L /var/log/iptraf/lan-log.$ext -B -t 60

cmdtime.pl is a script that gives me the current date/time like
this: yyyy-mm-dd-hh:mm

This is producing hourly-timestamped logs whose data I'll rework
into a format suitable for import into a database/table. Is this a
reasonable way to go about logging current/historical use? 

In my testing, when I ran iptraf without the -t parameter, the
logfiles produced cumulative totals, but I'd like to avoid parsing
logs with multiple entries for the same Ethernet address.

Thanks for any help or direction.

Best regards,

Tony Hunter