Actually i want my driver messages to reach my terminal for debugging purpose. So i just try to check by following below link.
I refred following link :--
I am using a ubuntu in side vmplayer virtual machine. Ubuntu is running in terminal mode inside virtual machine. I am trying to send some message to kernel printk buffer, buts echo command fails.
klog demon is also running i confirmed with following command .
ps aux | grep klogd Cat command on proc printk entry :---
# cat /proc/sys/kernel/printk
4 4 1 7run echo command :---
#sudo echo "<1>Writing critical printk messages from userspace" >/dev/kmsgBut i am not able to get the message on the terminal. I am getting following error when runs above command :--
-bash: /dev/kmsg: Permission deniedPlease suggest how to print on console ?
my actual requirement is to ... send messages of printk() in my driver ... directly to my console. I am just testing here from my console that messages of low priority reaches console or not .
1 Answer
Use:
echo "<1>Writing critical printk messages from userspace" | sudo tee /dev/kmsgSee this answer to understand why.
4