[netflow-tools] logrotation

Gijs Molenaar gijs at looze.net
Fri Sep 15 00:33:27 EST 2006


Darren Spruell wrote:
> On 9/14/06, Gijs Molenaar 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?
>   
just a matter of taste...

 - gijs




More information about the netflow-tools mailing list