How to see full log from systemctl status service?
I check service status with
systemctl status service-name.
By default, I see few rows only, so I add
-n50to see more.
Sometimes, I want to see full log, from start. It could have 1000s of rows.
Now, I check it with
-n10000but that doesn't look like neat solution.
Is there an option to check full systemd service log similar to
Just use the
journalctlcommand, as in:
journalctl -u service-name.service
Or, to see only log messages for the current boot:
journalctl -u service-name.service -b
For things named
<something>.service, you can actually just use
<something>, as in:
journalctl -u service-name
But for other sorts of units (sockets, targets, timers, etc), you need to be explicit.
In the above commands, the
-uflag is short for
--unit, and specifies the name of the unit in which you're interested.
-bis short for
--boot, and restricts the output to only the current boot so that you don't see lots of older messages. See the journalctl man page for more information.
appending `-e` will start the log at the end removing the need to scroll, but without printing the entire log beforehand.
@viveksinghggits generally, although it depends on your configuration, but you still need to use `journalctl` to access them.
Actually, this was not helpful for me - I want only the output since the unit was (re)started. `sudo systemctl -n 99999 status` gives me that, but apparently journalctl can only filter "from boot", not "from service start".