Problems with the -d option
Jesus Calle, Ext 1081 (jesus@coms.indra-ssi.es)
Tue, 17 Dec 1996 12:36:15 -0800
Sorry, I think I have sent this before???.
PROBLEM:
Some people may have noticed that putting:
wwwstat -d '19' accessfile
results in the process of all the log file. Not only de 19th day.
The same occurs if you put (from 15 to 19):
wwwstat -d '1[5-9]' accessfile
What happen is that the comparison between the SearchDate (1[5-9] or 19)
and the date in the log file has a problem.
date extracted from the log has the format: 'Month Day Year'
e.g 'Nov 14 1996'
if the option -d has a '19' as value, all the log will be processed because
all the dates in the log have a 19 inside the year field (1996). The same if
you put -d '96' or -d '99' or -d '6':
SOLUTIONS I proposed:
First:
Try to process a single day with the month field,
e.g. -d 'Nov 6' or -d 'Nov 19'
With a single digit day put: -d ' 4' (Note the blank before the 4)
Be careful with the patterns you put
Second:
in the subroutine process_log (line 1100 aprox..)
Change the line:
$date = "$2 $1 $3";
and put:
$date = "$2 $1";
the field $3 is the year. Then we have to be careful next chrismas.
I know we loose thea year information but I think we have to rotate the logs
at least for the new year.
Again Sorry for my English and Bugs.
--
Saludos,
--------------------------------------------------
Jesus Calle Vaquero
Dpto. Comunicaciones
INDRA SSI c/Velazquez 132, Planta 2, Madrid
Tfno: (+34) 1 3481258
e-mail: jesus@coms.indra-ssi.es
--------------------------------------------------