[netflow-tools] logrotation
Gijs Molenaar
gijs at looze.net
Thu Sep 14 19:00:25 EST 2006
memic wrote:
> ah, ok, somehow i have read over this, thx for poiting out.
>
> my rotation script now looks like this:
>
> #!/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.
- gijs
More information about the netflow-tools
mailing list