dmesg gets Human Readable Output

Many Linux command line tools, such as ls or du, have a “human” option to make it more readable by… humans. When you want to get the kernel log, to find otu potential problems, you’d usually run dmesg, which dump the complete log in one go and looks like:

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.11.0-15-generic ([email protected]) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8) ) #25-Ubuntu SMP Thu Jan 30 17:22:01 UTC 2014 (Ubuntu 3.11.0-15.25-generic 3.11.10)
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.11.0-15-generic root=UUID=9c042788-fa75-4fc4-9b12-598c809410e8 ro quiet splash
[    0.000000] KERNEL supported cpus:
[    0.000000]   Intel GenuineIntel
[    0.000000]   AMD AuthenticAMD
[    0.000000]   Centaur CentaurHauls
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bfd9ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bfda0000-0x00000000bfdd0fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000bfdd1000-0x00000000bfdfffff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000bfe00000-0x00000000bfefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000efffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000043effffff] usable

The more recent version of util-linux add support for “human” output option which looks better, and adds some colors for better readability, and shows one page at a time. Run it as dmesg --human
You’ll also notice it won’t wrap long time, e.g. “Command line: …”

Instead of listing the total time on the right, it will display the time taken by an individual tasks. For example:

will show as

when using human readable option.

If your linux-util version is not recent enough, human readable option won’t be available. You can build the code as follows:

If you have an earlier version, you could also get something similar with commands like:

For color, and per task timestamps.


To display the output page per page.

Via Greg KH.

Share this:

Support CNX Software! Donate via cryptocurrencies or become a Patron on Patreon

ROCK Pi 4C Plus
Notify of
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
Weller PCB manufacturer