User:ScotXW/systemd
{{lowercase}}
{{Infobox software
|name = systemd
|title = systemd
|author = Lennart Poettering, Kay Sievers
|developer = Lennart Poettering, Kay Sievers and others
|released = {{Start date|2010|03|30|df=yes}}
|frequently_updated = yes
|programming_language = C{{citation |url=http://www.ohloh.net/p/systemd |publisher=Ohloh |work=Analysis Summary |title=systemd |accessdate=2011-06-16}}
|operating_system = Linux
|platform =
|language =
|status =
|genre = Init daemon
|license = first GPLv2+, currently GNU LGPL 2.1+
|website = {{URL|http://freedesktop.org/wiki/Software/systemd/ |freedesktop.org/…/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.{{citation |url=http://h-online.com/-1565543 |archiveurl=http://web.archive.org/web/20121014173559/http://www.h-online.com/open/features/Control-Centre-The-systemd-Linux-init-system-1565543.html|archivedate=14 October 2012|title=Control Centre: The systemd Linux init system |author=Lennart Poettering, Kay Sievers, Thorsten Leemhuis |publisher=The H |date=2012-05-08 |accessdate=2012-09-09}}
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.{{citation |url=http://0pointer.de/blog/projects/systemd-update-3.html |title=systemd Status Update |author=Lennart Poettering |date=2012-04-21 |accessdate=2012-04-28}}
= systemd =
{{See also|Linux startup process}}
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,{{citation |url=http://cgit.freedesktop.org/systemd/systemd/tree/README |publisher=freedesktop.org |work=systemd |title=README |accessdate=2012-09-09}} 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.{{cite web|url=http://www.phoronix.com/scan.php?page=news_item&px=MTI4NTk |title=[Phoronix] Systemd Dreams Up New Feature, Makes It Like Cron |publisher=Phoronix.com |date=2013-01-28 |accessdate=2014-01-22}} 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.{{citation |last=Sievers |first=Kay |title=Commit importing udev into systemd |url=http://cgit.freedesktop.org/systemd/systemd/commit/?id=19c5f19d69bb5f520fa7213239490c55de06d99d |publisher=freedesktop.org |work=systemd |accessdate=25 May 2012}}
Following its integrated approach, systemd also provides replacements for various daemons and utilities, including sysvinit, pm-utils, inetd, acpid, syslog, watchdog, cron and atd.
- {{man|1|systemd|Fedora||inline}} is a system and service manager for Linux operating systems.
- {{man|1|systemctl|Fedora||inline}} may be used to introspect and control the state of the systemd system and service manager.
- {{man|1|systemd-analyze|Fedora||inline}} may be used to determine system boot-up performance statistics and retrieve other state and tracing information from the system and service manager.
== {{Anchor|NSPAWN|MACHINECTL}} cgroups ==
File:Linux kernel unified hierarchy cgroups and systemd.svg will be accessible exclusively by systemd through {{man|1|systemd-nspawn|Fedora||inline}}]]
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 {{man|1|systemd-nspawn|Fedora||inline}} and {{man|1|machinectl|Fedora||inline}}, two utility programs to facilitate the creation and management of software containers {{cite web
| url = https://lwn.net/Articles/572957/
| title = Creating containers with systemd-nspawn
| date = 2013-11-07 | accessdate = 2014-07-30
| author = Jake Edge | publisher = LWN.net
}}
{{clear}}
=== cgroups interface ===
File:Linux API.svg is composed out of the System Call Interface of the Linux kernel, the GNU C Library (by GNU), libcgroup,{{cite web |url=http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/ |title=ControlGroupInterface |publisher=freedesktop.org}} libdrm, libalsa and libevdev{{cite web |url=http://www.freedesktop.org/wiki/Software/libevdev/ |title=libevdev |publisher=freedesktop.org}} (by freedesktop.org).]]
Since version 205, systemd offers ControlGroupInterface, an API to the Linux kernel cgroups.http://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/ The Linux kernel cgroups are adapted to support kernfs,{{cite web |url=https://lkml.org/lkml/2014/1/28/502 |title=cgroup: convert to kernfs |date=2014-01-28}} and are being modified to support a unified hierarchy.{{cite web |url=https://lkml.org/lkml/2014/3/13/503 |title=cgroup: prepare for the default unified hierarchy |date=2014-03-13}}
{{clear}}
== systemd-ui ==
Systemd-ui, also known as systemadm, is a simple GTK+-based graphical front-end for systemd.{{cite web |url=https://packages.debian.org/jessie/systemd-ui |title=Details of package systemd-ui in Debian "Jessie" 8 |accessdate=2014-07-31 |publisher=Debian}} It provides a simple user interface to manage services, and a graphical agent to request passwords from the user. {{As of|2014}} 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.
{{clear}}
= 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.[http://www.freedesktop.org/wiki/Software/ConsoleKit/ ConsoleKit official website]{{cite web|url=http://www.freedesktop.org/software/systemd/man/systemd-logind.service.html |title=systemd-logind.service |publisher=Freedesktop.org |date= |accessdate=2014-02-17}} For X11 display managers the switch to logind requires a minimal amount of porting.{{cite web |url=http://www.freedesktop.org/wiki/Software/systemd/writing-display-managers/ |title=How to hook up your favorite X11 display manager with systemd |publisher=Freedesktop.org}}
- https://dvdhrm.wordpress.com/2013/08/24/session-management-on-linux/
- https://dvdhrm.wordpress.com/2013/08/24/how-vt-switching-works/
- https://dvdhrm.wordpress.com/2013/08/25/sane-session-switching/
- XDC2013 (23 September 2013): [http://www.x.org/wiki/Events/XDC2013/XDC2013DavidHerrmannDRMSecurity/ David Herrmann - DRM Security] / [https://www.youtube.com/results?search_query=Lo_jZYDzek8&search_type=&aq=f Video]
- XDC2013 (23 September 2013): [http://www.x.org/wiki/Events/XDC2013/XDC2013DavidHerrmannVT/ 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.
- {{man|1|loginctl|Fedora||inline}} may be used to introspect and control the state of the login manager systemd-logind.
- {{man|5|logind.conf|Fedora||inline}} – the journal service configuration file configures various parameters of the systemd login manager.
{{clear}}
== 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.{{citation |url=http://mail.gnome.org/archives/desktop-devel-list/2011-May/msg00427.html |author=Lennart Poettering |publisher=GNOME |work=desktop-devel mailing list |title=systemd as an external dependency |date=2011-05-18 |accessdate=2011-05-26}}
In November 2012, the GNOME Project concluded that basic GNOME functionality should not rely on systemd.{{citation |url=https://mail.gnome.org/archives/release-team/2012-November/msg00015.html |title=20121104 meeting minutes |author=Frederic Peters |work=GNOME release-team mailing list |date=2011-11-04 |accessdate=2013-01-14}} 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.{{cite web|last=Vitters|first=Olav|title=GNOME and logind+systemd thoughts|url=http://blogs.gnome.org/ovitters/2013/09/25/gnome-and-logindsystemd-thoughts/|accessdate=24 April 2014}}{{cite web|title=GNOME 3.10 arrives with experimental Wayland support|url=http://www.zdnet.com/gnome-3-10-arrives-with-experimental-wayland-support-7000021185/|work=ZDNet|accessdate=24 April 2014}}
At the same time, GNOME is pushing further integration of systemd.{{cite web |url=https://wiki.gnome.org/Initiatives/Systemd |title=GNOME initiatives: systemd |accessdate=2014-05-01}}
For Mutter version 3.13.2, mutter-launch was replaced with logind integration.{{cite web |url=https://git.gnome.org/browse/mutter/commit/?id=dcf64ca1678a2950842708bee146f09a063ed828 |title=Mutter 3.13.2: launcher: Replace mutter-launch with logind integration |date=2014-05-19 |accessdate=2014-05-28}}
= 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.
- {{man|1|journalctl|Fedora||inline}} may be used to query the contents of the systemd(1) journal as written by systemd-journald.
- {{man|5|journald.conf|Fedora||inline}} – the journal service configuration file configures various parameters of the systemd journal service
{{clear}}
= 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.{{cite web |url=https://plus.google.com/+TomGundersen/posts/bDQCP5ZyQ3h |title=Networking in +systemd - 1. Background |date=2013-11-27 |accessdate=2014-02-22}}{{cite web |url=https://plus.google.com/+TomGundersen/posts/JhaBNn8Ytwu |title=Networking in +systemd - 2. libsystemd-rtnl |date=2013-11-27 |accessdate=2014-02-22}}{{cite web |url=https://plus.google.com/+TomGundersen/posts/anS8GseSAfw |title=Networking in +systemd - 3. udev |date=2013-11-27 |accessdate=2014-02-22}}{{cite web |url=https://plus.google.com/+TomGundersen/posts/8d1tzMJWppJ |title=Networking in +systemd - 4. networkd |date=2013-11-27 |accessdate=2014-02-22}}{{cite web |url=https://plus.google.com/+TomGundersen/posts/U6Es8bpmMbP |title=Networking in +systemd - 5. the immediate future |date=2013-11-27 |accessdate=2014-02-22}}
- {{man|1|networkctl|Fedora||inline}}
{{clear}}
= resolvd =
systmed-resolvd is a pretty complete caching DNS and LLNMR stub resolver since version 216.{{cite web |url=http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html |title=[systemd-devel] [ANNOUNCE] systemd 216 |date=2014-08-19}}
= 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.{{cite web |url=http://www.freedesktop.org/software/systemd/man/systemd-readahead.html |title=systemd-readahead}}
TODO
- http://lists.freedesktop.org/archives/systemd-devel/2014-August/022295.html
= Libraries =
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.{{cite web|title=Linux-Kernel Archive: Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline|url=http://lkml.iu.edu/hypermail/linux/kernel/1404.0/01331.html|accessdate=8 July 2014|date=8 April 2014}}{{cite web|title=A realization that I recently came to while discussing the whole systemd...|url=https://plus.google.com/+TheodoreTso/posts/4W6rrMMvhWU|accessdate=8 July 2014|date=31 March 2014}} Articles run in Linux Advocates have characterized systemd as "the new PulseAudio," and as "an accident waiting to happen."{{cite web|url=http://www.linuxadvocates.com/2013/04/systemd-new-pulseaudio.html |title=Systemd: The New PulseAudio |author=Dietrich Schmitz |date=2013-04-13 |accessdate=2014-03-19}}{{Dead link|date=May 2014}}{{cite web |url=http://www.linuxadvocates.com/2013/05/systemd-accident-waiting-to-happen.html#comment-form |title=Systemd: An Accident Waiting to Happen One |author=Dietrich Schmitz |date=2013-05-01 |accessdate=2014-03-19}}{{Dead link|date=May 2014}} One Fuduntu contributor is quoted as stating that systemd has limited software choice:
{{quote|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:{{cite web |url=http://www.linuxquestions.org/questions/interviews-28/interview-with-patrick-volkerding-of-slackware-949029/ |title=Interview with Patrick Volkerding of Slackware |publisher=Linuxquestions.org |date=2012-06-07 |accessdate=2014-03-19}}
{{quote|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.{{cite web|url=http://0pointer.de/blog/projects/the-biggest-myths.html|title=The Biggest Myths|first1=Lennart|last1=Poettering|date=2013-01-26}}
Eric S. Raymond declined to comment on systemd at first, but stated, "I'm aware there’s a controversy."{{cite web |url=http://esr.ibiblio.org/?p=5266 |title=Namedropping "ESR" |author=Eric S. Raymond |date=2014-02-15 |accessdate=2014-05-19}} Then in a March 2014 interview on Slashdot, he expressed some concerns about the goals and architecture of systemd:{{cite web |url=http://interviews.slashdot.org/story/14/03/10/137246/interviews-esr-answers-your-questions |title=Interviews: ESR Answers Your Questions |publisher=Slashdot.org |date=2014-03-10 |accessdate=2014-03-19}}
{{quote|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.{{citation |title=F15 one page release notes |work=fedoraproject.org |url=https://fedoraproject.org/wiki/F15_one_page_release_notes |date=2001-05-24}} {{As of|2014|8}}, Slackware does not support or use systemd, but Slackware's lead Patrick Volkerding has not ruled out the possibility of switching to it.{{cite web|url=http://www.linuxquestions.org/questions/slackware-14/i%27m-back-after-a-break-from-slackware-sharing-thoughts-and-seeing-whats-new-4175482641/#post5054861 |title=I'm back after a break from Slackware: sharing thoughts and seeing whats new! |publisher=Linuxquestions.org |date= |accessdate=2014-03-14}}
See also
{{Portal|Linux|Free software}}
- BusyBox – stripped-down Unix tools in a single executable file
- Linux startup process
- systemd-readahead
Notes
{{Notelist|30em}}
References
{{Reflist|30em}}
External links
{{Div col||30em}}
- {{Official website|www.freedesktop.org/wiki/Software/systemd/}}
- {{citation |url=http://0pointer.de/blog/projects/systemd.html |publisher=0pointer |title=systemd}}
- {{citation |url=http://cgit.freedesktop.org/systemd/ |publisher=freedesktop |title=cgit}}
- {{citation |url=http://fedoraproject.org/wiki/Features/systemd |publisher=Fedora |title=systemd project}}
- {{citation |url=http://lwn.net/Articles/389149/ |publisher=LWN |title=The road forward for systemd}}
- {{citation |url=http://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/ |publisher=freedesktop |title=Interface Portability And Stability Chart}}
- Init systems comparison: [https://lwn.net/Articles/578209/ part 1] and [https://lwn.net/Articles/578210/ part 2] (LWN.net)
{{Div col end}}
{{Service management in Unix}}
{{Freedesktop.org}}
{{Linux kernel}}
rm