systemd

From Wikipedia, the free encyclopedia
Jump to: navigation, search
systemd
Systemd-on-fedora.png
Startup messages on Fedora 17, which uses systemd
Original author(s) Lennart Poettering, Kay Sievers, Harald Hoyer, Daniel Mack, Tom Gundersen and David Herrmann
Developer(s) Lennart Poettering, Kay Sievers, Harald Hoyer, Daniel Mack, Tom Gundersen, David Herrmann, and others[1]
Initial release 30 March 2010 (2010-03-30)
Stable release 219 (February 16, 2015; 17 days ago (2015-02-16)) [±][2]
Written in C[3]
Operating system Linux
Type System software
License GNU LGPL 2.1+[4]
Website freedesktop.org/.../systemd/

systemd is a suite of system management daemons, libraries, and utilities designed as a central management and configuration platform for the Linux computer operating system. Described by its authors as a "basic building block" for an operating system,[5] systemd primarily aims to replace the Linux init system (the first process executed in user space during the Linux startup process) inherited from UNIX System V and Berkeley Software Distribution (BSD). The name systemd adheres to the Unix convention of making daemons easier to distinguish by having the letter d as the last letter of the filename.[6]

systemd is designed for Linux and programmed exclusively for the Linux API. It is published as free and open-source software under the terms of the GNU Lesser General Public License (LGPL) version 2.1 or later.[4]

As of 2015, most major Linux distributions have adopted systemd as their default init system. However, its design has generated significant controversy within the free software community, leading the critics to argue that systemd's architecture violates the Unix philosophy and that it will eventually form a system of interlocking dependencies.[7]

Design[edit]

The architecture of systemd as it is used by Tizen. Several components, including telephony, bootmode, dlog and tizen service, are from Tizen and are not components of systemd.[8]
Unified-hierarchy cgroups will be accessible exclusively by systemd through systemd-nspawn

Lennart Poettering and Kay Sievers, software engineers that initially developed systemd,[1] 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.

Poettering describes systemd development as "never finished, never complete, but tracking progress of technology". In May 2014, Poettering further defined systemd as aiming to unify "pointless differences between distributions", by providing the following three general functions:[9]

  • A system and service manager (manages both the system, as by applying various configurations, and its services)
  • A software platform (serves as a basis for developing other software)
  • The glue between applications and the kernel (provides various interfaces that expose functionalities provided by the kernel)

systemd is not just the name of the init daemon but can also refer to the entire software bundle around itself, which includes the daemons systemd, journald, logind and networkd, and many other low-level components such as libraries and utilities. In January 2013, Poettering described systemd not as one program, but rather a large software suite that includes 69 individual binaries.[10] As an integrated software suite, systemd replaces the startup sequences and runlevels controlled by the traditional init daemon previously used by Linux distributions, along with the shell scripts executed under its control. systemd also integrates many other services that are common on Linux systems, such as user logins, handling of the system console, device and hot plugging management (replacing udev), hostname and locale handling, scheduled execution (replacing cron), and a unified system for logging various events.

Like the init daemon, systemd is a daemon that manages other daemons, which, including systemd itself, are background processes. systemd is the first daemon to start during booting and the last daemon to terminate during shutdown. The systemd daemon serves as the root of the user space's process tree; the first process (pid 1) has a special role on Unix systems, as it receives a SIGCHLD signal when a daemon process (which has detached from its parent) terminates. Therefore, the first process is particularly well suited for the purpose of monitoring daemons; systemd attempts to improve in that particular area over the traditional approach, which would usually not restart daemons automatically but only launch them once without further monitoring.

systemd executes elements of its startup sequence in parallel, which is faster than the traditional startup sequence's sequential approach.[11] For inter-process communication (IPC), systemd makes Unix domain sockets and D-Bus available to the running daemons. The state of systemd itself can also be preserved in a snapshot for future recall.

Unit files[edit]

systemd records initialization instructions for each daemon in a configuration file (referred to as a "unit file") that uses a declarative language, replacing the traditionally used per-daemon startup shell scripts. Unit file types include service, socket, device, mount, automount, swap, target, path, timer (which can be used as a cron-like job scheduler[12]), snapshot, slice and scope.[13]

Core components and libraries[edit]

Following its integrated approach, systemd also provides replacements for various daemons and utilities, including the startup shell scripts, pm-utils, inetd, acpid, syslog, watchdog, cron and atd. systemd's core components include the following:

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

systemd tracks processes using the Linux kernel's cgroups subsystem instead of by using process identifiers (PIDs); thus, daemons cannot "escape" systemd, not even by double-forking. systemd not only uses cgroups, but also augments them with systemd-nspawn and machinectl, two utility programs that facilitate the creation and management of software containers.[14] Since version 205, systemd also offers ControlGroupInterface, which is an API to the Linux kernel cgroups.[15] The Linux kernel cgroups are adapted to support kernfs,[16] and are being modified to support a unified hierarchy.[17]

Ancillary components[edit]

Beside its primary purpose of providing a replacement Linux init system, systemd suite provides additional functionality, including its following components:

consoled
systemd-consoled provides a user console daemon, intending to replace the Linux kernel's virtual terminal support with a more capable userspace component.[18] Its preview version was released in October 2014, as part of systemd version 217.[19]
journald
systemd-journald is a daemon responsible for event logging, with append-only binary files serving as its logfiles. The system administrator may choose whether to log system events with systemd-journald, syslog-ng or rsyslog.
logind
systemd-logind is a daemon that manages user logins and seats in various ways. It is an integrated login manager that offers multiseat improvements[20] and replaces ConsoleKit, which is no longer maintained.[21] For X11 display managers the switch to logind requires a minimal amount of porting.[22] It was integrated in systemd version 30.
networkd
networkd allows systemd to perform various networking configurations; in version 209, when it was first integrated, support was limited to statically assigned addresses and basic support for bridging configuration.[23][24][25][26][27] In July 2014, systemd version 215 was released, adding new features such as a DHCP server for IPv4 hosts, and VXLAN support.[28]
timedated
systemd-timedated is a daemon that can be used to control time-related settings, such as the system time, system time zone, or selection between UTC and local time zone system clock. It is accessible through D-Bus.[29] It was integrated in systemd version 30.
udevd
udev is a device manager for the Linux kernel, which handles the /dev directory and all user space actions when adding/removing devices, including firmware loading. In April 2012, the source tree for udev was merged into the systemd source tree.[30][31]
libudev
It is the standard library for utilizing udev, which allows third-party applications to query udev resources.

Integration with other software[edit]

In the interest of enhancing the interoperability between systemd and the GNOME desktop environment, systemd coauthor Lennart Poettering asked the GNOME Project to consider making systemd an external dependency of GNOME 3.2.[32]

In November 2012, the GNOME Project concluded that basic GNOME functionality should not rely on systemd.[33] However, GNOME 3.8 introduced a compile-time choice between the logind and ConsoleKit API, the former being provided at the time only by systemd. Ubuntu did provide a logind binary that is separate from the rest of systemd, but this became a de facto dependency of GNOME on systemd for most Linux distributions, in particular since ConsoleKit is not actively maintained anymore and upstream recommends the use of systemd-logind instead.[34] The developers of Gentoo Linux also attempted to adapt these changes in OpenRC, but the implementation contained too many bugs, causing the distribution to mark systemd as a dependency of GNOME.[35][36]

GNOME has further integrated logind.[37] As of Mutter version 3.13.2, logind is a dependency for Wayland sessions.[38] There are plans to replace gnome-session with systemd, but systemd would not be running as PID 1 and gnome-session would remain available on non-Linux systems. Since systemd supports only Linux and cannot be easily ported to other operating systems due to the heavy use of Linux kernel APIs, there is a need to offer compatible APIs on other operating systems such as OpenBSD.

In a September 2014 ZDNet interview, Theodore Ts'o expressed his opinion that the dispute over systemd's centralized design philosophy, more than technical concerns, indicates a dangerous general trend toward uniformizing the Linux ecosystem, alienating and marginalizing parts of the open-source community, and leaving little room for alternative projects. In this he found similarities with the attitude he found in the GNOME project toward non-standard configurations.[39] On social media, Ts'o also later compared the attitudes of two key developers to that of GNOME's developers.[40]

Graphical frontends[edit]

Screenshot of systemd-ui, a GTK+-based frontend for systemd.

A few graphical frontends are available, including the following:

systemd-ui
Also known as systemadm, it is a simple GTK+-based graphical front-end for systemd.[41] 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.
Kcmsystemd
Provides a graphical systemd frontend for the KDE desktop environment. It integrates into the KDE's system settings window, allowing monitoring and controlling of systemd services, as well as graphical editing of configuration files.

Forks and alternative implementations[edit]

eudev
In 2012, the Gentoo Linux project created a fork of systemd-udev in order to avoid dependency on the systemd architecture. The resulting fork is called eudev and it makes udev functionality available without systemd.[42] A stated goal of the project is to keep eudev independent of any Linux distribution or init system.[43]
uselessd
In 2014, uselessd was created as a lightweight fork of systemd. The project seeks to remove features and programs deemed unnecessary for an init system, increase implementation modularity, improve portability across platforms, as well as address other perceived faults.[44]
uselessd supports the musl and µClibc libraries, so it may be used on embedded systems, whereas systemd only supports glibc. uselessd is attempting initial support for non-Linux platforms (so far only build time being ready), whereas the systemd project does not attempt any compatibility with BSD systems.[44] The uselessd project plans further improvements on cross-platform compatibility, as well as architectural overhauls and refactoring for the Linux build in the future.[45]
systembsd
In 2014, a Google Summer of Code project named "systembsd" was started in order to provide alternative implementations of these APIs for OpenBSD. The original project developer began it in order to ease his transition from Linux to OpenBSD.[46]
The systembsd project will not provide an init replacement, but aims at providing OpenBSD with compatible daemons for hostnamed, timedated, localed, and logind in particular. The project does not create new systemd-like functionality, and is only meant to act as a wrapper over the native OpenBSD system. The developer aims for systembsd to be installable as part of the ports collection, not as part of a base system, stating that, "systemd and *BSD differ fundamentally in terms of philosophy and development practices."[46]

Adoption and reception[edit]

Some distributions allow other init systems to be used; in such distributions, only the default init system (for new installs) was changed to systemd, while switching the init system is usually possible by installing the appropriate packages. Some distributions have been forked to avoid systemd.[47]

Major Linux distributions that adopted systemd
Linux distribution Date added to software repository[a] Enabled by default? Date released as default
Arch Linux January 2012[48] Yes October 2012[49]
CoreOS July 2013 Yes[50] October 2013 (v94.0.0)[51]
Debian April 2012[52] Planned for Debian 8 "Jessie"[b] not yet released
Fedora May 2011 (v15)[54] Yes May 2011 (v15)
Gentoo Linux[c] 2011[57][58][59] No[d]
Mageia May 2012 (v2.0)[60] Yes May 2012 (v2.0)
openSUSE March 2011 (v11.4)[61] Yes September 2012 (v12.2)[62]
Oracle Linux July 2014 Yes July 2014 (v7.0)
Red Hat Enterprise Linux June 2014 (v7.0)[63] Yes June 2014 (v7.0)
SUSE Linux Enterprise Server 2014 (v12) Yes October 2014 (v12)
Tizen 2012[64] Yes 2012
Ubuntu[e] April 2013 (v13.04) Planned[66] not yet released

History[edit]

In May 2011, Fedora became the first major Linux distribution to enable systemd by default.[67]

In a 2012 interview, Slackware's lead Patrick Volkerding expressed reservations about the systemd architecture, stating his belief that its design was contrary to the Unix philosophy of interconnected utilities with narrowly defined functionalities.[68] As of August 2014, Slackware does not support or use systemd, but Volkerding has not ruled out the possibility of switching to it.[69]

Between October 2013 and February 2014, a long debate among the Debian Technical Committee occurred on the Debian mailing list,[70] discussing which init system to use as the default in Debian 8 "jessie", and culminating in a decision in favor of systemd. The debate was widely publicized[71][72] and in the wake of the decision the debate continues on the Debian mailing list.

In January 2013, Lennart Poettering attempted to address concerns about systemd in a blog post called The Biggest Myths.[10] After continued controversy over systemd, in October 2014, Poettering complained that the "Open source community is full of assholes, and I probably more than most others am one of their most favourite targets." Poettering went on to blame Linus Torvalds and other kernel developers for the state of the community.[73]

In February 2014, after the Debian's decision was made, Mark Shuttleworth announced on his blog that Ubuntu would be following through as well in implementing systemd,[74] despite his earlier comments in October 2013 that described systemd as "hugely invasive and hardly justified".[75]

In April 2014, Linus Torvalds expressed reservations about the attitude of Kay Sievers, a key systemd developer, toward users and bug reports.[76]

In late April 2014, a campaign to boycott systemd was launched, with a website listing various reasons against its adoption.[77][78]

In an August 2014 article published in InfoWorld, Paul Venezia wrote about the systemd controversy, and attributed the controversy to violation of the Unix philosophy, and to "enormous egos who firmly believe they can do no wrong."[79] The article also characterizes the architecture of systemd as more similar to that of svchost.exe, a critical system component in Microsoft Windows with a broad functional scope.[79]

In November 2014, Debian maintainers and Technical Committee members Joey Hess,[80] Russ Allbery,[81] Ian Jackson[82] and systemd package maintainer Tollef Fog Heen[83] resigned from their positions. All three justified their decision on the public Debian mailing list and in personal blogs with their exposure to extraordinary stress levels related to ongoing disputes on systemd integration within the Debian and open source community that rendered regular maintenance virtually impossible.

In December 2014, a fork of Debian, called Devuan, was announced by a group calling themselves the "Veteran Unix Admins". Its intention is to provide a Debian variant without systemd installed by default.[84]

See also[edit]

Notes[edit]

  1. ^ Dates are for the general availability release.
  2. ^ The Debian Technical Committee voted to make systemd the default system management daemon for Linux in the "jessie" release.[53]
  3. ^ systemd is supported in Gentoo as an alternative to OpenRC, the default init system[55] for those who "want to use systemd instead, or are planning to use Gnome 3.8 and later (which requires systemd)"[56]
  4. ^ As of 2014, Gentoo requires systemd when selecting the GNOME profile or installing GNOME 3.
  5. ^ Ubuntu's development documentation offers instructions on how to use systemd as an experimental option.[65]

References[edit]

  1. ^ a b "systemd README", freedesktop.org, retrieved 2012-09-09 
  2. ^ "[systemd-devel] [ANNOUNCE] systemd v219". freedesktop.org. 2015-02-16. Retrieved 2015-02-16. 
  3. ^ systemd Analysis Summary, Ohloh, retrieved 2011-06-16 
  4. ^ a b Lennart Poettering (2012-04-21), systemd Status Update, retrieved 2012-04-28 
  5. ^ Lennart Poettering (September 2010). "Beyond Init: systemd (LinuxKongress 2010)". Retrieved 2014-10-28. 
  6. ^ Lennart Poettering, Kay Sievers, Thorsten Leemhuis (2012-05-08), Control Centre: The systemd Linux init system, The H, archived from the original on 14 October 2012, retrieved 2012-09-09 
  7. ^ Vaughan-Nichols, Steven. "Linus Torvalds and others on Linux's systemd". 
  8. ^ Gundersen, Tom E. (2014-09-25). "The End of Linux". Retrieved 2014-10-25. It certainly is not something that comes with systemd from upstream. 
  9. ^ Poettering, Lennart (May 2014). "A Perspective for systemd: What Has Been Achieved, and What Lies Ahead". Retrieved 2014-11-30. 
  10. ^ a b Poettering, Lennart (2013-01-26). "The Biggest Myths". 
  11. ^ "Debate/initsystem/systemd – Debian Documentation". Debian. 2014-01-02. Retrieved 2014-12-04. 
  12. ^ "systemd Dreams Up New Feature, Makes It Like Cron". Phoronix. 2013-01-28. Retrieved 2014-01-22. 
  13. ^ http://www.freedesktop.org/software/systemd/man/systemd.unit.html
  14. ^ Jake Edge (2013-11-07). "Creating containers with systemd-nspawn". LWN.net. Retrieved 2014-07-30. 
  15. ^ "ControlGroupInterface". freedesktop.org. Retrieved 9 November 2014. 
  16. ^ "cgroup: convert to kernfs". 2014-01-28. 
  17. ^ "cgroup: prepare for the default unified hierarchy". 2014-03-13. 
  18. ^ Michael Larabel (2014-10-07). "systemd 217 Will Introduce Its New "Consoled" User Console Daemon". Retrieved 2015-01-24. 
  19. ^ Lennart Poettering (2014-10-28). "[systemd-devel] [ANNOUNCE] systemd 217". Retrieved 2015-01-23. 
  20. ^ "systemd-logind.service". freedesktop.org. Retrieved 2014-02-17. 
  21. ^ "ConsoleKit official website". freedesktop.org. Retrieved 9 November 2014. 
  22. ^ "How to hook up your favorite X11 display manager with systemd". freedesktop.org. 
  23. ^ "Networking in +systemd - 1. Background". 2013-11-27. Retrieved 2014-02-22. 
  24. ^ "Networking in +systemd - 2. libsystemd-rtnl". 2013-11-27. Retrieved 2014-02-22. 
  25. ^ "Networking in +systemd - 3. udev". 2013-11-27. Retrieved 2014-02-22. 
  26. ^ "Networking in +systemd - 4. networkd". 2013-11-27. Retrieved 2014-02-22. 
  27. ^ "Networking in +systemd - 5. the immediate future". 2013-11-27. Retrieved 2014-02-22. 
  28. ^ Michael Larabel (2014-07-04). "systemd 215 Works On Factory Reset, DHCPv4 Server Support". Retrieved 2014-11-08. 
  29. ^ "timedated". freedesktop.org. Retrieved 9 November 2014. 
  30. ^ Sievers, Kay, "The future of the udev source tree", linux-hotplug mailing list, retrieved 2013-05-22 
  31. ^ Sievers, Kay, "Commit importing udev into systemd", freedesktop.org, retrieved 25 May 2012 
  32. ^ Lennart Poettering (2011-05-18), "systemd as an external dependency", desktop-devel mailing list (GNOME), retrieved 2011-05-26 
  33. ^ Frederic Peters (2011-11-04), "20121104 meeting minutes", GNOME release-team mailing list, retrieved 2013-01-14 
  34. ^ "ConsoleKit". Retrieved 15 November 2014. ConsoleKit is currently not actively maintained. The focus has shifted to the built-in seat/user/session management of Software/systemd called systemd-logind! 
  35. ^ Vitters, Olav. "GNOME and logind+systemd thoughts". Retrieved 24 April 2014. 
  36. ^ "GNOME 3.10 arrives with experimental Wayland support". ZDNet. Retrieved 24 April 2014. 
  37. ^ "GNOME initiatives: systemd". Retrieved 2014-05-01. 
  38. ^ "Mutter 3.13.2: launcher: Replace mutter-launch with logind integration". 2014-05-19. Retrieved 2014-05-28. 
  39. ^ "Linus Torvalds and others on Linux's systemd". Retrieved 2014-11-21. 
  40. ^ "A realization that I recently came to while discussing the whole systemd...". 31 March 2014. Retrieved 8 July 2014. 
  41. ^ "Details of package systemd-ui in Debian "Jessie" 8". Debian. Retrieved 2014-07-31. 
  42. ^ "README". Retrieved 2014-10-28. 
  43. ^ "Gentoo eudev project". Retrieved 2014-10-28. 
  44. ^ a b Michael Larabel (2014-09-21). "Uselessd: A Stripped Down Version Of systemd". Phoronix. Retrieved 2014-10-26. 
  45. ^ "uselessd :: information system". uselessd.darknedgy.net. Retrieved 2014-10-26. 
  46. ^ a b "GSoC 2014: systemd replacement utilities (systembsd)". OpenBSD Journal. Retrieved 28 November 2014. 
  47. ^ "Meet Devuan, the Debian fork born from a bitter systemd revolt". 
  48. ^ "Git clone of the 'packages' repository". Web interface to the Arch Linux git repositories. 2012-01-12. 
  49. ^ "systemd is now the default on new installations". Arch Linux. 
  50. ^ "CoreOS's init system", coreos.com, retrieved 2014-02-14 
  51. ^ "coreos/manifest: Releases: v94.0.0". github.com. October 3, 2013. Retrieved September 22, 2014. 
  52. ^ "systemd". debian.org. Retrieved 2014-11-19. 
  53. ^ Bdale Garbee (2014-02-11). "Bug#727708: call for votes on default Linux init system for jessie". 
  54. ^ D. J. Walker-Morgan (2011-05-24), Fedora 15's Lovelock released, The H, archived from the original on 2 August 2011, retrieved 2012-08-22 
  55. ^ "systemd". 
  56. ^ "Installing the Gentoo Base System § Optional: Using systemd". 
  57. ^ "Comment #210 (bug #318365)", gentoo.org, retrieved 2011-07-05 
  58. ^ "systemd", gentoo.org, retrieved 2011-07-05 
  59. ^ "systemd", gentoo.org, retrieved 2012-08-26 
  60. ^ Fabian Scherschel (2012-05-23), Mageia 2 arrives with GNOME 3 and systemd, The H, archived from the original on 8 December 2013, retrieved 2012-08-22 
  61. ^ Directory view of the 11.4 i586 installation showing presence of the systemd v18 installables, 2011-02-23, retrieved 2013-09-24 
  62. ^ "OpenSUSE: Not Everyone Likes systemd". Phoronix. The recently released openSUSE 12.2 does migrate from SysVinit to systemd 
  63. ^ Red Hat Unveils Red Hat Enterprise Linux 7, 2014-06-10 
  64. ^ Mikko Ylinen (2012-05-09). "Tizen IVI Architecture". Retrieved 2014-10-20. 
  65. ^ "systemd — An alternative boot manager", ubuntu.com, retrieved 2013-06-24 
  66. ^ Mark Shuttleworth (2014-02-14). "Blog Archive » Losing graciously". markshuttleworth.com. Retrieved 2014-02-14. 
  67. ^ "F15 one page release notes", fedoraproject.org, 2001-05-24 
  68. ^ "Interview with Patrick Volkerding of Slackware". linuxquestions.org. 2012-06-07. Retrieved 2014-03-19. 
  69. ^ "I'm back after a break from Slackware: sharing thoughts and seeing whats new!". linuxquestions.org. Retrieved 2014-03-14. 
  70. ^ "#727708 - tech-ctte: Decide which init system to default to in Debian.". 2013-10-25. Retrieved 2014-09-14. 
  71. ^ "Which init system for Debian?". 2013-11-05. Retrieved 2014-09-14. 
  72. ^ "Debian Still Debating systemd Vs. Upstart Init System". Phoronix. 2013-12-30. Retrieved 2014-09-14. 
  73. ^ Steven J. Vaughan-Nichols (2014-10-06). "Lennart Poettering's Linus Torvalds rant". ZDNet. Retrieved 2014-10-31. 
  74. ^ "Losing graciously". 2014-02-14. Retrieved 2014-09-14. 
  75. ^ "Quantal, raring, saucy...". 2013-10-18. Retrieved 2014-09-14. 
  76. ^ "Linux-Kernel Archive: Re: [RFC PATCH] cmdline: Hide "debug" from /proc/cmdline". 2 April 2014. Retrieved 8 July 2014. 
  77. ^ "Is systemd as bad as boycott systemd is trying to make it?". LinuxToday. Retrieved 2014-09-22. 
  78. ^ "Boycott systemd.org (Archive.org copy)". Retrieved 2014-12-31. 
  79. ^ a b Paul Venezia (2014-08-18). "systemd: Harbinger of the Linux apocalypse". Retrieved 2014-09-20. 
  80. ^ "on leaving". Retrieved 2014-11-19. 
  81. ^ "Resigning from the Technical Committee". Retrieved 2014-11-19. 
  82. ^ "Resignation". Retrieved 2014-11-19. 
  83. ^ "Resignation from the pkg-systemd maintainer team". Retrieved 2014-11-19. 
  84. ^ "The "Devuan" Debian fork". LWN.net. Retrieved 2014-12-08. 

External links[edit]