Link Search Menu Expand Document

Collect Kernel Logs

Collecting and monitoring kernel logs

With journalctl command it is possible to print out the message buffer of the kernel. The output of this command typically contains the messages produced by the device drivers.

First you need to enable the developer mode, instructions for that can be found from this article. Once that is done, then open the Terminal app of a Sailfish device or make an SSH connection to the device. Instructions about SSH can be found from this article. Get the super-user rights (root) with this command:


Start monitoring the logs with this command:

journalctl -k -f

The following command picks up fatal messages only:

journalctl -k -f | grep Fatal

It may be good to direct the flow to a file for later investigation, that can be done with this command:

journalctl -k -f > kernel.log

or with this:

journalctl -k -f | grep Fatal > kernel.log

Messages keep flowing to the screen or to the file until <ctrl>C is used to stop it. After you have stopped the message flow and if you have been directing the messages to log file, then you can check the content for example with this command:

cat kernel.log