From: "Randy.Dunlap" <rddunlap@osdl.org>
To: "Josan Kadett" <corporate@superonline.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Not to suppress NET kernel messages
Date: Sat, 21 Aug 2004 19:10:50 -0700 [thread overview]
Message-ID: <20040821191050.43467df6.rddunlap@osdl.org> (raw)
In-Reply-To: <S265222AbUHVCKk/20040822021040Z+1376@vger.kernel.org>
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
prev parent reply other threads:[~2004-08-22 2:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-22 3:10 Josan Kadett
2004-08-22 2:10 ` Randy.Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040821191050.43467df6.rddunlap@osdl.org \
--to=rddunlap@osdl.org \
--cc=corporate@superonline.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®