0

このメッセージをコンソールに出力するために、kill -SIGKILL <pid>コマンドでklogd を強制終了し、 klogd -s -c 2 I still don't see the message on console で klogd を再起動しました。ここで何が恋しいですか?前もって感謝します。

printk(KERN_ALERT "Hello World\n");
4

2 に答える 2

2

グラフィカルモードではなく、フルターミナルモード(Alt + Ctrl + f2またはf3を押す)になっていることを確認する必要があります。

次に、/ proc / sys / kernel/printkが正しい値を持っているかどうかを確認します

# cat /proc/sys/kernel/printk

4 4 1 7

my current setting are above. You can use echo 8 > /proc/sys/kernel/printk to print everything. for kern_alert 4 is enough.

for testing you can use below from full terminal mode.

#echo "<1>Writing critical printk messages from userspace" >/dev/kmsg

これは端末に印刷されます

http://elinux.org/Debugging_by_printing

kern_alertは現在の端末に出力し、kern_emergはすべての端末に出力します。

于 2012-10-19T18:10:36.273 に答える
0

また、/var/log/messages を見た場合にどのレベルがログに記録されるかを示す、syslog.conf (または同等のもの) 内の優先度のレベルを調べます。あなたの設定はおそらく...

#define KERN_EMERG   "<0>" /* system is unusable               */        
#define KERN_ALERT   "<1>" /* action must be taken immediately */
#define KERN_CRIT    "<2>" /* critical conditions              */
#define KERN_ERR     "<3>" /* error conditions                 */
#define KERN_WARNING "<4>" /* warning conditions               */
#define KERN_NOTICE  "<5>" /* normal but significant condition */
#define KERN_INFO    "<6>" /* informational                    */
#define KERN_DEBUG   "<7>" /* debug-level messages             */
于 2012-10-19T20:08:45.847 に答える