Skip to contentSkip to conversation

HTB debug info in kernel log

LARTC Brad Davidson 2 participants 6 messages Feb 13, 2003

lore
Share & tools
lore
#0 lore raw

I set up a Perl script to parse the output of 'tc -s qdisc show dev <if>' to get stats for MRTG. The only problem is, every time the tc command runs, I get many lines output to my kernel level syslog - 84, to be exact They look something like this:

oatmail kernel: htb*c10124 m=2 t"748 c272 pq=0 dfI07008 ql=0 pa=0 f:
oatmail kernel: htb*c10094 m=2 t†150 c†150 pq=0 df#7568 ql=0 pa=0 f:
oatmail kernel: htb*g j1630276
oatmail kernel: htb*r7 m=0
oatmail kernel: htb*r6 m=0

I found some reference in the source to a command to tc to set various debug levels, although the function that seems to be printing the info (htb_debug_dump) does not seem to care about the set level - if debug is defined, it prints. Short of altering the DEFINE statement and recompiling the kernel, is there any way to disable this output?

Thanks,

Brad
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 11 lines · Brad Davidson

I set up a Perl script to parse the output of 'tc -s qdisc show dev <if>' to get stats for MRTG. The only problem is, every time the tc command runs, I get many lines output to my kernel level syslog - 84, to be exact They look something like this:

oatmail kernel: htb*c10124 m=2 t"748 c272 pq=0 dfI07008 ql=0 pa=0 f:
oatmail kernel: htb*c10094 m=2 t†150 c†150 pq=0 df#7568 ql=0 pa=0 f:
oatmail kernel: htb*g j1630276
oatmail kernel: htb*r7 m=0
oatmail kernel: htb*r6 m=0

Quoted 5 lines

I found some reference in the source to a command to tc to set various debug levels, although the function that seems to be printing the info (htb_debug_dump) does not seem to care about the set level - if debug is defined, it prints. Short of altering the DEFINE statement and recompiling the kernel, is there any way to disable this output?

I had the same problem. I uncomment the DEFINE statement. But logging there numbers, means there is something miss with your htb setup and has nothing to do with you asking for statistics. You can find more info on the homepage of htb. But it's possible that your rates settings are too low.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#2 lore raw
In reply to Brad Davidson
Quoted 7 lines · Stef Coene

On Thursday 13 February 2003 08:10, Brad Davidson wrote:
I had the same problem. I uncomment the DEFINE statement. But logging there numbers, means there is something miss with your htb setup and has nothing to do with you asking for statistics. You can find more info on the homepage of htb. But it's possible that your rates settings are too low.

Stef

I used htb.init (http://freshmeat.net/projects/htb.init/) to make my rules, so I'm pretty sure they should be OK.

I'm looking at the code in htb_dump, which appears to be what's called to get statistics information by the tc application. It looks to me like if you have debug enabled, as part of the stats collecting routine, it calls htb_debug_dump regardless of whether or not there's anything wrong with your setup.

There are other circumstances that it prints an error message followed by a debug dump, but I'm not seeing an error. It just looks to me like debug info is printed every time a queue is polled for stats info.

If you want to take a look at what I'm talking about, check out line 1211 of sch_htb.c

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Brad Davidson
Quoted 6 lines · Brad Davidson

I'm looking at the code in htb_dump, which appears to be what's called to get statistics information by the tc application. It looks to me like if you have debug enabled, as part of the stats collecting routine, it calls htb_debug_dump regardless of whether or not there's anything wrong with your setup. If you want to take a look at what I'm talking about, check out line 1211 of sch_htb.c

BTW I just commented out the line in question and recompiled the module. It no longer floods the logs. As far as I can tell, there's no good reason for it to do that. It doesn't even check the requested debug levels, or do it of somtehing's wrong. Every time stats info is polled, you get debug info whether you wanted it or not.

Anybody else confirm this going on? Or am I just crazy?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#4 lore raw
In reply to Brad Davidson
Quoted 8 lines · Brad Davidson
Quoted 7 lines · Stef Coene

On Thursday 13 February 2003 08:10, Brad Davidson wrote:
I had the same problem. I uncomment the DEFINE statement. But logging there numbers, means there is something miss with your htb setup and has nothing to do with you asking for statistics. You can find more info on the homepage of htb. But it's possible that your rates settings are too low.

Quoted 4 lines
Quoted 1 line

Stef

I used htb.init (http://freshmeat.net/projects/htb.init/) to make my rules, so I'm pretty sure they should be OK.

But still you can configure a class with a too low rate.

Quoted 6 lines

I'm looking at the code in htb_dump, which appears to be what's called to get statistics information by the tc application. It looks to me like if you have debug enabled, as part of the stats collecting routine, it calls htb_debug_dump regardless of whether or not there's anything wrong with your setup.

Quoted 6 lines

There are other circumstances that it prints an error message followed by a debug dump, but I'm not seeing an error. It just looks to me like debug info is printed every time a queue is polled for stats info.

If you want to take a look at what I'm talking about, check out line 1211 of sch_htb.c

Devik? Debug problems?

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#5 lore raw
In reply to Brad Davidson
Quoted 4 lines · Stef Coene
Quoted 1 line

I used htb.init (http://freshmeat.net/projects/htb.init/) to make my

rules,

Quoted 1 line

so I'm pretty sure they should be OK.

But still you can configure a class with a too low rate.

I know. I've seen one error message in the past regarding a too-low rate, but I have since reconfigured my rules, and haven't seen any warnings since. I don't have any classes set with really low rates - 256kb/sec is the lowest.

Quoted 1 line

Devik? Debug problems?

How about a sub-option on the HTB config option to enable/disable debugging, as opposed to a #DEFINE in the source? Or maybe just a comment as to why it's printing all this :P
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/