Skip to contentSkip to conversation

question about pr_info (newbie)

DISCUSSION Larry Martin 2 participants 3 messages Dec 29, 2014 – Dec 30, 2014 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi, Kevin -

This gets me all the time. I think your system is working correctly.

This is the log entry showing your system call:

Quoted 1 line
Dec 29 11:24:40 kv kernel: [67479.245642] Hello world!

And this is your actual output:

Quoted 1 line
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

#2 lore raw

Hi,

Quoted 2 lines

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

Quoted 20 lines · Larry Martin

Hi, Kevin -

This gets me all the time. I think your system is working correctly.

This is the log entry showing your system call:

Quoted 1 line
Dec 29 11:24:40 kv kernel: [67479.245642] Hello world!

And this is your actual output:

Quoted 1 line
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 at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#3 lore raw
Quoted 6 lines

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:

Quoted 7 lines

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.

Signature · 5 lines
Larry Martin
www.GlueLogix.com
Design, Test and Support of Computerized Systems
desk USA 919.342.0201
cell USA 919.641.1733