Re: question about pr_info (newbie)
Hi, Kevin - This gets me all the time. I think your system is working correctly. This is the log entry showing your system call:
Dec 29 11:24:40 kv kernel: [67479.245642] Hello world!
And this is your actual output:
Dec 29 11:24:40 kv kernel: Hello world!
If you reduce your log level you will lose the first message but not the second. BR, Larry
Hi,
If you reduce your log level you will lose the first message but not the second.
I would appreciate if somebody can be more specific, how this can be done. I am using the defaults for syslog, which came with Fedora 21 x86_64. Regards, Kevin On Mon, Dec 29, 2014 at 7:11 PM, Larry Martin <Larry@gluelogix.com> wrote:
Hi, Kevin -
This gets me all the time. I think your system is working correctly.
This is the log entry showing your system call:
Dec 29 11:24:40 kv kernel: [67479.245642] Hello world!
And this is your actual output:
Dec 29 11:24:40 kv kernel: Hello world!
If you reduce your log level you will lose the first message but not the second.
BR, Larry
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
I would appreciate if somebody can be more specific, how this can be done. I am using the defaults for syslog, which came with Fedora 21 x86_64.
Kevin, I understand your frustration. I think I used the wrong term. It's not a "log level" thing, but a "dynamic debug" thing. Dynamic Debug lets you turn on your specific message without seeing all other messages of the same "level." But that means you may have to explicitly turn it off. See: google://pr_info http://lwn.net/Articles/487437/ https://lwn.net/Articles/434833/ From the last link:
Turning on dynamic debug causes a new virtual file to appear at /sys/kernel/debug/dynamic_debug/control (modulo any individual preferences for the location of debugfs, naturally). Writing to that file will enable or disable specific debugging functions, as specified by a simple but flexible language.
echo file tpm_nsc.c function init_nsc +p > .../dynamic_debug/control
So your incantation would be something like: echo file myfile.c function init_me -p > mypath/dynamic_debug/control LWN has a dynamic debug howto. I assume it's in kernel docs too. -- Larry Martin www.GlueLogix.com Design, Test and Support of Computerized Systems desk USA 919.342.0201 cell USA 919.641.1733
participants (2)
-
Kevin Wilson -
Larry Martin