4

If I do systemctl --user status <myservice> I get the status of the service together with some recent log output. If I do journalctl --user -u <myservice> I get "No Journal files were found.". This applies to multiple user services. This does not apply to non-user/system services.

Debian sid.

2 Answers 2

3

You want journalctl --user-unit <myservice>.

The --user parameter to journalctl is a filter to restrict it to units running under the current user, but it still distinguishes between user and system units. I personally don't understand the design choice of why -u doesn't automatically select the user unit when --user is enabled, especially when it does so for systemctl, but there it is.

1
  • 1
    Now it doesn't say no files found, but it does say "No entries", because the log time is only the last ~30 minutes. Every so often the begin-end window will move forward. Apr 24, 2018 at 3:22
1

You may have to enable persistent storage, because per-user journals are not supported when storing logs in /run tmpfs. This is done with Storage=persistent in /etc/systemd/journald.conf.

If you’d prefer not to do that, the only alternative I know is to add your user to the systemd-journal group, or (in Debian and perhaps Ubuntu) the adm group.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.