Skip to content

Why systemd in Embedded Linux Systems?

Recently I was asked why use systemd vs sysvinit in embedded systems?  There are many discussions on this, and really most of the reasons people use it for servers and desktops are also valid for embedded systems.  Lennart Poettering’s articles explain very well why you might want to consider systemd.  A few things that rank high on my list:

  1. systemd systems generally boot must faster than sysvinit systems.
  2. systemd monitors every process it starts, so you know conclusively if your app is still running.
  3. systemd has flexible mechanisms for restarting apps that crash, and rebooting if you get so many restarts in X amount of time.  This is very important in embedded systems where you need to keep things running.
  4. systemd logging (journald) is very flexible.  The stdout of every process that is started by systemd is captured in the journal.  You can also capture kernel messages in the journal.  The end result is you have one place to look for system logs.
  5. systemd has support for watchdog chaining — again, important for many embedded systems.
  6. The systemd dependency mechanism is very flexible.
  7. systemd has tools to debug the init process: systemd-analyze, systemd-cgls, systemd-cgtop, bootchart, pybootchargui, etc.
  8. on demand launch of services can improve boot time and conserve resources.

In summary, with systemd I have more control over the system startup and shutdown, and have better mechanisms to monitor things to make sure they stay running.