argusarchive script

Carter Bullard carter at qosient.com
Fri May 10 16:17:33 EDT 2002


Hey Peter,
I think I hear you saying that the right way to do
it is to split the file along hard time boundaries.
That way if the file spans 12 midnight or noon, you
would like to generate the before and after file.

But short of this, we could read the first record
to see what the start time is in the file and use
that as guide for the file timestamp.

Carter

Carter Bullard
QoSient, LLC
300 E. 56th Street, Suite 18K
New York, New York  10022

carter at qosient.com
Phone +1 212 588-9133
Fax   +1 212 588-9134
http://qosient.com

> -----Original Message-----
> From: owner-argus-info at lists.andrew.cmu.edu 
> [mailto:owner-argus-info at lists.andrew.cmu.edu] On Behalf Of 
> David J Brumley
> Sent: Friday, May 10, 2002 1:04 PM
> To: Peter Van Epp
> Cc: argus-info at lists.andrew.cmu.edu
> Subject: Re: argusarchive script
> 
> 
> 
> 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
> 



More information about the argus mailing list