argusarchive script

David J Brumley dbrumley at rtfm.stanford.edu
Fri May 10 13:03:52 EDT 2002


I've included my rotate script, which basically takes current time -
1/2 hour to come up with last hours date. Seems to work. It does take
into consideration the daylight savings time when calculating the
hour, though how to deal with it is implementation dependent :)

-david


> 	Now I've started converting to 2.x (you don't want to rush these things
> after all :-)), I've hit my first rub. The argusarchive script file naming
> scheme has a short coming (at least as far as I'm concerned) in that the 
> first and last files of the day are in the wrong place (i.e in "yesterday" or
> "tomorrow". At present the file argus.2002.04.29.00.00.00.gz (for instance)
> really belongs in archive/2002/04/28/argus.2002.04.28.23.00.00.gz not 
> archive/2002/04/29/argus.2002.04.29.00.00.00.gz (where it is) since the data 
> in it starts at 04/28 23:00 to 04/28 23:59. While this could be compensated for 
> in the extraction perl script, I think the right answer is probably to change 
> the archive script to "do the right thing". The question is how best to do 
> that. The first thing that occurs to me is generate the file name when the 
> switch happens (as now) but save it in a file in the file system for the next 
> switch and use the file name saved at the last switch (or startup which is a 
> wrinkle that needs thinking about) as the archive file name. Essentially I 
> want the file name to be the date at the start of the capture period not the 
> end (because then data for a day is in a single directory as it should be).
> 	Anyone have any clever suggestions about how to easily achieve this 
> without storing file names (with the attendent messyness of needing to consider
> setting an appropriate filename on startup) or should we just store the 
> filename and be done with it?
> 
> Peter Van Epp / Operations and Technical Support 
> Simon Fraser University, Burnaby, B.C. Canada

-- 
David Brumley
650.723.2445
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotateargus.pl
Type: application/x-perl
Size: 1555 bytes
Desc: not available
URL: <https://pairlist1.pair.net/pipermail/argus/attachments/20020510/99a2e1db/attachment.bin>


More information about the argus mailing list