SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
systemd for developers
Alison Chaiken
alison@she-devel.com
http://she-devel.com
Feb. 21, 2015
Text in blue is hyperlinked.
On-the-fly audience exercises.
Quiz: 
what is the most widely 
used
Linux init system?
?
?
?
?
?? ??
?
Topics
● Motivation
● Design of systemd
● Comparison with sysVinit
● Integration of systemd with kernel features
● Some tips for users and developers
Linux needs to keep innovating
LicensedunderCCBY-SA3.0
http://commons.wikimedia.org/wiki/File:Fire-lite-bg-
10.jpg#mediaviewer/File:Fire-lite-bg-10.jpg
“No one has a guaranteed
position in the technology
industry.” -- Bill Gates, Pirates of
Silicon Valley
“The only thing that can ever hurt
Linux is Linux itself.” -- GKH,
Linux Action Show
“Success is a self-correcting
phenomenom.” -- Gary Hamel
Design
Philosophy
Extract duplicate functionality from individual daemons 
and move it to the systemd core or the Linux kernel.
Replace /etc scripts with declarative configuration files 
in a standard format.
One daemon to rule them all
xinetd: a daemon to lazily launch internet
services when activity is detected on an
AF_INET socket
systemd: a daemon to lazily launch any
system service when activity is detected on
an AF_UNIX socket (oversimplification)
● modular;
● asynchronous and concurrent;
● described by declarative sets of properties;
● bundled with analysis tools and tests;
● features a fully language-agnostic API.
systemd is:
sysVinit runlevels ≈ systemd targets
● Targets are synchronization points for boot.
● Check /lib/systemd/system/runlevel?.target symlinks:
multi-user.target.wants (runlevel 3 == text session)
graphical.target.wants (runlevel 5 == graphical session)
● Select boot-target :
– via /etc/systemd/system/default.target symlink;
– appending number ('3' or '5') or systemd.unit=<target> to
kernel cmdline;
● Change current target with runlevel, telinit
– or systemctl isolate <something>.target
init.d scripts Þ systemd units
● Unit's action and parameters: ExecStart=
● Dependencies: Before=, After=, Requires=, Conflicts=
and Wants=.
● Default dependencies:
– Requires= and After= on basic.target;
– Conflicts= and Before= on shutdown.target.
● Types of unit files: service, socket, device, mount,
scope, slice, automount, swap, target, path, timer,
snapshot
Understanding dependencies
Try:
systemctl list-dependencies basic.target
systemctl list-dependencies –after tmp.mount
Try:
systemd-analyze dot rescue.target
systemd-analyze dot basic.target > basic.dot
dot -Tsvg basic.dot -o basic.svg
eog basic.svg (or view basic.svg with any web browser)
Understanding dependencies, p. 2
Hierarchy of unit files for
system and user sessions
● Organized into system and user units
● /lib/systemd/system: systemd upstream defaults for
system-wide services
● /etc/systemd/system: local customizations by override
and extension
● /lib/systemd/user/: systemd's upstream defaults for per-
user services
● $HOME/.local/share/systemd/user/ for user-installed
units
● 'drop-ins' are run-time extensions
[system and user units: gnome-weather demo]
sysVinit systemd
Comparison with sysVinit
SysV already has a big service manager: bash
[user@localhost]$ wc -l /sbin/init
64
[user@localhost]$ wc -l /bin/bash
4154
[user@localhost]$ wc -l /lib/systemd/systemd
5944
which services are started by sysVinit?
Try: 'ls/etc/init.d'
Which daemons started by systemd directly?
Try: 'ls /lib/systemd/system/*.service'
Try: 'systemctl list-sockets'
Major Differences with SysVInit
clean environment
socket-based activation
X
Upstart
Serial Linked list Fully parallel
[Socket activation demo with cups and ncat]
using the systemd journal
● Run “addgroup $USER systemd-
journal” for access.
● Can be cryptographically signed.
● Log-reading tools are simple:
Try: journalctl -xn
journalctl -p err
journalctl -u cron
journalctl --list-boots
systemctl status
systemctl is-failed bluetooth
systemctl --failed
integration of systemd with kernel features
systemd and cgroups
● cgroups are a kernel-level mechanism for allocating resources
like storage, memory, CPU and network
● systemd slices are groups of daemons whose resources are
managed jointly.
● systemd scopes are similar groups of user processes.
● Can set BlockIOWeight, IOSchedulingPriority,
OOMScoreAdjust, CPUShares, MemoryLimit …
Try:
sudo systemd-cgls
sudo systemd-cgtop
systemd and udev
● udev is a kernel facility that handles device events.
– merged into the systemd project.
● Rules are enabled by placement in /lib/udev/rules.d,
unlike systemd unit enablement.
● Rule loading is ordered by numeric filename prefix,
like old sysVinit scripts.
udev is still old-school
Try:
ls /lib/udev/rules.d
cat /lib/udev/rules.d/99-systemd.rules
systemd and security:
granular encapsulationvia kernel's capabilities
● PrivateTmp, PrivateDevices, PrivateNetwork
● JoinNamespaces
● ProtectSystem (/usr and /etc), ProtectHome
● ReadOnlyDirectories, InaccessibleDirectories
● systemd-nspawn: systemd's native containers
● Easy configuration of kernel's capability properties
developing systemd
● git clone git://anongit.freedesktop.org/systemd/systemd
● systemd-devel list: submit patches or ask questions
●
Impressive and featureful utility library in src/shared/
#define streq(a,b) (strcmp((a),(b)) == 0)
#define strneq(a, b, n) (strncmp((a), (b), (n)) == 0)
#define strcaseeq(a,b) (strcasecmp((a),(b)) == 0)
#define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0)
● Complex but automated build system with many dependencies.
● 'Plumbing' dev tools in /lib/systemd, 'porcelain' tools in /bin
find /lib/systemd -executable -type f
Summary
● Systemd has:
– a superior design;
– tight integration with the Linux kernel;
– a vibrant developer community.
● Control has migrated away from distros toward kernel and
freedesktop.org.
● Most users will not notice.
● systemd exemplifies the modernization Linux needs to
stay relevant and competitive.
Resources
● Man pages are part of systemd git repo.
●
freedesktop.org: systemd mailing list archives and wiki
● At Poettering's 0pointer.de blog
● ➟At wayback machine: “Booting up” articles
●
Neil Brown series at LWN
● ➟Fedora's SysVinit to systemd cheatsheet
● Steve Smethurst's Hacker Public Radio episode
●
Josh Triplett's Debconf talk video
● Linux Action Show interviews with Mark Shuttleworth and Lennart Poettering
Thanks
● Mentor Graphics for sending me to Germany to hack on
systemd.
● Vladimir Pantelic, Tom Gundersen and Lennart Poettering for
corrections of an earlier version (without implied 'ack').
● Ivan Shapovalov and Mantas Mikulènas for answering
questions.
● Bill Ward and Jym Dyer for use of their images.
photo
courtesy
Jym
Dyer
Leftover
Materials
Greg K-H: “Tightly-coupled components”
Modularity can produce complexity
photo
courtesy
Bill
Ward
systemd and outside projects: CoreOS
● networkd was initially contributed by CoreOS developers.
● CoreOS's fleet “tool that presents your entire cluster as a single init system”
is based on systemd.
– Spin up new containers due to events on sockets.
● CoreOS devs are outside systemd inner circle.
● systemd has many patches from Arch, Intel, Debian . . .
systemd in embedded systems
● systemd is widely adopted in embedded systems
because
– proper allocation of resources is critical;
– fastboot is required;
– customization of boot sequence is common.
● Lack of backward compatibility for older kernels (due
to firmware loading) is a pain point.
● Embedded use cases are not always understood by
systemd devs.
[runlevel demo with Fedora Qemu and Firefox]
Try: 'systemctl isolate multi-user.target'
[warning: KILLS X11]
systemd is easy to use
● systemd utilities:
– Try: apropos systemd | grep ctl
● All-ASCII configuration files: no hidden “registry”.
● Customization is by overriding default files.
● Many choices are controllable via symlinks.
● Bash-completion by default.
● Backwards compatibility with SysVinit
Override your defaults!
photo courtesy
Jym Dyer
● Replace a unit in /lib (upstream)
by creating one of the same name
in /etc (local changes).
● Add services to boot by symlinking
them into
/etc/systemd/system/default.target.wants.
● 'mask' unit with link to /dev/null.
● Best practice: do not change the
files in /lib/systemd.
● Read in-use unit with 'systemctl
cat'.
Extensions: drop-ins
Try: systemd-delta
Try: systemctl cat <list from 1st
command>
Old way New way History
X11 manages graphics
memory
Kernel's drm manages
graphics memory
“Linux Graphics Drivers: an I
ntroduction,”
p. 26
static /dev, then devfs udev
getrlimit, setrlimit cgroups
KDE3 and GNOME2 KDE4 and GNOME3 KDE and GNOME
sysVinit systemd in progress
X11 client-server
model
Wayland compositor
Crux of the problem: Dave Neary
“There is no freedesktop.org process for
proposing standards, identifying those which are
proposals and those which are de facto
implemented, and perhaps more importantly,
there is no process for building consensus around
a specification . . .”
(comment regarding GNOME3)
systemd is . . .
● the basis of Fedora, RHEL, CentOS, OpenSUSE,
Ubuntu, Debian and much embedded.
● praised by Jordan Hubbard of FreeBSD.
● tightly integrated with Linux kernel cgroups.
● the reference implementation for udev and for kdbus
userspace access.
Customizing your installation
● Replace a unit in /lib (upstream) by creating one of the same
name in /etc (local changes).
● Add services to boot by symlinking them into
/etc/systemd/system/default.target.wants.
● Best practice: do not change the files in /lib/systemd
Sequence of targets on a typical system
>$ ls -l /lib/systemd/system/default.target
/lib/systemd/system/default.target -> graphical.target
>$ cat /lib/systemd/system/graphical.target
After=multi-user.target
>$ cat /lib/systemd/system/multi-user.target
After=basic.target
>$ cat /lib/systemd/system/basic.target
After=sysinit.target sockets.target timers.target paths.target
slices.target
Example: set display manager
[user@localhost ~]$ ls -l `locate display-manager.service`
lrwxrwxrwx. 1 root root 35 Dec 11 2013
/etc/systemd/system/display-manager.service ->
/usr/lib/systemd/system/gdm.service
[user@localhost ~]$ cat /usr/lib/systemd/system/gdm.service
[Unit]
Description=GNOME Display Manager
[ . . . ]
[Install]
Alias=display-manager.service
or
WantedBy=graphical.target
sysinit, sockets and multi-user
are composite targets
>$ ls /lib/systemd/system/multi-user.target.wants/
dbus.service@ systemd-ask-password-wall.path@ systemd-
update-utmp-runlevel.service@ getty.target@
>$ ls /lib/systemd/system/sockets.target.wants:
dbus.socket@ systemd-shutdownd.socket@
systemd-initctl.socket@ systemd-udevd-control.socket@
>$ ls /lib/systemd/system/sysinit.target.wants:
cryptsetup.target@ systemd-journald.service@
debian-fixup.service@ systemd-journal-flush.service@
Symlinks replace lines of conditional code in SysVinit scripts.
Example: change the default target
[alison@localhost ~]$ ls /etc/systemd/system/default.target
/etc/systemd/system/default.target ->
/lib/systemd/system/graphical.target
[alison@localhost ~]$ sudo rm /etc/systemd/system/default.target
[alison@localhost ~]$ sudo ln -s /lib/systemd/system/multi-user.target
/etc/systemd/system/default.target
[alison@localhost ~]$ ~/bin/systemd-delta
[ . . . ]
[REDIRECTED] /etc/systemd/system/default.target →
/usr/lib/systemd/system/default.target
Misconceptions
● systemd is more complex than sysVinit.
● systemd is full of binary configuration files.
● The system log is now unreadable! And liable to
corruption!
● {Fedora/GNOME/RedHat/Poettering} are trying to take
over all of Linux.
problems
● systemd is modular, but:
– interopability with other SW may be inadequately tested.
● Potentially rocky piecemeal transition by distros.
– e.g., Debian installer doesn't warn about a separate /usr
partition.
● Merciless deprecation of features (firmware loading,
readahead . . . ).
● Frequent releases, not particularly stable.
Taxonomy of systemd dependencies
Requires, RequiresOverridable, Requisite, RequisiteOverridable,
Wants, BindsTo, PartOf, Conflicts, Before, After, OnFailure
PropagateReloadsTo, ReloadPropagateFrom,

Contenu connexe

Tendances

IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleAlison Chaiken
 
Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Gábor Nyers
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
Effective service and resource management with systemd
Effective service and resource management with systemdEffective service and resource management with systemd
Effective service and resource management with systemdDavid Timothy Strauss
 
Systemd mlug-20140614
Systemd mlug-20140614Systemd mlug-20140614
Systemd mlug-20140614Susant Sahani
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersKernel TLV
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkAnne Nicolas
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratchjoshuasoundcloud
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersKernel TLV
 
Containers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelContainers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelOpenVZ
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroupsKernel TLV
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisAnne Nicolas
 
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneKernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneAnne Nicolas
 

Tendances (20)

IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the Preemptible
 
SystemV vs systemd
SystemV vs systemdSystemV vs systemd
SystemV vs systemd
 
First steps on CentOs7
First steps on CentOs7First steps on CentOs7
First steps on CentOs7
 
Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12Full system roll-back and systemd in SUSE Linux Enterprise 12
Full system roll-back and systemd in SUSE Linux Enterprise 12
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Effective service and resource management with systemd
Effective service and resource management with systemdEffective service and resource management with systemd
Effective service and resource management with systemd
 
Systemd cheatsheet
Systemd cheatsheetSystemd cheatsheet
Systemd cheatsheet
 
Systemd mlug-20140614
Systemd mlug-20140614Systemd mlug-20140614
Systemd mlug-20140614
 
Pdf c1t tlawaxb
Pdf c1t tlawaxbPdf c1t tlawaxb
Pdf c1t tlawaxb
 
Systemd poettering
Systemd poetteringSystemd poettering
Systemd poettering
 
Windows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel DevelopersWindows Internals for Linux Kernel Developers
Windows Internals for Linux Kernel Developers
 
Kernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver frameworkKernel Recipes 2015 - So you want to write a Linux driver framework
Kernel Recipes 2015 - So you want to write a Linux driver framework
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 
Containers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux KernelContainers and Namespaces in the Linux Kernel
Containers and Namespaces in the Linux Kernel
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Advanced Namespaces and cgroups
Advanced Namespaces and cgroupsAdvanced Namespaces and cgroups
Advanced Namespaces and cgroups
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Kernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysisKernel Recipes 2015 - Kernel dump analysis
Kernel Recipes 2015 - Kernel dump analysis
 
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneKernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyone
 

En vedette

Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootKenny (netman)
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regressionSusant Sahani
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemdAlison Chaiken
 
Getting the maximum out of systemd
Getting the maximum out of systemdGetting the maximum out of systemd
Getting the maximum out of systemdJulien Pivotto
 
systemd and configuration management
systemd and configuration managementsystemd and configuration management
systemd and configuration managementJulien Pivotto
 
Introduction to the Hadoop Ecosystem (FrOSCon Edition)
Introduction to the Hadoop Ecosystem (FrOSCon Edition)Introduction to the Hadoop Ecosystem (FrOSCon Edition)
Introduction to the Hadoop Ecosystem (FrOSCon Edition)Uwe Printz
 
Epoll - from the kernel side
Epoll -  from the kernel sideEpoll -  from the kernel side
Epoll - from the kernel sidellj098
 
linux software architecture
linux software architecture linux software architecture
linux software architecture Sneha Ramesh
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Ramola Dhande
 
RedHat Linux
RedHat LinuxRedHat Linux
RedHat LinuxApo
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7Ji-Woong Choi
 
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Mazenetsolution
 

En vedette (18)

Hablemos de Systemd
Hablemos de SystemdHablemos de Systemd
Hablemos de Systemd
 
Linux fundamental - Chap 11 boot
Linux fundamental - Chap 11 bootLinux fundamental - Chap 11 boot
Linux fundamental - Chap 11 boot
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
 
Getting the maximum out of systemd
Getting the maximum out of systemdGetting the maximum out of systemd
Getting the maximum out of systemd
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
systemd and configuration management
systemd and configuration managementsystemd and configuration management
systemd and configuration management
 
Introduction to the Hadoop Ecosystem (FrOSCon Edition)
Introduction to the Hadoop Ecosystem (FrOSCon Edition)Introduction to the Hadoop Ecosystem (FrOSCon Edition)
Introduction to the Hadoop Ecosystem (FrOSCon Edition)
 
Epoll - from the kernel side
Epoll -  from the kernel sideEpoll -  from the kernel side
Epoll - from the kernel side
 
linux software architecture
linux software architecture linux software architecture
linux software architecture
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
How A Compiler Works: GNU Toolchain
How A Compiler Works: GNU ToolchainHow A Compiler Works: GNU Toolchain
How A Compiler Works: GNU Toolchain
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)Red hat enterprise linux 7 (rhel 7)
Red hat enterprise linux 7 (rhel 7)
 
RedHat Linux
RedHat LinuxRedHat Linux
RedHat Linux
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7
 
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 7
 

Similaire à Systemd for developers

Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel DevelopmentPriyank Kapadia
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernelMahendra M
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containersRed Hat Developers
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architectureOpenStack Korea Community
 
Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modulesdibyajyotig
 
Lightweight Virtualization in Linux
Lightweight Virtualization in LinuxLightweight Virtualization in Linux
Lightweight Virtualization in LinuxSadegh Dorri N.
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment Systema3sec
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdftwtester
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesAkihiro Suda
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit어형 이
 
The State of Rootless Containers
The State of Rootless ContainersThe State of Rootless Containers
The State of Rootless ContainersAkihiro Suda
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux DevelopersOpersys inc.
 

Similaire à Systemd for developers (20)

Linux Kernel Development
Linux Kernel DevelopmentLinux Kernel Development
Linux Kernel Development
 
Lecture 4 Cluster Computing
Lecture 4 Cluster ComputingLecture 4 Cluster Computing
Lecture 4 Cluster Computing
 
the NML project
the NML projectthe NML project
the NML project
 
.ppt
.ppt.ppt
.ppt
 
Introduction to NetBSD kernel
Introduction to NetBSD kernelIntroduction to NetBSD kernel
Introduction to NetBSD kernel
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
Node js meetup
Node js meetupNode js meetup
Node js meetup
 
Commit to excellence - Java in containers
Commit to excellence - Java in containersCommit to excellence - Java in containers
Commit to excellence - Java in containers
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
Introduction To Linux Kernel Modules
Introduction To Linux Kernel ModulesIntroduction To Linux Kernel Modules
Introduction To Linux Kernel Modules
 
Lightweight Virtualization in Linux
Lightweight Virtualization in LinuxLightweight Virtualization in Linux
Lightweight Virtualization in Linux
 
App container rkt
App container rktApp container rkt
App container rkt
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdf
 
The internals and the latest trends of container runtimes
The internals and the latest trends of container runtimesThe internals and the latest trends of container runtimes
The internals and the latest trends of container runtimes
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit
 
The State of Rootless Containers
The State of Rootless ContainersThe State of Rootless Containers
The State of Rootless Containers
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Studienarb linux kernel-dev
Studienarb linux kernel-devStudienarb linux kernel-dev
Studienarb linux kernel-dev
 

Plus de Alison Chaiken

Not breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABINot breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABIAlison Chaiken
 
Supporting SW Update via u-boot and GPT/EFI
Supporting SW Update via u-boot and GPT/EFISupporting SW Update via u-boot and GPT/EFI
Supporting SW Update via u-boot and GPT/EFIAlison Chaiken
 
Two C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsTwo C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsAlison Chaiken
 
V2X Communications: Getting our Cars Talking
V2X Communications: Getting our Cars TalkingV2X Communications: Getting our Cars Talking
V2X Communications: Getting our Cars TalkingAlison Chaiken
 
Practical Challenges to Deploying Highly Automated Vehicles
Practical Challenges to Deploying Highly Automated VehiclesPractical Challenges to Deploying Highly Automated Vehicles
Practical Challenges to Deploying Highly Automated VehiclesAlison Chaiken
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first secondAlison Chaiken
 
Functional AI and Pervasive Networking in Automotive
 Functional AI and Pervasive Networking in Automotive Functional AI and Pervasive Networking in Automotive
Functional AI and Pervasive Networking in AutomotiveAlison Chaiken
 
Flash in Vehicles: an End-User's Perspective
Flash in Vehicles: an End-User's PerspectiveFlash in Vehicles: an End-User's Perspective
Flash in Vehicles: an End-User's PerspectiveAlison Chaiken
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first secondAlison Chaiken
 
Automotive Linux, Cybersecurity and Transparency
Automotive Linux, Cybersecurity and TransparencyAutomotive Linux, Cybersecurity and Transparency
Automotive Linux, Cybersecurity and TransparencyAlison Chaiken
 
Developing Automotive Linux
Developing Automotive LinuxDeveloping Automotive Linux
Developing Automotive LinuxAlison Chaiken
 
Technology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected CarTechnology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected CarAlison Chaiken
 
Best practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-treeBest practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-treeAlison Chaiken
 
The “Telematics Horizon” V2V and V2I Networking
The “Telematics Horizon” V2V and V2I NetworkingThe “Telematics Horizon” V2V and V2I Networking
The “Telematics Horizon” V2V and V2I NetworkingAlison Chaiken
 
Developing automotive Linux
Developing automotive LinuxDeveloping automotive Linux
Developing automotive LinuxAlison Chaiken
 
Automotive Free Software 2013: "Right to Repair" and Privacy
Automotive Free Software 2013: "Right to Repair" and PrivacyAutomotive Free Software 2013: "Right to Repair" and Privacy
Automotive Free Software 2013: "Right to Repair" and PrivacyAlison Chaiken
 
Addressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAddressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAlison Chaiken
 
Tier X and the Coming of the Whitebox Car
Tier X and the Coming of the Whitebox CarTier X and the Coming of the Whitebox Car
Tier X and the Coming of the Whitebox CarAlison Chaiken
 
Booth content from Maker Faire Bay Area 2012
Booth content from Maker Faire Bay Area 2012Booth content from Maker Faire Bay Area 2012
Booth content from Maker Faire Bay Area 2012Alison Chaiken
 
From Driver Distraction to Driver Augmentation: Open Source in Cars
From Driver Distraction to Driver Augmentation: Open Source in CarsFrom Driver Distraction to Driver Augmentation: Open Source in Cars
From Driver Distraction to Driver Augmentation: Open Source in CarsAlison Chaiken
 

Plus de Alison Chaiken (20)

Not breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABINot breaking userspace: the evolving Linux ABI
Not breaking userspace: the evolving Linux ABI
 
Supporting SW Update via u-boot and GPT/EFI
Supporting SW Update via u-boot and GPT/EFISupporting SW Update via u-boot and GPT/EFI
Supporting SW Update via u-boot and GPT/EFI
 
Two C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp InsightsTwo C++ Tools: Compiler Explorer and Cpp Insights
Two C++ Tools: Compiler Explorer and Cpp Insights
 
V2X Communications: Getting our Cars Talking
V2X Communications: Getting our Cars TalkingV2X Communications: Getting our Cars Talking
V2X Communications: Getting our Cars Talking
 
Practical Challenges to Deploying Highly Automated Vehicles
Practical Challenges to Deploying Highly Automated VehiclesPractical Challenges to Deploying Highly Automated Vehicles
Practical Challenges to Deploying Highly Automated Vehicles
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
Functional AI and Pervasive Networking in Automotive
 Functional AI and Pervasive Networking in Automotive Functional AI and Pervasive Networking in Automotive
Functional AI and Pervasive Networking in Automotive
 
Flash in Vehicles: an End-User's Perspective
Flash in Vehicles: an End-User's PerspectiveFlash in Vehicles: an End-User's Perspective
Flash in Vehicles: an End-User's Perspective
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
Automotive Linux, Cybersecurity and Transparency
Automotive Linux, Cybersecurity and TransparencyAutomotive Linux, Cybersecurity and Transparency
Automotive Linux, Cybersecurity and Transparency
 
Developing Automotive Linux
Developing Automotive LinuxDeveloping Automotive Linux
Developing Automotive Linux
 
Technology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected CarTechnology, Business and Regulation of the Connected Car
Technology, Business and Regulation of the Connected Car
 
Best practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-treeBest practices for long-term support and security of the device-tree
Best practices for long-term support and security of the device-tree
 
The “Telematics Horizon” V2V and V2I Networking
The “Telematics Horizon” V2V and V2I NetworkingThe “Telematics Horizon” V2V and V2I Networking
The “Telematics Horizon” V2V and V2I Networking
 
Developing automotive Linux
Developing automotive LinuxDeveloping automotive Linux
Developing automotive Linux
 
Automotive Free Software 2013: "Right to Repair" and Privacy
Automotive Free Software 2013: "Right to Repair" and PrivacyAutomotive Free Software 2013: "Right to Repair" and Privacy
Automotive Free Software 2013: "Right to Repair" and Privacy
 
Addressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPCAddressing the hard problems of automotive Linux: networking and IPC
Addressing the hard problems of automotive Linux: networking and IPC
 
Tier X and the Coming of the Whitebox Car
Tier X and the Coming of the Whitebox CarTier X and the Coming of the Whitebox Car
Tier X and the Coming of the Whitebox Car
 
Booth content from Maker Faire Bay Area 2012
Booth content from Maker Faire Bay Area 2012Booth content from Maker Faire Bay Area 2012
Booth content from Maker Faire Bay Area 2012
 
From Driver Distraction to Driver Augmentation: Open Source in Cars
From Driver Distraction to Driver Augmentation: Open Source in CarsFrom Driver Distraction to Driver Augmentation: Open Source in Cars
From Driver Distraction to Driver Augmentation: Open Source in Cars
 

Dernier

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Christo Ananth
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 

Dernier (20)

Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...Call for Papers - International Journal of Intelligent Systems and Applicatio...
Call for Papers - International Journal of Intelligent Systems and Applicatio...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 

Systemd for developers

  • 1. systemd for developers Alison Chaiken alison@she-devel.com http://she-devel.com Feb. 21, 2015 Text in blue is hyperlinked. On-the-fly audience exercises.
  • 3. Topics ● Motivation ● Design of systemd ● Comparison with sysVinit ● Integration of systemd with kernel features ● Some tips for users and developers
  • 4. Linux needs to keep innovating LicensedunderCCBY-SA3.0 http://commons.wikimedia.org/wiki/File:Fire-lite-bg- 10.jpg#mediaviewer/File:Fire-lite-bg-10.jpg “No one has a guaranteed position in the technology industry.” -- Bill Gates, Pirates of Silicon Valley “The only thing that can ever hurt Linux is Linux itself.” -- GKH, Linux Action Show “Success is a self-correcting phenomenom.” -- Gary Hamel
  • 7. One daemon to rule them all xinetd: a daemon to lazily launch internet services when activity is detected on an AF_INET socket systemd: a daemon to lazily launch any system service when activity is detected on an AF_UNIX socket (oversimplification)
  • 8. ● modular; ● asynchronous and concurrent; ● described by declarative sets of properties; ● bundled with analysis tools and tests; ● features a fully language-agnostic API. systemd is:
  • 9. sysVinit runlevels ≈ systemd targets ● Targets are synchronization points for boot. ● Check /lib/systemd/system/runlevel?.target symlinks: multi-user.target.wants (runlevel 3 == text session) graphical.target.wants (runlevel 5 == graphical session) ● Select boot-target : – via /etc/systemd/system/default.target symlink; – appending number ('3' or '5') or systemd.unit=<target> to kernel cmdline; ● Change current target with runlevel, telinit – or systemctl isolate <something>.target
  • 10. init.d scripts Þ systemd units ● Unit's action and parameters: ExecStart= ● Dependencies: Before=, After=, Requires=, Conflicts= and Wants=. ● Default dependencies: – Requires= and After= on basic.target; – Conflicts= and Before= on shutdown.target. ● Types of unit files: service, socket, device, mount, scope, slice, automount, swap, target, path, timer, snapshot
  • 11. Understanding dependencies Try: systemctl list-dependencies basic.target systemctl list-dependencies –after tmp.mount
  • 12. Try: systemd-analyze dot rescue.target systemd-analyze dot basic.target > basic.dot dot -Tsvg basic.dot -o basic.svg eog basic.svg (or view basic.svg with any web browser) Understanding dependencies, p. 2
  • 13. Hierarchy of unit files for system and user sessions ● Organized into system and user units ● /lib/systemd/system: systemd upstream defaults for system-wide services ● /etc/systemd/system: local customizations by override and extension ● /lib/systemd/user/: systemd's upstream defaults for per- user services ● $HOME/.local/share/systemd/user/ for user-installed units ● 'drop-ins' are run-time extensions
  • 14. [system and user units: gnome-weather demo]
  • 15.
  • 17. SysV already has a big service manager: bash [user@localhost]$ wc -l /sbin/init 64 [user@localhost]$ wc -l /bin/bash 4154 [user@localhost]$ wc -l /lib/systemd/systemd 5944
  • 18. which services are started by sysVinit? Try: 'ls/etc/init.d'
  • 19. Which daemons started by systemd directly? Try: 'ls /lib/systemd/system/*.service' Try: 'systemctl list-sockets'
  • 20. Major Differences with SysVInit clean environment socket-based activation
  • 22. [Socket activation demo with cups and ncat]
  • 23. using the systemd journal ● Run “addgroup $USER systemd- journal” for access. ● Can be cryptographically signed. ● Log-reading tools are simple: Try: journalctl -xn journalctl -p err journalctl -u cron journalctl --list-boots systemctl status systemctl is-failed bluetooth systemctl --failed
  • 24. integration of systemd with kernel features
  • 25. systemd and cgroups ● cgroups are a kernel-level mechanism for allocating resources like storage, memory, CPU and network ● systemd slices are groups of daemons whose resources are managed jointly. ● systemd scopes are similar groups of user processes. ● Can set BlockIOWeight, IOSchedulingPriority, OOMScoreAdjust, CPUShares, MemoryLimit … Try: sudo systemd-cgls sudo systemd-cgtop
  • 26. systemd and udev ● udev is a kernel facility that handles device events. – merged into the systemd project. ● Rules are enabled by placement in /lib/udev/rules.d, unlike systemd unit enablement. ● Rule loading is ordered by numeric filename prefix, like old sysVinit scripts.
  • 27. udev is still old-school Try: ls /lib/udev/rules.d cat /lib/udev/rules.d/99-systemd.rules
  • 28. systemd and security: granular encapsulationvia kernel's capabilities ● PrivateTmp, PrivateDevices, PrivateNetwork ● JoinNamespaces ● ProtectSystem (/usr and /etc), ProtectHome ● ReadOnlyDirectories, InaccessibleDirectories ● systemd-nspawn: systemd's native containers ● Easy configuration of kernel's capability properties
  • 29. developing systemd ● git clone git://anongit.freedesktop.org/systemd/systemd ● systemd-devel list: submit patches or ask questions ● Impressive and featureful utility library in src/shared/ #define streq(a,b) (strcmp((a),(b)) == 0) #define strneq(a, b, n) (strncmp((a), (b), (n)) == 0) #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) ● Complex but automated build system with many dependencies. ● 'Plumbing' dev tools in /lib/systemd, 'porcelain' tools in /bin find /lib/systemd -executable -type f
  • 30. Summary ● Systemd has: – a superior design; – tight integration with the Linux kernel; – a vibrant developer community. ● Control has migrated away from distros toward kernel and freedesktop.org. ● Most users will not notice. ● systemd exemplifies the modernization Linux needs to stay relevant and competitive.
  • 31. Resources ● Man pages are part of systemd git repo. ● freedesktop.org: systemd mailing list archives and wiki ● At Poettering's 0pointer.de blog ● ➟At wayback machine: “Booting up” articles ● Neil Brown series at LWN ● ➟Fedora's SysVinit to systemd cheatsheet ● Steve Smethurst's Hacker Public Radio episode ● Josh Triplett's Debconf talk video ● Linux Action Show interviews with Mark Shuttleworth and Lennart Poettering
  • 32. Thanks ● Mentor Graphics for sending me to Germany to hack on systemd. ● Vladimir Pantelic, Tom Gundersen and Lennart Poettering for corrections of an earlier version (without implied 'ack'). ● Ivan Shapovalov and Mantas Mikulènas for answering questions. ● Bill Ward and Jym Dyer for use of their images.
  • 36. Modularity can produce complexity photo courtesy Bill Ward
  • 37. systemd and outside projects: CoreOS ● networkd was initially contributed by CoreOS developers. ● CoreOS's fleet “tool that presents your entire cluster as a single init system” is based on systemd. – Spin up new containers due to events on sockets. ● CoreOS devs are outside systemd inner circle. ● systemd has many patches from Arch, Intel, Debian . . .
  • 38. systemd in embedded systems ● systemd is widely adopted in embedded systems because – proper allocation of resources is critical; – fastboot is required; – customization of boot sequence is common. ● Lack of backward compatibility for older kernels (due to firmware loading) is a pain point. ● Embedded use cases are not always understood by systemd devs.
  • 39. [runlevel demo with Fedora Qemu and Firefox] Try: 'systemctl isolate multi-user.target' [warning: KILLS X11]
  • 40. systemd is easy to use ● systemd utilities: – Try: apropos systemd | grep ctl ● All-ASCII configuration files: no hidden “registry”. ● Customization is by overriding default files. ● Many choices are controllable via symlinks. ● Bash-completion by default. ● Backwards compatibility with SysVinit
  • 41. Override your defaults! photo courtesy Jym Dyer ● Replace a unit in /lib (upstream) by creating one of the same name in /etc (local changes). ● Add services to boot by symlinking them into /etc/systemd/system/default.target.wants. ● 'mask' unit with link to /dev/null. ● Best practice: do not change the files in /lib/systemd. ● Read in-use unit with 'systemctl cat'.
  • 42. Extensions: drop-ins Try: systemd-delta Try: systemctl cat <list from 1st command>
  • 43. Old way New way History X11 manages graphics memory Kernel's drm manages graphics memory “Linux Graphics Drivers: an I ntroduction,” p. 26 static /dev, then devfs udev getrlimit, setrlimit cgroups KDE3 and GNOME2 KDE4 and GNOME3 KDE and GNOME sysVinit systemd in progress X11 client-server model Wayland compositor
  • 44. Crux of the problem: Dave Neary “There is no freedesktop.org process for proposing standards, identifying those which are proposals and those which are de facto implemented, and perhaps more importantly, there is no process for building consensus around a specification . . .” (comment regarding GNOME3)
  • 45. systemd is . . . ● the basis of Fedora, RHEL, CentOS, OpenSUSE, Ubuntu, Debian and much embedded. ● praised by Jordan Hubbard of FreeBSD. ● tightly integrated with Linux kernel cgroups. ● the reference implementation for udev and for kdbus userspace access.
  • 46. Customizing your installation ● Replace a unit in /lib (upstream) by creating one of the same name in /etc (local changes). ● Add services to boot by symlinking them into /etc/systemd/system/default.target.wants. ● Best practice: do not change the files in /lib/systemd
  • 47. Sequence of targets on a typical system >$ ls -l /lib/systemd/system/default.target /lib/systemd/system/default.target -> graphical.target >$ cat /lib/systemd/system/graphical.target After=multi-user.target >$ cat /lib/systemd/system/multi-user.target After=basic.target >$ cat /lib/systemd/system/basic.target After=sysinit.target sockets.target timers.target paths.target slices.target
  • 48. Example: set display manager [user@localhost ~]$ ls -l `locate display-manager.service` lrwxrwxrwx. 1 root root 35 Dec 11 2013 /etc/systemd/system/display-manager.service -> /usr/lib/systemd/system/gdm.service [user@localhost ~]$ cat /usr/lib/systemd/system/gdm.service [Unit] Description=GNOME Display Manager [ . . . ] [Install] Alias=display-manager.service or WantedBy=graphical.target
  • 49. sysinit, sockets and multi-user are composite targets >$ ls /lib/systemd/system/multi-user.target.wants/ dbus.service@ systemd-ask-password-wall.path@ systemd- update-utmp-runlevel.service@ getty.target@ >$ ls /lib/systemd/system/sockets.target.wants: dbus.socket@ systemd-shutdownd.socket@ systemd-initctl.socket@ systemd-udevd-control.socket@ >$ ls /lib/systemd/system/sysinit.target.wants: cryptsetup.target@ systemd-journald.service@ debian-fixup.service@ systemd-journal-flush.service@ Symlinks replace lines of conditional code in SysVinit scripts.
  • 50. Example: change the default target [alison@localhost ~]$ ls /etc/systemd/system/default.target /etc/systemd/system/default.target -> /lib/systemd/system/graphical.target [alison@localhost ~]$ sudo rm /etc/systemd/system/default.target [alison@localhost ~]$ sudo ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target [alison@localhost ~]$ ~/bin/systemd-delta [ . . . ] [REDIRECTED] /etc/systemd/system/default.target → /usr/lib/systemd/system/default.target
  • 51. Misconceptions ● systemd is more complex than sysVinit. ● systemd is full of binary configuration files. ● The system log is now unreadable! And liable to corruption! ● {Fedora/GNOME/RedHat/Poettering} are trying to take over all of Linux.
  • 52. problems ● systemd is modular, but: – interopability with other SW may be inadequately tested. ● Potentially rocky piecemeal transition by distros. – e.g., Debian installer doesn't warn about a separate /usr partition. ● Merciless deprecation of features (firmware loading, readahead . . . ). ● Frequent releases, not particularly stable.
  • 53. Taxonomy of systemd dependencies Requires, RequiresOverridable, Requisite, RequisiteOverridable, Wants, BindsTo, PartOf, Conflicts, Before, After, OnFailure PropagateReloadsTo, ReloadPropagateFrom,