I'm trying to learn basic systemd usage and I've run into a confusing issue with user service units.
When running ordinary services with systemctl start some.service I can find the full log for this service (including what it has printed to stdout / stderr, as I understand it) by running sudo journalctl –unit some.service.
Consider the example servicefile chatty.service:
[Service]
ExecStart=/usr/bin/echo "test from chatty.service"
When I place this service file in ~/.config/systemd/user/chatty.service and run it with systemctl –user start chatty.service I cannot find its output sent to stdout in journalctl, neither with plain journalctl nor with journalctl –user. I only get the following output in both:
Jan 15 19:16:52 qbd-x230-suse.site systemd[1168]: Starting chatty.service...
Jan 15 19:16:52 qbd-x230-suse.site systemd[1168]: Started chatty.service.
And journalctl –unit chatty.service does not return anything at all (with or without –user makes no difference).
While if I move the same service file to /etc/systemd/system and run it with sudo systemd start chatty.service I then get the following output when I run sudo journalctl –unit chatty.service:
Jan 15 19:28:08 qbd-x230-suse.site systemd[1]: Starting chatty.service...
Jan 15 19:28:08 qbd-x230-suse.site systemd[1]: Started chatty.service.
Jan 15 19:28:08 qbd-x230-suse.site echo[27098]: test from chatty.service
It seems like the user service unit isn't as well integrated somehow, is this expected, am I missing something or is it a bug?
I am running openSUSE 13.1 x86-64, with systemd 208 (default install).
Best Answer
Use
--user-unit
option, and in your case...