User Tools

Site Tools


ubuntu:systemd:check_the_status_of_a_specific_service

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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.1ubuntu: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
 +</code>
 +
 +returns:
 +
 +<code bash>
 +● cron.service - Regular background program processing daemon
 +     Loaded: loaded (/lib/systemd/system/cron.service; enabled; vendor preset: enabled)
 +     Active: active (running) since Sat 2023-06-03 08:31:48 BST; 1h 27min ago
 +       Docs: man:cron(8)
 +   Main PID: 1200 (cron)
 +      Tasks: 1 (limit: 76976)
 +     Memory: 468.0K
 +        CPU: 15ms
 +     CGroup: /system.slice/cron.service
 +             └─1200 /usr/sbin/cron -f -P
 +
 +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:session): session opened for user root(uid=0) by (uid=0)
 +Jun 03 09:17:01 BigMamba CRON[8425]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
 +Jun 03 09:17:01 BigMamba CRON[8424]: pam_unix(cron:session): session closed for user root
 +Jun 03 09:30:01 BigMamba CRON[9087]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
 +Jun 03 09:30:01 BigMamba CRON[9088]: (root) CMD ([ -x /etc/init.d/anacron ] && if [ ! -d /run/systemd/system ]; then /usr/sbin/invoke-rc.d anacron start >/dev/null; fi)
 +Jun 03 09:30:01 BigMamba CRON[9087]: pam_unix(cron:session): session closed for user root
 +</code>
 +
 +----
 +
 +===== If the Service is not running =====
 +
 +<code bash>
 +systemctl status ssh
 +</code>
 +
 +returns:
 +
 +<code bash>
 +Unit ssh.service could not be found.
 +</code>
 +
 +----
 +
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki