dmesg
dmesg: print the kernel’s log.
Synopsis
dmesg [-w] [-c | -C]
Description
dmesg prints the kernel’s log, oldest first: devices joining and leaving the bus, each event the kernel takes from a device (a motion, a key, a frame), mounts, a process that crashed (past its own error handler: a program’s error is reported by the program, as an exit), and the kernel’s own messages. It keeps the last 200.
Each line is an entry, as OpenOS’s dmesg showed events: the time by the world’s clock, in brackets; where it came from (a device’s name as lsdev(1) gives it, or mount, kernel, a process as its path and pid); the device’s id; and what happened. On a terminal they’re in color, OpenOS’s: the time red, where green, the id yellow.
Options
- -w, –follow
- Waits for more, printing each entry as it comes, until ^C.
- -c
- Clears the log after printing it.
- -C
- Clears the log, printing nothing.
Exit status
0; 1 for an option it does not know.
Examples
dmesg
dmesg -w
dmesg | grep storage
Notes
Linux’s dmesg shows seconds since boot and the kernel’s subsystems’ messages; mcos’s shows the world’s time, and the devices’ events as OpenOS’s did.
See also
lsdev(1)