SlideShare a Scribd company logo
1 of 42
Download to read offline
Glenn HolmerGlenn Holmer 
Milwaukee GroupMilwaukee Linux Users Group 
June 2014June 14, 2014 
systemd: Linuxsystemd: the new init system for Linux
History
init, the father of processes 
✔BIOS loads bootloader from hard drive 
✔bootloader loads GRUB 
✔GRUB loads kernel 
✔kernel mounts filesystems and loads drivers 
✔kernel starts first process (init)
sysvinit startup 
✔init looks for default runlevel and runs its scripts to start the appropriate services 
✔each runlevel has a directory /etc/rcN.d/ with start and stop symlinks to scripts in /etc/init.d
init systemstraditional:sysvinit (Linux) alternate:OpenRC (Gentoo), upstart (Ubuntu) other OS:BSD, SMF (Solaris), launchd (Mac)
What's wrong with sysvinit? synchronouseverything started at boot timecan't control double-forked child processes
What's better about systemd? asynchronousservices started only when needed (via socket) services run in cgroups
Why is systemd controversial? “do one thing and do it well” (feature creep) depends on dbus/kdbusLinux-specific (because of cgroups) binary log file (the journal) http://0pointer.de/blog/projects/the-biggest-myths.html
Why is systemd controversial? “do one thing and do it well” (feature creep) depends on dbus/kdbusLinux-specific (because of cgroups) binary log file (the journal) http://0pointer.de/blog/projects/the-biggest-myths.htmlpersonality conflicts...
systemd adoptionUbuntu:upstart 2006 (native init 2009) Fedora: upstart 2008, systemd 2011RHEL:RHEL 7 (just released) uses systemdSUSE:upstart option 2010, systemd 2011SLES:SLES 12 (Q3) will use systemdDebian:systemd 2014, Ubuntu will follow
Mechanics
Why is sysvinit synchronous? services wait for their dependencies(which open a socket when ready)
Why not open the socket on startup? services with dependencies can start at oncesocket buffer holds messages until ready
Why is sysvinit slow? shell scripts! (shell loaded over and over) multiple invocations of grep, awk, sed...
Why not use configuration files? in /usr/lib/systemd/systemlocals, overrides in /etc/systemd/system
[Unit] Description=PostgreSQL database serverAfter=network.target[Service] Type=forkingUser=postgresGroup=postgresEnvironment=PGPORT=5432Environment=PGDATA=/var/lib/pgsql/dataOOMScoreAdjust=-1000ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300ExecStop=/usr/bin/pg_ctl stop -D ${PGDATA} -s -m fastExecReload=/usr/bin/pg_ctl reload -D ${PGDATA} -sTimeoutSec=300[Install] WantedBy=multi-user.target
some systemd unit types: service:traditional daemon (ssh, http, kdm...) socket:listener socket for service activationtarget:like a runlevel, but not exclusive
no /etc/inittab: 
/etc/systemd/system/default.target 
is a symlink to e.g. 
/lib/systemd/system/graphical.target
some distros use symlinks: runlevel0.target -> poweroff.targetrunlevel1.target -> rescue.targetrunlevel2.target -> multi-user.targetrunlevel3.target -> multi-user.targetrunlevel4.target -> multi-user.targetrunlevel5.target -> graphical.targetrunlevel6.target -> reboot.target
more unit types: slice:resource control via cgroups(can control CPU share, memory usage, IO bandwidth, device access) snapshot:saves current runtime state, can return to it with isolate(lost on reboot)
more unit types: device:when device is ready (udev) mount:(/etc/fstab still preferred) 
automount:(requires matching mount unit) 
swap:swap space 
path:unit activation on path change 
timer:event based on boot time, time since a unit's activation, calendar time
sysvinit compatibility“virtual” service units created in-memorylook for LSB: or SYSV: in the output of systemd list-unitsservice,chkconfig,telinit... still workfor more information: freedesktop.org/wiki/Software/systemd/Incompatibilities/
Usage
GUI front-end for systemd: systemadmOn Fedora 20 and OpenSUSE 13.1, installsystemd-ui package. Good for exploring and learning systemd.
Most frequently-used commands: systemctljournalctlCompletion prompting and color coding!
systemctl [list-units] systemctl list-unit-filessystemctl -t servicesystemctl –-state failedsystemctl enable <servicename> systemctl start <servicename> systemctl status <servicename> systemctl daemon-reloadsystemctl halt
journalctl -f(follow, like tail -f) journalctl -x(show extra) journalctl -n99(last 99 entries) journalctl -b(since boot) journalctl -b -1(since previous boot) journalctl --since(since date/time) journalctl -p err(by priority) journalctl -u(by unit) journalctl /usr/...(by executable) journalctl /dev/...(by device)
switch “runlevel”: 
systemctl isolate <target-name> 
emergency boot: start kernel with 
systemd.unit=<target-name>
systemd diagnostics: systemd-cgls(“control group ls”) systemd-cgtop(“control group top”) systemd-analyzesystemd-analyze blamesystemd-analyze plot > filename.svgsystemd-analyze dot |  dot -Tsvg > systemd.svg
Example
resources: 
overview: 
http://www.freedesktop.org/wiki/Software/systemd/ 
“Demystifying systemd” slides: 
http://bit.ly/1jm87CJ 
“Getting Ready for Systemd” video: 
https://access.redhat.com/site/videos/403833

More Related Content

What's hot

Your first dive into systemd!
Your first dive into systemd!Your first dive into systemd!
Your first dive into systemd!Etsuji Nakai
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
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 for developers
Systemd for developersSystemd for developers
Systemd for developersAlison Chaiken
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawnGábor Nyers
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratchjoshuasoundcloud
 
Linux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPSLinux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPSjoshuasoundcloud
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embeddedAlison Chaiken
 
Linux: Hardware Settings
Linux: Hardware SettingsLinux: Hardware Settings
Linux: Hardware SettingsJohn Ombagi
 
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
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sMydbops
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Neeraj Shrimali
 

What's hot (20)

Basic of Systemd
Basic of SystemdBasic of Systemd
Basic of Systemd
 
Your first dive into systemd!
Your first dive into systemd!Your first dive into systemd!
Your first dive into systemd!
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
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 for developers
Systemd for developersSystemd for developers
Systemd for developers
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
 
Rhel6 vs rhel7
Rhel6 vs rhel7Rhel6 vs rhel7
Rhel6 vs rhel7
 
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
 
Systemd cheatsheet
Systemd cheatsheetSystemd cheatsheet
Systemd cheatsheet
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Linux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPSLinux Containers From Scratch: Makfile MicroVPS
Linux Containers From Scratch: Makfile MicroVPS
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Tuning systemd for embedded
Tuning systemd for embeddedTuning systemd for embedded
Tuning systemd for embedded
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux: Hardware Settings
Linux: Hardware SettingsLinux: Hardware Settings
Linux: Hardware Settings
 
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
 
Linux Run Level
Linux Run LevelLinux Run Level
Linux Run Level
 
Linux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA'sLinux monitoring and Troubleshooting for DBA's
Linux monitoring and Troubleshooting for DBA's
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
 

Viewers also liked

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
 
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 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
 
Introduction to Red Hat
Introduction to Red HatIntroduction to Red Hat
Introduction to Red HatAlbert Wong
 

Viewers also liked (11)

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
 
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 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
 
Introduction to Red Hat
Introduction to Red HatIntroduction to Red Hat
Introduction to Red Hat
 

Similar to Systemd mlug-20140614

Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Seungha Son
 
X64 Workshop Linux Information Gathering
X64 Workshop Linux Information GatheringX64 Workshop Linux Information Gathering
X64 Workshop Linux Information GatheringAero Plane
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemdDenis Kovalev
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersVaibhav Sharma
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administratorsSusant Sahani
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administratorsSusant Sahani
 
LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager Alison Chaiken
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1Hajime Tazaki
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon processAbubakr Cheema
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Vincent Batts
 

Similar to Systemd mlug-20140614 (20)

Linux startup
Linux startupLinux startup
Linux startup
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
.ppt
.ppt.ppt
.ppt
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
X64 Workshop Linux Information Gathering
X64 Workshop Linux Information GatheringX64 Workshop Linux Information Gathering
X64 Workshop Linux Information Gathering
 
systemd
systemdsystemd
systemd
 
От sysV к systemd
От sysV к systemdОт sysV к systemd
От sysV к systemd
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Introduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & ContainersIntroduction to OS LEVEL Virtualization & Containers
Introduction to OS LEVEL Virtualization & Containers
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administrators
 
Systemd for administrators
Systemd for administratorsSystemd for administrators
Systemd for administrators
 
LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager LISA15: systemd, the Next-Generation Linux System Manager
LISA15: systemd, the Next-Generation Linux System Manager
 
Unix 3 en
Unix 3 enUnix 3 en
Unix 3 en
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
 
Project of deamon process
Project of deamon processProject of deamon process
Project of deamon process
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 

More from Susant Sahani

How to debug systemd problems fedora project
How to debug systemd problems   fedora projectHow to debug systemd problems   fedora project
How to debug systemd problems fedora projectSusant Sahani
 
Systemd vs-sys vinit-cheatsheet.jpg
Systemd vs-sys vinit-cheatsheet.jpgSystemd vs-sys vinit-cheatsheet.jpg
Systemd vs-sys vinit-cheatsheet.jpgSusant Sahani
 
Interface between kernel and user space
Interface between kernel and user spaceInterface between kernel and user space
Interface between kernel and user spaceSusant Sahani
 
Van jaconson netchannels
Van jaconson netchannelsVan jaconson netchannels
Van jaconson netchannelsSusant Sahani
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linuxSusant Sahani
 
How to-simulate-network-devices
How to-simulate-network-devicesHow to-simulate-network-devices
How to-simulate-network-devicesSusant Sahani
 
L kernel-logging-apis-pdf
L kernel-logging-apis-pdfL kernel-logging-apis-pdf
L kernel-logging-apis-pdfSusant Sahani
 
Introduction to freebsd_6_kernel_hacking
Introduction to freebsd_6_kernel_hackingIntroduction to freebsd_6_kernel_hacking
Introduction to freebsd_6_kernel_hackingSusant Sahani
 
Www.dedoimedo.com crash-book
Www.dedoimedo.com crash-bookWww.dedoimedo.com crash-book
Www.dedoimedo.com crash-bookSusant Sahani
 

More from Susant Sahani (17)

systemd
systemdsystemd
systemd
 
How to debug systemd problems fedora project
How to debug systemd problems   fedora projectHow to debug systemd problems   fedora project
How to debug systemd problems fedora project
 
Systemd vs-sys vinit-cheatsheet.jpg
Systemd vs-sys vinit-cheatsheet.jpgSystemd vs-sys vinit-cheatsheet.jpg
Systemd vs-sys vinit-cheatsheet.jpg
 
Systemd
SystemdSystemd
Systemd
 
Interface between kernel and user space
Interface between kernel and user spaceInterface between kernel and user space
Interface between kernel and user space
 
Week3 binary trees
Week3 binary treesWeek3 binary trees
Week3 binary trees
 
Van jaconson netchannels
Van jaconson netchannelsVan jaconson netchannels
Van jaconson netchannels
 
Trees
TreesTrees
Trees
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linux
 
Demo preorder-stack
Demo preorder-stackDemo preorder-stack
Demo preorder-stack
 
Bacnet white paper
Bacnet white paperBacnet white paper
Bacnet white paper
 
Api presentation
Api presentationApi presentation
Api presentation
 
How to-simulate-network-devices
How to-simulate-network-devicesHow to-simulate-network-devices
How to-simulate-network-devices
 
L kernel-logging-apis-pdf
L kernel-logging-apis-pdfL kernel-logging-apis-pdf
L kernel-logging-apis-pdf
 
Introduction to freebsd_6_kernel_hacking
Introduction to freebsd_6_kernel_hackingIntroduction to freebsd_6_kernel_hacking
Introduction to freebsd_6_kernel_hacking
 
Www.dedoimedo.com crash-book
Www.dedoimedo.com crash-bookWww.dedoimedo.com crash-book
Www.dedoimedo.com crash-book
 
Sctp tutorial
Sctp tutorialSctp tutorial
Sctp tutorial
 

Recently uploaded

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Recently uploaded (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Systemd mlug-20140614

  • 1. Glenn HolmerGlenn Holmer Milwaukee GroupMilwaukee Linux Users Group June 2014June 14, 2014 systemd: Linuxsystemd: the new init system for Linux
  • 3. init, the father of processes ✔BIOS loads bootloader from hard drive ✔bootloader loads GRUB ✔GRUB loads kernel ✔kernel mounts filesystems and loads drivers ✔kernel starts first process (init)
  • 4. sysvinit startup ✔init looks for default runlevel and runs its scripts to start the appropriate services ✔each runlevel has a directory /etc/rcN.d/ with start and stop symlinks to scripts in /etc/init.d
  • 5. init systemstraditional:sysvinit (Linux) alternate:OpenRC (Gentoo), upstart (Ubuntu) other OS:BSD, SMF (Solaris), launchd (Mac)
  • 6.
  • 7. What's wrong with sysvinit? synchronouseverything started at boot timecan't control double-forked child processes
  • 8. What's better about systemd? asynchronousservices started only when needed (via socket) services run in cgroups
  • 9. Why is systemd controversial? “do one thing and do it well” (feature creep) depends on dbus/kdbusLinux-specific (because of cgroups) binary log file (the journal) http://0pointer.de/blog/projects/the-biggest-myths.html
  • 10. Why is systemd controversial? “do one thing and do it well” (feature creep) depends on dbus/kdbusLinux-specific (because of cgroups) binary log file (the journal) http://0pointer.de/blog/projects/the-biggest-myths.htmlpersonality conflicts...
  • 11.
  • 12. systemd adoptionUbuntu:upstart 2006 (native init 2009) Fedora: upstart 2008, systemd 2011RHEL:RHEL 7 (just released) uses systemdSUSE:upstart option 2010, systemd 2011SLES:SLES 12 (Q3) will use systemdDebian:systemd 2014, Ubuntu will follow
  • 14. Why is sysvinit synchronous? services wait for their dependencies(which open a socket when ready)
  • 15. Why not open the socket on startup? services with dependencies can start at oncesocket buffer holds messages until ready
  • 16. Why is sysvinit slow? shell scripts! (shell loaded over and over) multiple invocations of grep, awk, sed...
  • 17. Why not use configuration files? in /usr/lib/systemd/systemlocals, overrides in /etc/systemd/system
  • 18. [Unit] Description=PostgreSQL database serverAfter=network.target[Service] Type=forkingUser=postgresGroup=postgresEnvironment=PGPORT=5432Environment=PGDATA=/var/lib/pgsql/dataOOMScoreAdjust=-1000ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o "-p ${PGPORT}" -w -t 300ExecStop=/usr/bin/pg_ctl stop -D ${PGDATA} -s -m fastExecReload=/usr/bin/pg_ctl reload -D ${PGDATA} -sTimeoutSec=300[Install] WantedBy=multi-user.target
  • 19. some systemd unit types: service:traditional daemon (ssh, http, kdm...) socket:listener socket for service activationtarget:like a runlevel, but not exclusive
  • 20. no /etc/inittab: /etc/systemd/system/default.target is a symlink to e.g. /lib/systemd/system/graphical.target
  • 21. some distros use symlinks: runlevel0.target -> poweroff.targetrunlevel1.target -> rescue.targetrunlevel2.target -> multi-user.targetrunlevel3.target -> multi-user.targetrunlevel4.target -> multi-user.targetrunlevel5.target -> graphical.targetrunlevel6.target -> reboot.target
  • 22. more unit types: slice:resource control via cgroups(can control CPU share, memory usage, IO bandwidth, device access) snapshot:saves current runtime state, can return to it with isolate(lost on reboot)
  • 23. more unit types: device:when device is ready (udev) mount:(/etc/fstab still preferred) automount:(requires matching mount unit) swap:swap space path:unit activation on path change timer:event based on boot time, time since a unit's activation, calendar time
  • 24. sysvinit compatibility“virtual” service units created in-memorylook for LSB: or SYSV: in the output of systemd list-unitsservice,chkconfig,telinit... still workfor more information: freedesktop.org/wiki/Software/systemd/Incompatibilities/
  • 25. Usage
  • 26. GUI front-end for systemd: systemadmOn Fedora 20 and OpenSUSE 13.1, installsystemd-ui package. Good for exploring and learning systemd.
  • 27.
  • 28. Most frequently-used commands: systemctljournalctlCompletion prompting and color coding!
  • 29. systemctl [list-units] systemctl list-unit-filessystemctl -t servicesystemctl –-state failedsystemctl enable <servicename> systemctl start <servicename> systemctl status <servicename> systemctl daemon-reloadsystemctl halt
  • 30. journalctl -f(follow, like tail -f) journalctl -x(show extra) journalctl -n99(last 99 entries) journalctl -b(since boot) journalctl -b -1(since previous boot) journalctl --since(since date/time) journalctl -p err(by priority) journalctl -u(by unit) journalctl /usr/...(by executable) journalctl /dev/...(by device)
  • 31. switch “runlevel”: systemctl isolate <target-name> emergency boot: start kernel with systemd.unit=<target-name>
  • 32. systemd diagnostics: systemd-cgls(“control group ls”) systemd-cgtop(“control group top”) systemd-analyzesystemd-analyze blamesystemd-analyze plot > filename.svgsystemd-analyze dot | dot -Tsvg > systemd.svg
  • 33.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42. resources: overview: http://www.freedesktop.org/wiki/Software/systemd/ “Demystifying systemd” slides: http://bit.ly/1jm87CJ “Getting Ready for Systemd” video: https://access.redhat.com/site/videos/403833