A common task one wishes to do, when debugging a service that fails to load, is to look at all log from the last time the service was started.
For example, given
Jul 25 08:18:20 raspberrypi ngrok[3105]: Incorrect Usage: flag provided but not defined: -log
Jul 25 08:20:04 raspberrypi systemd[1]: ngrok@ssh.service holdoff time over, scheduling restart.
Jul 25 08:20:04 raspberrypi systemd[1]: Stopping Share local port(s) with ngrok...
Jul 25 08:20:04 raspberrypi systemd[1]: Starting Share local port(s) with ngrok...
Jul 25 08:20:04 raspberrypi systemd[1]: Started Share local port(s) with ngrok.
Jul 25 08:20:04 raspberrypi ngrok[5474]: t=2016-07-25T08:20:04+0000 lvl=warn msg="failed to get home directory, using $HOME instead" err="user: Current not implemented on linux/arm" $HOME=
Jul 25 08:20:04 raspberrypi ngrok[5474]: Failed to open log file '/dev/stdout': open /dev/stdout: no such device or address
I want to see all lines since Jul 25 08:20:04 raspberrypi systemd[1]: Starting Share local port...
.
Something like journalctl --boot
, but from the last time service was started.
Is that possible?
Likewise, something like --list-boots
that lists all the times systemctl has started or stopped the service would allow me to mimic journalctl --last-start -u svc
behavior I wanted.