Displaying Kernel Messages in an SSH Session

Follow

Issue

How can I observe kernel messages in an SSH session the way that I can on the console?

Environment

  • Cumulus Linux, all versions

Resolution

Use the tail command to print kernel messages inline with the session:

cumulus@switch$ sudo -v  
[sudo] password for cumulus:  
cumulus@switch$ sudo tail -f /var/log/kern.log &

sudo -v updates the user's sudo cache, so that tail can be run in the background with &.

To stop printing subsequent kernel messages to the console, use the fg command to bring tail to the foreground, and kill tail with ctrl-C:

cumulus@switch$ fg
^C
cumulus@switch$
Have more questions? Submit a request

Comments

Powered by Zendesk