> I need a script which split up the main large file into smaller files
> sorted by months/year... i hope it would also deal with people who have had
> logins which span those periods.... ie they login 31st 11pm and are on till 2am
> the next day.. 1st of the month...
What I do is just move the log files at a particular time (midnight
each day) and then process them ~ 3AM. I name the files something
like radius-server.yyyymmdd.terminal-server. and move them to a
directory radius/acct/yyyymm/ where I collect all the data for a month
and then parse it.
Delaying a little bit will ensure that all pending writes will finish,
though you don't have to wait until 3AM :-)
The radius server opens/writes/closes the log files on every action so
you don't have to worry about telling the server to open a new log
file.
Note: move the log files to a directory _on the same slice_ as where
radius is logging so that you're not copying the files but instead
just renaming them. That will make sure everything works properly.
I get around the problem of what happens at month boundries by
charging clients based on the date that the call _terminated_ and not
originated (ie: if a call originates in October and terminates in
November, it is charged to the November bill.)
Evan
-- Evan Champion * Director, Network Operations mailto:evanc@synapse.net * Directeur, Exploitation du reseau http://www.synapse.net/ * Synapse Internet