ubuntu:systemd:check_the_status_of_a_specific_service
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
ubuntu:systemd:check_the_status_of_a_specific_service [2023/06/03 09:01] – removed - external edit (Unknown date) 127.0.0.1 | ubuntu:systemd:check_the_status_of_a_specific_service [2023/06/03 09:01] (current) – ↷ Page moved from ubuntu:systemd:manage_services:check_the_status_of_a_specific_service to ubuntu:systemd:check_the_status_of_a_specific_service peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Ubuntu - SystemD - Manage Services - Check the status of a specific service ====== | ||
+ | |||
+ | Check the status of a specific service, for example, SSH daemon. | ||
+ | |||
+ | <code bash> | ||
+ | systemctl status cron | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | ● cron.service - Regular background program processing daemon | ||
+ | | ||
+ | | ||
+ | Docs: man:cron(8) | ||
+ | Main PID: 1200 (cron) | ||
+ | Tasks: 1 (limit: 76976) | ||
+ | | ||
+ | CPU: 15ms | ||
+ | | ||
+ | | ||
+ | |||
+ | Jun 03 08:31:48 BigMamba systemd[1]: Started Regular background program processing daemon. | ||
+ | Jun 03 08:31:48 BigMamba cron[1200]: (CRON) INFO (pidfile fd = 3) | ||
+ | Jun 03 08:31:48 BigMamba cron[1200]: (CRON) INFO (Running @reboot jobs) | ||
+ | Jun 03 09:17:01 BigMamba CRON[8424]: pam_unix(cron: | ||
+ | Jun 03 09:17:01 BigMamba CRON[8425]: (root) CMD ( cd / && run-parts --report / | ||
+ | Jun 03 09:17:01 BigMamba CRON[8424]: pam_unix(cron: | ||
+ | Jun 03 09:30:01 BigMamba CRON[9087]: pam_unix(cron: | ||
+ | Jun 03 09:30:01 BigMamba CRON[9088]: (root) CMD ([ -x / | ||
+ | Jun 03 09:30:01 BigMamba CRON[9087]: pam_unix(cron: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== If the Service is not running ===== | ||
+ | |||
+ | <code bash> | ||
+ | systemctl status ssh | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | Unit ssh.service could not be found. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||