Low Orbit Flux Logo 2 F

Linux Command - dmesg

The Linux command dmesg ( diagnostic messages ) prints out the kernel message buffer. The dmesg buffer is limited in size so the output is also usually captured by syslog or whatever logging service the system is using.

There are more options available but these are what I thought was most relevant and this is probably more than you will ever really use.

Print kernel message buffer:



dmesg

Show kernel messages and keep showing new messages ( like tail -f ):



dmesg -w
dmesg -W    # only new messges

Kernel error or warn messages:



dmesg --level err
dmesg --level err,warn

One page at a time:



dmesg | less

Show messags with a time stamp:



dmesg -T

Human readable format:



dmesg -H

Colorize:



dmesg -L

JSON output:



dmesg -J

-C clear the ring buffer
-c read, then clear