<div dir="ltr">Hi Martin,<br><br>On Wed, Apr 16, 2014 at 2:46 PM, Martin Kepplinger <<a href="mailto:martink@posteo.de">martink@posteo.de</a>> wrote:<br>> Am 2014-04-16 11:00, schrieb Arun KS:<br>>> Hi Martin,<br>
>><br>>> On Wed, Apr 16, 2014 at 2:13 PM, Martin Kepplinger <<a href="mailto:martink@posteo.de">martink@posteo.de</a>> wrote:<br>>>> I'm on Debian here and I don't really get pr_debug and printk(KERN_DEBUG<br>
>>> ...). Let's stick to pr_debug.<br>>>><br>>>> I have DYNAMIC_DEBUG enabled and<br>>>> root@laptop:/proc/sys/kernel# cat /proc/sys/kernel/printk<br>>>> 7 7 1 7<br>
>> This shows the console log level.<br>>> This file controls the traffic to console. But all the log messages<br>>> will be present in logbuf.<br>><br>> How do I view debug messages from logbuf?<br>
><br>>><br>>>><br>>>> I write a module with pr_debug's. I load the module and I *don't* see<br>>>> anything in /var/log/messages (or anywhere in /var/log/* ). Adding<br>>>> #define DEBUG doesn't help.<br>
>>><br>>>> /sys/kernel/debug/dynamic_debug/control has the pr_debug entries I use<br>>>> in my loaded module.<br>>>><br>>>> In short: How do I see debug log messages? Using pr_info() works as<br>
>>> expected. What am I missing? Do I need to edit my Makefile?<br>>> Did you enable dynamic printing for your file?<br>>><br>>> Below command enables dynamic printing for file sdhci.c.<br>>> echo 'file sdhci.c +p' > /sys/kernel/debug/dynamic_debug/control<br>
><br>> well. I tried that. The thing is, the pr_debug() symbols are in<br>> "control" only after "insmod my_module". Then I can echo -n 'file<br>> my_mobule.c +p' > control<br>> But my pr_debug() messages get printed directly after insmod, basically<br>
> in my module_init function. Enabling my file doesn't output anything in<br>> /var/log/*<br>So now you know why your pr_debug is absent in logbuf.<br><br>You can make your module as a built in and use bootargs.<br>
<br>eg:<br>dyndbg="file your_filename.c +p"<div><br></div><div>Thanks,</div><div>Arun<br><br><br>><br>>><br>>><br>>> Thanks,<br>>> Arun<br>>>><br>>>> thanks!<br>>>> martin<br>
>>><br>>>> --<br>>>> Martin Kepplinger<br>>>> e-mail martink AT posteo DOT at<br>>>> chat (XMPP) martink AT jabber DOT at<br>>>><br>>>> _______________________________________________<br>
>>> Kernelnewbies mailing list<br>>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>><br>>> _______________________________________________<br>>> Kernelnewbies mailing list<br>>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
>><br>><br>><br>> _______________________________________________<br>> Kernelnewbies mailing list<br>> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a></div>
</div>