0

When I run a service from a terminal it shows many logs/errors/successes in output. But if I run it with same command options as a service (under systemd on Debian Linux) it does not show any terminal window or any output. So where does that logs go? Is it redirected to /dev/null?

  • This question is far too broad to answer without it stating the operating system, and indeed (for some operating systems) the choice of service management subsystem. Is it Solaris? AIX? void Linux? – JdeBP Feb 21 at 12:25
  • That's a kernel. You need to state the operating system, and for several Linux-based operating systems you need to further state the specific choice of service management tools. – JdeBP Feb 21 at 12:32
1

Issue the systemctl show --property=StandardOutput your.service command to see where the standard output of your service goes. The usual default is the systemd journal. You can dump the journal with the journalctl command (which has the --unit option to filter the output by service, but which is unreliable for short lived services). There is an analogous StandardError service property as well.

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.