Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#894 Argument "-" isn't numeric - Awstats 6.9 (build 1.925)

6.9
open
nobody
5
2012-10-11
2012-07-18
No

When analysing a log in Apache common/combined log format I'm getting a number of errors:

...
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11356, <LOG> line 19395.
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11356, <LOG> line 19397.
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11414, <LOG> line 19440.
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11356, <LOG> line 19638.
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11256, <LOG> line 19723.
Argument "-" isn't numeric in int at /usr/lib/cgi-bin/awstats.pl line 11379, <LOG> line 20041.
...

I've narrowed this down to the "%bytesd" value which is not always presented as an integer (from Apache documentation):

"%...b: Bytes sent, excluding HTTP headers. In CLF format i.e. a '-' rather than a 0 when no bytes are sent."

It seems that Common Log Format (CLF) presents a "-" instead of 0 when 0 bytes are sent which awstats.pl is choking on.

Lines that were reported from awstats are:
11256
11356
11379
11414

Cheers.

Discussion