mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: Not to suppress NET kernel messages
  2004-08-22  3:10 Not to suppress NET kernel messages Josan Kadett
@ 2004-08-22  2:10 ` Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2004-08-22  2:10 UTC (permalink / raw)
  To: Josan Kadett; +Cc: linux-kernel

On Sun, 22 Aug 2004 05:10:36 +0200 Josan Kadett wrote:

| I think the messages are rate limited by some code in network subsytem that
| disallows a message from being sent to console for more than once. I am
| trying to add some source debugging functions with printk, and I just wish
| to disable this protection. 

Yes, net/core/utils.c, net_ratelimit() function is used to determine
if messages should be printed or suppressed.  It returns 1 if the
message should be printed, 0 to suppress a message.  Usage is like this:

	if (net_ratelimit())	/* print if non-0 */
		printk(KERN_DEBUG "printing some message\n");

If you want to print all messages (!) and you aren't worried about
DoS or overflowing logs etc., just change the net_ratelimit() function
to return 1 always... and stand back.  Warning, caveat emptor, user beware,
etc.  Void where prohibited.

--
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Not to suppress NET kernel messages
@ 2004-08-22  3:10 Josan Kadett
  2004-08-22  2:10 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Josan Kadett @ 2004-08-22  3:10 UTC (permalink / raw)
  To: linux-kernel

I think the messages are rate limited by some code in network subsytem that
disallows a message from being sent to console for more than once. I am
trying to add some source debugging functions with printk, and I just wish
to disable this protection. 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-22  2:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-22  3:10 Not to suppress NET kernel messages Josan Kadett
2004-08-22  2:10 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®