3 ms·
Huh, isn't grepping journalctl output pretty much the same? It even prefixes messages by the binary name.
by iforgotpassword 2y ago
Huh, isn't grepping journalctl output pretty much the same? It even prefixes messages by the binary name.
- mdaniel 2y agoPedantically, they're the unit name which only sometimes matches the binary name
- rezonant 2y agoActually no, they are prefixed by the binary name and the PID number. Technically they are prefixed with: `<date> <host> <binary>[<pid>]`. You can then use `systemctl status <pid>` to identify the unit if you need to. I would imagine this is configurable, and this might be the configuration chosen by my distribution (since I have not changed it myself). It would actually be nice to show the unit name instead of the binary/PID combination, though not strictly necessary. EDIT: Ooh, systemd 239 adds `journalctl -o with-unit` to do this exact thing. There are lots of other formats you can choose from as well. EDIT 2: Unfortunately there's no way to set this as default, you must use `-o with-unit` each time or set up a shell alias :-\