On VMWare or on bare metal, Linux display by default live dmesg content directly to stdout.
But when I'm connected through SSH, it doesn't show up even to the command succeeds
How do I forward every dmesg log through SSH ?
dmesg -wH
, watch
or tail
are not what i'm looking for. I don't want to see the whole dmesg, only the live ones and without disrupting my shell.
CodePudding user response:
Thanks @mjf, you were close.
dmesg -W &
doesn't seems to be working since -W
uppercase doesn't exist, but dmesg -w &
with -w
lowercase works perfectly.
CodePudding user response:
To disable messages to console: echo 0 > /proc/sys/kernel/printk
. To read messages at a remote machine: ssh yourname@frommachine "cat /dev/kmsg"
and to get it into a file at the remote machine while watching: ssh yourname@frommachine "cat /dev/kmsg" | tee frommachinessyslog.log
.