Frequently Asked Questions

« Previous
How do I sort incoming mail based on receiver address into different folders?
Next »
How do I send mail from a shell script in Linux and macOS?

windows ubuntu macos xibo network zenworks android storage

106. What fun things can I do with Systemd in Linux?

Figure out what is taking so long to start:

# systemd-analyze blame 1min 46.945s kdump.service 13.838s network.service 873ms postfix.service 602ms dev-md126.device 285ms systemd-udev-trigger.service 258ms tuned.service 186ms systemd-fsck-root.service 55ms httpd.service ... # _

Check how a service is doing:

# systemctl status httpd httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled) Active: active (running) since Fri 2017-04-14 05:22:28 CEST; 3 weeks 5 days ago Docs: man:httpd(8) man:apachectl(8) Process: 6484 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS) Process: 14190 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS) Main PID: 6489 (httpd) Status: "Total requests: 0; Current requests/sec: 0; Current traffic: 0 B/sec" CGroup: /system.slice/httpd.service 6489 /usr/sbin/httpd -DFOREGROUND 14198 /usr/sbin/httpd -DFOREGROUND 14199 /usr/sbin/httpd -DFOREGROUND 14201 /usr/sbin/httpd -DFOREGROUND 14202 /usr/sbin/httpd -DFOREGROUND 14203 /usr/sbin/httpd -DFOREGROUND Apr 14 05:22:28 systemd[1]: Starting The Apache HTTP Server... Apr 14 05:22:28 systemd[1]: Started The Apache HTTP Server. Apr 16 08:47:01 systemd[1]: Reloaded The Apache HTTP Server. Apr 24 05:52:36 systemd[1]: Reloaded The Apache HTTP Server. Apr 30 07:05:06 systemd[1]: Reloaded The Apache HTTP Server. May 07 08:18:32 systemd[1]: Reloaded The Apache HTTP Server. # _

Start, stop and restart units (services):

# systemctl stop httpd # systemctl start httpd # _

Change the default device timeout for slow file systems like btrfs with a lot of snapshots: (ArchLinux Wiki about Fstab)

# grep timeout /etc/fstab LABEL=data7 /data7/ btrfs compress,noatime,x-systemd.device-timeout=0 1 2 # _


This entry linux.systemd was last modified 2018-06-04


This documentation is covered by GNU Free Documentation License. 12 ms