Hacker News new | ask | show | jobs
by makefu 2865 days ago
Isn't `dmesg` just `journalctl -k` on operating systems with systemd enabled?
1 comments

It's more like the opposite. journalctl -k displays the kernel messages, but with a considerable amount of extra overhead because it has to go though the journal daemon.

https://github.com/systemd/systemd/blob/9afd5740391980fee5d8... https://github.com/systemd/systemd/blob/9afd5740391980fee5d8...

Whereas dmesg reads the kernel messages directly from the kernel.

https://github.com/karelzak/util-linux/blob/99c92a4820569970...

Not disputing your point, but some of that extra code does allow you to do cool things. Add a `-k -b=-{n}` to see a previous boot's dmesg, or filtering with `-k --until` for time filtering, &c. All with the same interface you're using to process your other logs too.