User:ScotXW/systemd

systemd is a system management daemon designed for Linux and programmed exclusively for the Linux API. For systems using it, it is the first process which is executed in user space during the Linux startup process. Therefore, systemd serves as the root of the user space's process tree. The name systemd adheres to the Unix convention of making daemons easier to distinguish by having letter d as the last one in their actual filenames.

Components of the systemd software bundle
To unnecessarily confuse matters, systemd is not just the name of the init daemon but can also refer to the entire software bundle around systemd. This includes the daemons systemd, journald, logind and networkd and a couple of other low-level components such as libraries and utilities.

Systemd is published as free and open-source software under the terms of the GNU Lesser General Public License version 2.1 or later.

systemd
Systemd was developed for Linux to replace the init system inherited from UNIX System V and Berkeley Software Distribution (BSD) operating systems. Like init, systemd is a daemon that manages other daemons. All daemons, including systemd, are background processes. Systemd is the first daemon to start (during booting) and the last daemon to terminate (during shutdown).

Lennart Poettering and Kay Sievers, the software engineers who initially developed systemd, sought to surpass the efficiency of the init daemon in several ways. They wanted to improve the software framework for expressing dependencies; to allow more processing to be done concurrently or in parallel during system booting; and to reduce the computational overhead of the shell.

Systemd's initialization instructions for each daemon are recorded in a declarative configuration file rather than a shell script. For inter-process communication, systemd makes Unix domain sockets and D-Bus available to the running daemons. Systemd is also capable of aggressive parallelization.

Among systemd's auxiliary features are a cron-like job scheduler called systemd Calendar Timers, and an event logging subsystem called journald. The system administrator may choose whether to log system events with systemd or syslog. Systemd's logfile is a binary file. The state of systemd itself can be preserved in a snapshot for future recall.

In April 2012, the source tree for udev (a device manager for the Linux kernel, which handles the /dev directory and all user space actions when adding/removing devices, including firmware loading) was merged into systemd.

Following its integrated approach, systemd also provides replacements for various daemons and utilities, including sysvinit, pm-utils, inetd, acpid, syslog, watchdog, cron and atd.


 *  is a system and service manager for Linux operating systems.
 *  may be used to introspect and control the state of the systemd system and service manager.
 *  may be used to determine system boot-up performance statistics and retrieve other state and tracing information from the system and service manager.

cgroups
Because systemd tracks processes using the Linux kernel's cgroups instead of process identifiers (PIDs), daemons cannot "escape" systemd; not even by double-forking.

Systemd does not only use cgroups, but also augments them with ' and ', two utility programs to facilitate the creation and management of software containers

cgroups interface


Since version 205, systemd offers ControlGroupInterface, an API to the Linux kernel cgroups. The Linux kernel cgroups are adapted to support kernfs, and are being modified to support a unified hierarchy.

systemd-ui
Systemd-ui, also known as systemadm, is a simple GTK+-based graphical front-end for systemd. It provides a simple user interface to manage services, and a graphical agent to request passwords from the user. the systemadm program has received little development or maintenance in the last few years, because development focus has shifted to command-line tools like systemctl and systemd-analyze. However, systemadm remains the only graphical application for systemd management.

systemd-kcm
Systemd-kcm is a KDE control module for graphically managing systemd and related services such as logind. * https://rthomsen6.wordpress.com/2015/07/06/systemd-kcm-1-2-0-released/

In Debian it is called "kde-config-systemd": https://packages.debian.org/sid/kde-config-systemd This package is a KDE Control Center module for the systemd daemon. It is capable of starting and stopping systemd units. In addition, it allows for the configuration of several systemd parameters.

logind
In version 30, systemd-logind was integrated, a tiny daemon that manages user logins and seats in various ways. systemd-logind is an integrated login manager that offers multiseat improvements and replaces ConsoleKit, which is no longer maintained. For X11 display managers the switch to logind requires a minimal amount of porting.
 * 1) https://dvdhrm.wordpress.com/2013/08/24/session-management-on-linux/
 * 2) https://dvdhrm.wordpress.com/2013/08/24/how-vt-switching-works/
 * 3) https://dvdhrm.wordpress.com/2013/08/25/sane-session-switching/
 * 4) XDC2013 (23 September 2013): David Herrmann - DRM Security / Video
 * 5) XDC2013 (23 September 2013): David Herrmann - Journey through 20 years of CONFIG_VT
 * http://blogs.gnome.org/ovitters/2014/09/07/systemd-in-gnome-3-14-and-beyond/
 * kmscon

In version 216 logind learned a new session type "web", for use in projects like Cockpit which register web clients as PAM sessions.


 *  may be used to introspect and control the state of the login manager systemd-logind.
 *  – the journal service configuration file configures various parameters of the systemd login manager.

GNOME integration
In the interest of enhancing the interoperability between systemd and GNOME, Lennart Poettering asked to consider making systemd an external dependency of GNOME 3.2.

In November 2012, the GNOME Project concluded that basic GNOME functionality should not rely on systemd. However, in contradiction of this statement, GNOME 3.8 introduced a de facto dependency on systemd-logind by introducing session management behaviors which depend on how systemd operates. While the developers of Gentoo attempted to adapt these changes in OpenRC, the implementation contained too many bugs, causing the distribution to mark systemd as a dependency of GNOME.

At the same time, GNOME is pushing further integration of systemd. For Mutter version 3.13.2, mutter-launch was replaced with logind integration.

journald
systemd-journald is a daemon doing logging. The system administrator may choose whether to log system events with systemd-journald or syslog-ng or rsyslog. In version 216 LZ4 replaced xz for larger journal fields.


 *  may be used to query the contents of the systemd(1) journal as written by systemd-journald.
 *  – the journal service configuration file configures various parameters of the systemd journal service

networkd
In version 209, networkd was integrated, which provides abilities for systemd to perform various network configurations; as of this version, support is limited to statically assigned addresses and basic support for bridging configuration.



resolvd
systmed-resolvd is a pretty complete caching DNS and LLNMR stub resolver since version 216.

timesyncd
In version 216 systemd-timesyncd has been updated to automatically acquire NTP server information from systemd-networkd, which might have been discovered via DHCP.

readahead
systemd-readahead-collect.service is a service that collects disk usage patterns at boot time.

TODO

 * http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html

Libraries
A new library systemd-terminal has been added that implements full TTY stream parsing and rendering. This library is supposed to be used later on for implementing a full userspace VT subsystem, replacing the current kernel implementation. Cf. kmscon.

Controversy
Adoption of systemd has been very controversial. Linus Torvalds and Theodore Ts'o have expressed reservations about the systemd philosophy and especially the attitudes of the key developers toward users and bug reports. Articles run in Linux Advocates have characterized systemd as "the new PulseAudio," and as "an accident waiting to happen." One Fuduntu contributor is quoted as stating that systemd has limited software choice:

"Systemd, whether by design, or circumstance, is largely becoming non-optional. Inclusion of core technologies such as dbus and udev are reducing choice for linux users and developers, rather than expanding them—which is the very antithesis of the idea of Free/Open Source software."

In a 2012 interview, Slackware's founder Patrick Volkerding also expressed reservations about the systemd architecture:

"Concerning systemd, I do like the idea of a faster boot time (obviously), but I also like controlling the startup of the system with shell scripts that are readable, and I'm guessing that's what most Slackware users prefer too. I don't spend all day rebooting my machine, and having looked at systemd config files it seems to me a very foreign way of controlling a system to me, and attempting to control services, sockets, devices, mounts, etc., all within one daemon flies in the face of the UNIX concept of doing one thing and doing it well."

In January 2013, Lennart Poettering attempted to address concerns about systemd in a blog post called The Biggest Myths.

Eric S. Raymond declined to comment on systemd at first, but stated, "I'm aware there’s a controversy." Then in a March 2014 interview on Slashdot, he expressed some concerns about the goals and architecture of systemd:

"I want to study it carefully because I'm a bit troubled by what I hear about the feature set and the goals. From that, I fear it may be one of those projects that is teetering right at the edge of manageable complexity – OK as long as an architect with a strong sense of design discipline is running things, but very prone to mission creep and bloat and likely to turn into a nasty hairball over the longer term."

Adoption
In May 2011, Fedora became the first major Linux distribution to enable systemd by default. , Slackware does not support or use systemd, but Slackware's lead Patrick Volkerding has not ruled out the possibility of switching to it.