Kernel Log Insights with dmesg
Send custom messages to dmesg output
| Option |
Description |
<3> |
err |
<4> |
warning |
<5> |
notice |
<6> |
info |
<7> |
debug |
echo "<6>Hello from userspace" | sudo tee /dev/kmsg >/dev/null
Dump all data with level warning and errors
Dump all data for all avilable options
dmesg --level=emerg,alert,crit,err,warn,notice,info,debug
Dump all data with level lower then warning
Read kernel log in realtime
With human-readable timestamp
dmesg --time-format --syslog
With human-readable timestamp
dmesg --time-format ctime
dmesg with colored human-readable dates
dmesg -T|sed -e 's|\(^.*'`date +%Y`']\)\(.*\)|\x1b[0;34m\1\x1b[0m - \2|g'