On Jul 16, 2011, at 7:34 AM, Igor Galić wrote:

> 
> 
> ----- Original Message -----
>> I'm trying to get statistics from my traffic server much in the same
>> was as was shown in
>> 
>> http://www.ogre.com/node/357
>> 
>> But when I run
>> 
>> [daruma:trafficserver 592]$ ./bin/traffic_logstats  -h
>> Usage: traffic_logstats [-l logfile] [-o origin[,...]] [-O
>> originfile] [-m minhits] [-inshv]
>>  switch__________________type__default___description
>>  -h, --help              tog   true      Give this help
>>  -f, --log_file          str   (null)    Specific logfile to parse
>>  -o, --origin_list       str   (null)    Only show stats for listed
>>  Origins
>>  -O, --origin_file       str   (null)    File listing Origins to
>>  show
>>  -M, --max_orgins        int   0         Max number of Origins to
>>  show
>>  -u, --urls              int   0         Produce JSON stats for
>>  URLs, argument is LRU size
>>  -U, --show_urls         int   0         Only show max this number
>>  of URLs
>>  -A, --as_object         tog   false     Produce URL stats as a JSON
>>  object instead of array
>>  -i, --incremental       tog   false     Incremental log parsing
>>  -S, --statetag          str   (null)    Name of the state file to
>>  use
>>  -t, --tail              int   0         Parse the last <sec>
>>  seconds of log
>>  -s, --summary           tog   false     Only produce the summary
>>  -j, --json              tog   false     Produce JSON formatted
>>  output
>>  -c, --cgi               tog   false     Produce HTTP headers
>>  suitable as a CGI
>>  -m, --min_hits          i64   0         Minimum total hits for an
>>  Origin
>>  -a, --max_age           int   0         Max age for log entries to
>>  be considered
>>  -l, --line_len          int   78        Output line length
>>  -T, --debug_tags        str   (null)    Colon-Separated Debug Tags
>>  -V, --version           tog   false     Print Version Id
>> 
>> Note that there seems to be two ways to specify the log file, -f and
>> -l.  Which one should I use?  When I try either I get:
>> 
>> [daruma:trafficserver 598]$ ./bin/traffic_logstats  -l
>> var/log/trafficserver/squid.blog
>> FATAL: ./logging/LogStandalone.cc:96: failed assert
>> `setrlimit((RLIMCAST) which, &rl) >= 0`
>> ./bin/traffic_logstats - STACK TRACE:
>> 0   libtsutil.3.dylib                   0x00000001000cbb6b ink_fatal
>> + 123
>> 1   libtsutil.3.dylib                   0x00000001000ca571
>> _ink_assert + 145
>> 2   traffic_logstats                    0x00000001000052f4
>> _Z11init_systemv + 100
>> 3   traffic_logstats                    0x000000010000538b
>> _Z25init_log_standalone_basicPKc + 27
>> 4   traffic_logstats                    0x00000001000055ab main + 411
>> 5   traffic_logstats                    0x0000000100001484 start + 52
>> 6   ???                                 0x0000000000000003 0x0 + 3
>> Abort trap
>> [daruma:trafficserver 599]$ ./bin/traffic_logstats  -V
>> Apache Traffic Server - traffic_logstats - 3.0.0 - (build # 61522 on
>> Jul 15 2011 at 22:43:38)
>> 
>> 
>> What am I doing wrong?
> 
> You're passing the wrong parameters
> -l expects, as it says, an integer.

Usage: traffic_logstats [-l logfile] [-o origin[,...]] [-O

> instead, you should probably pass no params at all to get
> the same results as Leif does in http://www.ogre.com/node/357

[daruma:trafficserver 613]$ ./bin/traffic_logstats 
FATAL: ./logging/LogStandalone.cc:96: failed assert `setrlimit((RLIMCAST) 
which, &rl) >= 0`
./bin/traffic_logstats - STACK TRACE: 
0   libtsutil.3.dylib                   0x00000001000cbb6b ink_fatal + 123
1   libtsutil.3.dylib                   0x00000001000ca571 _ink_assert + 145
2   traffic_logstats                    0x00000001000052f4 _Z11init_systemv + 
100
3   traffic_logstats                    0x000000010000538b 
_Z25init_log_standalone_basicPKc + 27
4   traffic_logstats                    0x00000001000055ab main + 411
5   traffic_logstats                    0x0000000100001484 start + 52
6   ???                                 0x0000000000000001 0x0 + 1
Abort trap
[daruma:trafficserver 614]$ 

>> IMO, a stack trace is very bad if a user enters in bad arguments.
> 
> This should only happen on a debug build - is this one?

I didn't specify that my build be a debug build when I configured it.

> Anyway, you're right. Can you please open a jira for this?

Sure, will do.



Regards,
Alan

Reply via email to