[netflow-tools] logrotation

memic memic at paniert.org
Wed Sep 13 20:56:03 EST 2006


hi,

i was wondering whats the best solution to rotate the flowd logfiles, im 
doing it atm
with a very simple bash script:

# cat /usr/local/bin/flowd-logrotate.sh
#!/bin/bash
PID=`pgrep -f "flowd: monitor"`
/bin/echo $PID
DATE=`date +%Y%m%d`
/bin/mv /var/log/flow/flowd.bin /var/log/flow/$DATE-flow.bin
/bin/kill -HUP $PID

with a cron like that:

0 0 * * * /usr/local/bin/flowd-logrotate.sh

regards,

memic



More information about the netflow-tools mailing list