When I run eg:

systemctl status nut-monitor.service

what does systemd do?

If I take a look to unit file I don't find any clue:

 cat /usr/lib/systemd/system/nut-monitor.service
Description=Network UPS Tools - power device monitor and shutdown controller
After=local-fs.target network.target nut-server.service

ExecStartPre=-/usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/nut-run.conf
ExecStart=/usr/sbin/upsmon -F


closed as too broad by Stephen Harris, sam, a CVn, G-Man, Kusalananda Jul 13 '16 at 22:02

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


From man systemctl

Show terse runtime status information about one or more units, followed by most recent log data from the journal.
           If no units are specified, show system status. If combined with --all, also show the status of all units (subject
           to limitations specified with -t). If a PID is passed, show information about the unit the process belongs to.

           This function is intended to generate human-readable output. If you are looking for computer-parsable output, use
           show instead. By default this function only shows 10 lines of output and ellipsizes lines to fit in the terminal
           window. This can be changes with --lines and --full, see above. In addition, journalctl --unit=NAME use a similar
           filter for messages and might be more convenient.

Basically systemctl status will show if the service is running, if it is enabled, and it will show last 10 lines from systemd logs.

You can get the same log output by doing journalctl --unit=servicename | tail -10 like for example journalctl --unit=sshd | tail -10

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