In order to print this meesage on console, I killed klogd with kill -SIGKILL <pid>
command and restarted klogd with klogd -s -c 2
I still don't see the message on console. What do I miss here?
Thanks in advance.
printk(KERN_ALERT "Hello World\n");
Also look at the level of priority within your syslog.conf (or equivalent) that tells what levels will be logged if your looking at /var/log/messages. Your settings are likely ...
You have to make sure you're in full terminal mode( press Alt+Ctrl+f2 or f3) and not Graphical mode.
then check if the /proc/sys/kernel/printk is having right values
# 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
this will print to the terminal
http://elinux.org/Debugging_by_printing
kern_alert with print to current terminal while kern_emerg will print to all terminals.