Posted: . At: 10:22 AM. This was 6 years ago. Post ID: 12122
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Get information about running services with systemd on Ubuntu 17.10.


This is an easy way to get information about running services on your Ubuntu machine. I am after user services, so I am using systemctl to get this information. This is very easy.

Get information about a certain service.

jason@kaio:~$ systemctl status --user pulseaudio
● pulseaudio.service - Sound Service
   Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

This command will list all user services. This is in a tree view format, branching off from the user ID # 1000. This is all of the services a single user is running when logged into an Ubuntu Unity desktop session.

jason@kaio:~$ systemctl status --user
● kaio
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Fri 2018-05-25 09:33:19 AEST; 12min ago
   CGroup: /user.slice/user-1000.slice/user@1000.service
           ├─gnome-terminal-server.service
           │ ├─3895 /usr/lib/gnome-terminal/gnome-terminal-server
           │ └─3905 bash
           ├─gvfs-gphoto2-volume-monitor.service
           │ └─1324 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
           ├─at-spi-dbus-bus.service
           │ ├─1148 /usr/lib/at-spi2-core/at-spi-bus-launcher
           │ ├─1159 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
           │ └─1165 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
           ├─dbus.service
           │ ├─ 804 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
           │ ├─1247 /usr/lib/gnome-shell/gnome-shell-calendar-server
           │ ├─1267 /usr/lib/gnome-online-accounts/goa-daemon
           │ ├─1309 /usr/lib/gnome-online-accounts/goa-identity-service
           │ └─1405 /usr/lib/dconf/dconf-service
           ├─gvfs-udisks2-volume-monitor.service
           │ └─1278 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
           ├─evolution-calendar-factory.service
           │ ├─1357 /usr/lib/evolution/evolution-calendar-factory
           │ ├─1385 /usr/lib/evolution/evolution-calendar-factory-subprocess --factory contacts --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx1357x2 --own-path /org/gnome/evolution/datase
           │ └─1412 /usr/lib/evolution/evolution-calendar-factory-subprocess --factory local --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.Calendarx1357x3 --own-path /org/gnome/evolution/dataserve
           ├─evolution-source-registry.service
           │ └─1251 /usr/lib/evolution/evolution-source-registry
           ├─gvfs-metadata.service
           │ └─3647 /usr/lib/gvfs/gvfsd-metadata
           ├─gvfs-mtp-volume-monitor.service
           │ └─1311 /usr/lib/gvfs/gvfs-mtp-volume-monitor
           ├─gvfs-goa-volume-monitor.service
           │ └─1289 /usr/lib/gvfs/gvfs-goa-volume-monitor
           ├─gvfs-afc-volume-monitor.service
           │ └─1318 /usr/lib/gvfs/gvfs-afc-volume-monitor
           ├─init.scope
           │ ├─773 /lib/systemd/systemd --user
           │ └─775 (sd-pam)
           ├─evolution-addressbook-factory.service
           │ ├─1410 /usr/lib/evolution/evolution-addressbook-factory
           │ └─1429 /usr/lib/evolution/evolution-addressbook-factory-subprocess --factory local --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx1410x2 --own-path /org/gnome/evolution/dat
           └─gvfs-daemon.service
             ├─ 873 /usr/lib/gvfs/gvfsd
             ├─ 878 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
             └─1526 /usr/lib/gvfs/gvfsd-trash --spawner :1.3 /org/gtk/gvfs/exec_spaw/0

Getting information about the dbus.service. This shows when it was loaded.

jason@kaio:~$ systemctl status --user dbus.service
● dbus.service - D-Bus User Message Bus
   Loaded: loaded (/usr/lib/systemd/user/dbus.service; indirect; vendor preset: enabled)
   Active: active (running) since Fri 2018-05-25 09:33:20 AEST; 26min ago
     Docs: man:dbus-daemon(1)
 Main PID: 804 (dbus-daemon)
   CGroup: /user.slice/user-1000.slice/user@1000.service/dbus.service
           ├─ 804 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation
           ├─1247 /usr/lib/gnome-shell/gnome-shell-calendar-server
           ├─1267 /usr/lib/gnome-online-accounts/goa-daemon
           ├─1309 /usr/lib/gnome-online-accounts/goa-identity-service
           └─1405 /usr/lib/dconf/dconf-service
 
May 25 09:33:55 kaio nautilus[3451]: g_key_file_load_from_file: assertion 'file != NULL' failed
May 25 09:33:55 kaio nautilus[3451]: Could not establish a connection to Tracker: Failed to load SPARQL backend: Key file does not have group “DomainOntology”
May 25 09:33:55 kaio nautilus[3451]: g_key_file_load_from_file: assertion 'file != NULL' failed
May 25 09:33:55 kaio nautilus[3451]: Could not establish a connection to Tracker: Failed to load SPARQL backend: Key file does not have group “DomainOntology”
May 25 09:33:55 kaio nautilus[3451]: g_key_file_load_from_file: assertion 'file != NULL' failed
May 25 09:33:55 kaio nautilus[3451]: Could not establish a connection to Tracker: Failed to load SPARQL backend: Key file does not have group “DomainOntology”
May 25 09:34:31 kaio dbus-daemon[804]: Activating via systemd: service name='org.gtk.vfs.Metadata' unit='gvfs-metadata.service'
May 25 09:34:31 kaio dbus-daemon[804]: Successfully activated service 'org.gtk.vfs.Metadata'
May 25 09:44:17 kaio dbus-daemon[804]: Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service'
May 25 09:44:17 kaio dbus-daemon[804]: Successfully activated service 'org.gnome.Terminal'

Show information about the system environment.

jason@kaio:~$ systemctl show | grep Environment
Environment=LANG=en_AU.UTF-8 LANGUAGE=en_AU:en PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Show the boot time of your Linux system.

jason@kaio:~$ systemd-analyze
Startup finished in 5.999s (kernel) + 1min 10.805s (userspace) = 1min 16.805s

This same data about the dbus service may also be output without the pager.

jason@kaio:~$ systemctl --no-pager -l status dbus.service
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: active (running) since Fri 2018-05-25 09:32:57 AEST; 47min ago
     Docs: man:dbus-daemon(1)
 Main PID: 377 (dbus-daemon)
    Tasks: 1 (limit: 19660)
   CGroup: /system.slice/dbus.service
           └─377 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
 
May 25 09:33:31 kaio dbus[377]: [system] Activating via systemd: service name='fi.w1.wpa_supplicant1' unit='wpa_supplicant.service'
May 25 09:33:31 kaio dbus[377]: [system] Successfully activated service 'fi.w1.wpa_supplicant1'
May 25 09:33:31 kaio dbus[377]: [system] Successfully activated service 'org.freedesktop.GeoClue2'
May 25 09:33:37 kaio dbus[377]: [system] Activating via systemd: service name='org.freedesktop.locale1' unit='dbus-org.freedesktop.locale1.service'
May 25 09:33:37 kaio dbus[377]: [system] Activating via systemd: service name='org.freedesktop.ColorManager' unit='colord.service'
May 25 09:33:38 kaio dbus[377]: [system] Successfully activated service 'org.freedesktop.ColorManager'
May 25 09:33:38 kaio dbus[377]: [system] Successfully activated service 'org.freedesktop.locale1'
May 25 09:33:40 kaio dbus[377]: [system] Activating via systemd: service name='org.freedesktop.fwupd' unit='fwupd.service'
May 25 09:33:26 kaio dbus[377]: [system] Successfully activated service 'org.freedesktop.fwupd'
May 25 09:33:33 kaio dbus[377]: [system] Failed to activate service 'org.bluez': timed out

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.