[netflow-tools] logrotation
Darren Spruell
phatbuckett at gmail.com
Fri Sep 15 00:30:16 EST 2006
On 9/14/06, Gijs Molenaar <gijs at looze.net> wrote:
> memic wrote:
> > #!/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 -SIGUSR1 $PID
> >
> > are you sure no flows can get lost this way?
>
> Yep. When you move the file, flowd still writes data to the it, because
> the inode doesn't change.
>
> After flowd receives the SIGUSR it directly starts to log to the new file.
Wouldn't the use of an automated log rotation utility like logrotate
or newsyslog work well for this as well?
DS
More information about the netflow-tools
mailing list