[Dshield] DShield.py

John Sage jsage at finchhaven.com
Mon Nov 5 14:33:20 GMT 2001


Eelco, et al:

> You even can make it a cronjob if you know how to (be sure
>> to add something like 5 minutes between logrotation and the script)
> 

This may be a clue to a problem I've been having: how much time before 
and after cron rotates logs can the logs be safely accessed for writing 
into another file?

I'm having a situation where, when I run a perl script manually it will 
pick up a port probe summary (using tail -12 /path/to/log/here ) but 
when it's run from a cron job that portion of the output is alway 
missing. It's getting fired off about a minute *before* cron starts to 
rotate a whole bunch of stuff..

The perl script itself is my hack of Dan Swan's snort2html.pl..

Just wondering if cron timing might have something to do with this problem..

thnx..

- John


Eelco Lempsink wrote:

> * Johannes B. Ullrich [jullrich at euclidian.com] wrote:
> 
>>Great! Thanks for submitting this. One note to users of this script: 
>>Please make sure you rotate your logs after using it. It will submit 
>>duplicate lines if you don't.
>>
> 
> Yep. That's planned for a future version :-)
> 
> Maybe the "best" thing for now is that you run the script just after
> the logs are rotated, on the just rotated log (? am I clear
> enough?). You even can make it a cronjob if you know how to (be sure
> to add something like 5 minutes between logrotation and the script)
> 






More information about the list mailing list