printk不适用于内核调试 [英] printk not working for kernel debgugging
问题描述
我在内核代码中放入了一些调试消息. 已经检查了/var/log/messages,dmesg,并且那里没有这样的转储. syslogd正在计算机上运行
I put some debugging messages in the kernel code. have checked /var/log/messages, dmesg and there is no such dump there. syslogd is running on the machine
我也将/proc/sys/kernel/printk更改为 8 4 1 7
i also changed /proc/sys/kernel/printk to 8 4 1 7
知道什么可能是问题吗?
any idea what can be the problem?
推荐答案
最简单的解释是您的printk()
没有被调用.
The easiest explanation is your printk()
is not being called.
在调试此问题时,请保持简单并坚持检查dmesg(1)
输出-所有syslog(3)
/var/log/messages
和基于控制台的输出均与消息中未显示的问题分开,内核的消息缓冲区.
Keep it simple and stick to checking dmesg(1)
output while you're debugging this problem -- all the syslog(3)
/var/log/messages
and the console based output are separate from the issue of the messages not even showing up in the kernel's message buffer.
这篇关于printk不适用于内核调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!