0

My system crashed and I am trying to determine what happened by looking at the logs. I want to filter the logs for the different programs that caused the errors. For this I tried:

my_username@pop-os:~$ journalctl -u pop-os\ kernel
Invalid unit name "pop-os kernel" escaped as "pop-os\x20kernel" (maybe you should use systemd-escape?).
-- No entries --

How do I search for pop-os kernel properly?

1 Answers1

1

The -u option specifies systemd unit name, not program name. For example, -u named would show all messages from named.service regardless of what program name they're tagged with. If you don't know the corresponding unit (or if there isn't one), use the -t option instead.

Also, when you see lines like Dec 28 14:38:06 pop-os kernel:, then the program name is just kernel, not pop-os kernel – the field following the date is the system hostname, not part of the program name. So the correct search query would be -t kernel.

(But if you're trying to use journalctl as a dmesg replacement, better use the -k option to get all messages obtained from the kernel buffer.)

grawity
  • 501,077