systemctl – service exit codes and status information explanation

When checking a service status via systemctl

systemctl status docker

the output is something like

● docker.service - Docker Application Container Engine
  Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
  Active: inactive (dead) (Result: exit-code) since Mon 2018-03-19 13:52:21 CST; 4min 32s ago
  Docs: https://docs.docker.com
  Process: 6001 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=205/LIMITS)
  Main PID: 6001 (code=exited, status=205/LIMITS)

The question is about the part in bold: the main process exit code and status information.
Is there a list of all the codes and statuses along with their explanation ?


I know that most times it’s self-explanatory (and I know the answer to the question here) but lately we get this question a lot at work (some people search via google but can’t find it, other people open the systemd.service man page, search for e.g. code 203 and don’t find it…) so I thought I might as well put it here so it’s easier for people to find the answer via google.

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Yes, but only since 2017 when Jan Synacek finally documented them in the systemd manual. Your work colleagues are simply reading the wrong page of the manual. ☺

Further reading

Method 2

Here is the list of status codes for systemctl

https://www.freedesktop.org/software/systemd/man/systemctl.html#Exit%20status


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x