darold / squidanalyzer

Squid Analyzer parses Squid proxy access log and reports general statistics about hits, bytes, users, networks, top URLs, and top second level domains. Statistic reports are oriented toward user and bandwidth control.
http://squidanalyzer.darold.net/
126 stars 36 forks source link

ERROR: bad format at line 1 into /var/www/squidanalyzer/2016/08/05/stat_code.dat #144

Closed kpal38 closed 8 years ago

kpal38 commented 8 years ago

Hello,

I launch script "squid-analyzer" with crontab but I have error:

Read 2303467 lines, matched 2257951 and found 2257951 new lines Reordering daily data files now... Saving data into /var/www/squidanalyzer/2016/08/01 Saving data into /var/www/squidanalyzer/2016/08/02 Saving data into /var/www/squidanalyzer/2016/08/03 Saving data into /var/www/squidanalyzer/2016/08/04 Saving data into /var/www/squidanalyzer/2016/08/05 ERROR: bad format at line 1 into /var/www/squidanalyzer/2016/08/05/stat_code.dat DENIED hits_hour=15:2,;bytes_hour=15:7210,;thp_bytes_hour=15:7210,;thp_duration_hour=15:5, ERROR: bad format at line 2 into /var/www/squidanalyzer/2016/08/05/stat_code.dat MISS hits_hour=00:9450,01:9363,02:9488,03:9512,04:9770,05:9534,06:9767,07:9408,08:9411,09:9454,10:9402,11:9502,12:9381,13:9466,14:9390,15:9377,16:9440,17:9489,18:9515,19:9323,20:9437,21:9429,22:9433,23:9373,;bytes_hour=00:51746220,01:506 35589,02:58154303,03:61151923,04:301126739,05:52494756,06:85584594,07:38198665,08:39739444,09:45568481,10:43214696,11:46033664,12:40384522,13:102982095,14:38653984,15:60685139,16:301213689,17:514268296,18:287625182,19:37469003,20:3945102 9,21:38270018,22:51443137,23:37244876,;thp_bytes_hour=00:51746220,01:50635589,02:58154303,03:61151923,04:301126739,05:52494756,06:85584594,07:38198665,08:39739444,09:45568481,10:43214696,11:46033664,12:40384522,13:102982095,14:38653984,1 5:60685139,16:301213689,17:514268296,18:287625182,19:37469003,20:39451029,21:38270018,22:51443137,23:37244876,;thp_duration_hour=00:28332453,01:25835405,02:22688083,03:23584054,04:24241504,05:24419763,06:22801656,07:24048528,08:23004248, 09:23742276,10:24988598,11:24572324,12:300037037,13:22537039,14:24166708,15:23275487,16:505069092,17:32366601,18:29787187,19:21991213,20:36198881,21:45887724,22:232276143,23:25706762,

If I launch script manually, it work perfectly.

I don't understand why this script doesn't work with crontab.

Thank you for response.

kpal38 commented 8 years ago

It's ok, crontab has his own environment, so i export $PERL5LIB variable, and it works.