Hello,
now it's clear :) I do use both Webalizer and Analog programs, but actually
doesn't come in mind to me a method you should use to regenerate Analog stats,
but creating a program that do it...
I do have a suggestion for the Webalizer, using the Incremental data process.
All you have to do is to generate (or correct previously generated) the
'webalizer.current' and 'webalizer.hist' files - or whatever you've named the
files contining the historical data, including data from the previous statistics
you can obtain from the output generated by the program itself, prior the
interruption.
Analyzing the Webalizer sources (preserve.c) it's almost clear whats the data
that should be into these files.
Function 'get_history' read webalizer.hist, that store all monthly totals for
the last 12 months, example
1 2002 12345 1234 123 123456 1 31 345 234
2 2002 12345 1234 123 123456 1 28 345 234
3 2002 12345 1234 123 123456 1 31 345 234
...
11 2001 12345 1234 123 123456 1 30 345 234
12 2001 12345 1234 123 123456 1 31 345 234
this data, along with actual logs, reproduce the monthly totals.
Function 'restore_state' read webalizer.current file that stores all previous
runs data. Thats quite complicated to explain here but having a look at the
source file should be self-explanatory - if you've a little confidence with
C, anyways it's commented out. Look at 'save_state' function also.
Of course you have to enable incremental data processing too. Simply add a
'Incremental Yes' line to your conffiles (read webalizer manpage for more
details).
Hope this helps.
rggb
PS. I will document myself for Analog, since I wish to reproduce your
'problem' to reduce the execution times :) |