SlideShare a Scribd company logo
От sysV к systemd
Ковалев Денис
Уютный SysVinit
● кто не писал /etc/init.d/....
скрипты?
● unix way
● cron
● системные логи
Стоит ли переходить?
This is the Unix philosophy
1. Write programs that do one thing and
do it well.
2. Write programs to work together.
3. Write programs to handle text
streams, because that is a universal
interface.
Doug McIlroy
Сколько нужно команд, чтобы
узнать OS?
$ uname -a
$ cat /etc/issue
$ cat /etc/*release
$ cat /etc/*version
$ lsb_release -a
hostnamectl
$ hostnamectl
Static hostname: static.216.201.250.124.clients.de
Icon name: computer-vm
Chassis: vm
Machine ID: 426df1cf0ef241c8bac0ae65ebd450b2
Boot ID: 421a1f60665c4d2284cfb0e6ba190e17
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-327.18.2.el7.x86_64
Architecture: x86-64
Сколько нужно команд, чтобы
вкрутить лампочку?
$ /etc/init.d/lightbulb
$ chkconfig lightbulb on
$ /etc/supervisord.d/lightbulb.conf
+ logging
+ cron
systemctl
$ /usr/lib/systemd/system/lightbulb.service
$ systemctl enable lightbulb
sshd
[Unit]
Description=OpenSSH server daemon
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target sshd-keygen.service
Wants=sshd-keygen.service
sshd
[Service]
EnvironmentFile=/etc/sysconfig/sshd
ExecStart=/usr/sbin/sshd -D $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=42s
sshd
[Install]
WantedBy=multi-user.target
date
$ date
Thu Jun 30 06:59:40 UTC 2016
$ timedatectl
Local time: Thu 2016-06-30 06:59:40 UTC
Universal time: Thu 2016-06-30 06:59:40 UTC
RTC time: Thu 2016-06-30 06:59:40
Time zone: UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
2011 2012 2013 2014 2015
systemctl
● start
● stop
● reload
● restart
● try-restart
● reload-or-restart
● reload-or-try-restart
● kill
● is-active
● is-failed
● status
● show
● cat
● help
● enable
● disable
● reenable
● is-enabled
● mask
● unmask
● edit
● snapshot
● list-jobs
● cancel
● show-environment
● set-environment
● is-system-running
● list-dependencies
● rescue
● halt
● poweroff
● reboot
От sysV к systemd
systemctl status
$ systemctl status sshd
● sshd.service - OpenSSH server daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service;
enabled; vendor preset: enabled)
Active: active (running) since Thu 2016-06-09 14:50:43
UTC; 2 weeks 6 days ago
Docs: man:sshd(8)
man:sshd_config(5)
Main PID: 889 (sshd)
CGroup: /system.slice/sshd.service
└─889 /usr/sbin/sshd -D
Binary logs
$ journalctl -ex -u sshd | tail
Jun 15 05:09:50 example.com sshd[28300]: Connection closed by 84.227.235.191 [preauth]
Jun 15 05:10:28 example.com sshd[28387]: Connection closed by 90.103.213.98 [preauth]
Jun 15 05:14:18 example.com sshd[28704]: Received disconnect from 115.31.116.38: 11:
[preauth]
Jun 15 05:14:52 example.com sshd[28762]: Connection closed by 90.103.213.98 [preauth]
Jun 15 05:17:58 example.com sshd[29055]: Received disconnect from 125.18.238.11: 11:
[preauth]
Jun 15 05:19:12 example.com sshd[29144]: Connection closed by 90.103.213.98 [preauth]
Jun 15 05:23:34 example.com sshd[29559]: Connection closed by 90.103.213.98 [preauth]
Jun 15 05:23:46 example.com sshd[29564]: Received disconnect from 115.19.218.29: 11:
[preauth]
Jun 15 05:26:36 example.com sshd[29827]: Received disconnect from 111.31.119.26: 11:
[preauth]
Jun 15 05:27:57 example.com sshd[29934]: Connection closed by 90.103.213.98 [preauth]
Analyze boot time
$ systemd-analyze
Startup finished in 569ms (kernel) + 770ms (initrd) +
9.244s (userspace) = 10.584s
$ systemd-analyze critical-chain
multi-user.target @9.239s
└─tuned.service @6.201s +263ms
└─network.target @6.200s
└─network.service @5.678s +520ms
└─NetworkManager.service @794ms +51ms
└─basic.target @793ms
...
и не только...
● параллелизация
● cлежение за запущеными сервисами (systemd-cgls, systemd-
cgtop)
● взаимодействие с udev
● D-Bus API
● systemd-escape & systemd-path
● Запуск произвольной программы под systemd (systemd-run)
● Настройка локалей (localectl)
● ....
Спасибо за внимание
Ковалев Денис
skype: aikikode
email: aikikode@gmail.com
Ad

More Related Content

What's hot (20)

Haproxy - zastosowania
Haproxy - zastosowaniaHaproxy - zastosowania
Haproxy - zastosowania
Łukasz Jagiełło
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
Gluster.org
 
Containers: What are they, Really?
Containers: What are they, Really?Containers: What are they, Really?
Containers: What are they, Really?
Sneha Inguva
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
Agate Studio
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
Ashwajit Maske
 
Linux Containers (LXC)
Linux Containers (LXC)Linux Containers (LXC)
Linux Containers (LXC)
Vladimir Melnic
 
LSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVMLSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVM
Marian Marinov
 
Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013
Trevor Roberts Jr.
 
System Capa Planning_DBA oracle edu
System Capa Planning_DBA oracle eduSystem Capa Planning_DBA oracle edu
System Capa Planning_DBA oracle edu
엑셈
 
T.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - PreyT.Pollak y C.Yaconi - Prey
T.Pollak y C.Yaconi - Prey
StarTech Conference
 
On cassandra's evolution @ Berlin buzzwords
On cassandra's evolution @ Berlin buzzwordsOn cassandra's evolution @ Berlin buzzwords
On cassandra's evolution @ Berlin buzzwords
pcmanus
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Jonathan Franchesco Torres Baca
 
Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example
Gluster.org
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
Toshiaki Baba
 
Eduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhereEduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhere
StarTech Conference
 
Building a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitchBuilding a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitch
Goran Cetusic
 
Clase4 (consola linux)
Clase4 (consola linux)Clase4 (consola linux)
Clase4 (consola linux)
Miguel Eduardo Luces
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
Moby Project
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
UC Davis
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Ontico
 
Object Storage with Gluster
Object Storage with GlusterObject Storage with Gluster
Object Storage with Gluster
Gluster.org
 
Containers: What are they, Really?
Containers: What are they, Really?Containers: What are they, Really?
Containers: What are they, Really?
Sneha Inguva
 
Scalable Socket Server by Aryo
Scalable Socket Server by AryoScalable Socket Server by Aryo
Scalable Socket Server by Aryo
Agate Studio
 
3 manual installation of open vpn
3 manual installation of open vpn3 manual installation of open vpn
3 manual installation of open vpn
Ashwajit Maske
 
LSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVMLSA2 - 01 Virtualization with KVM
LSA2 - 01 Virtualization with KVM
Marian Marinov
 
Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013Couch to OpenStack: Glance - July, 23, 2013
Couch to OpenStack: Glance - July, 23, 2013
Trevor Roberts Jr.
 
System Capa Planning_DBA oracle edu
System Capa Planning_DBA oracle eduSystem Capa Planning_DBA oracle edu
System Capa Planning_DBA oracle edu
엑셈
 
On cassandra's evolution @ Berlin buzzwords
On cassandra's evolution @ Berlin buzzwordsOn cassandra's evolution @ Berlin buzzwords
On cassandra's evolution @ Berlin buzzwords
pcmanus
 
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virshCreación de máquinas virtuales basada en kernel usando qemu y virsh
Creación de máquinas virtuales basada en kernel usando qemu y virsh
Jonathan Franchesco Torres Baca
 
Practical Glusto Example
Practical Glusto ExamplePractical Glusto Example
Practical Glusto Example
Gluster.org
 
agri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertoragri inventory - nouka data collector / yaoya data convertor
agri inventory - nouka data collector / yaoya data convertor
Toshiaki Baba
 
Eduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhereEduardo Silva - monkey http-server everywhere
Eduardo Silva - monkey http-server everywhere
StarTech Conference
 
Building a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitchBuilding a network emulator with Docker and Open vSwitch
Building a network emulator with Docker and Open vSwitch
Goran Cetusic
 
Declare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and MobyDeclare your infrastructure: InfraKit, LinuxKit and Moby
Declare your infrastructure: InfraKit, LinuxKit and Moby
Moby Project
 
Prosit google-cloud
Prosit google-cloudProsit google-cloud
Prosit google-cloud
UC Davis
 
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Как понять, что происходит на сервере? / Александр Крижановский (NatSys Lab.,...
Ontico
 

Viewers also liked (15)

Global Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™ | Womens Health- ORAL HEALTHGlobal Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™
 
κυκλαδικος πολιτισμος
κυκλαδικος πολιτισμοςκυκλαδικος πολιτισμος
κυκλαδικος πολιτισμος
TRPAGONI
 
Pražský mezinárodní maraton, Joomla! a Medicus
Pražský mezinárodní maraton, Joomla! a MedicusPražský mezinárodní maraton, Joomla! a Medicus
Pražský mezinárodní maraton, Joomla! a Medicus
Kačka Kubová
 
умники и умницы текст
умники и умницы текстумники и умницы текст
умники и умницы текст
Елена Исакова
 
начальное техническое моделирование кривихина
начальное техническое моделирование кривихинаначальное техническое моделирование кривихина
начальное техническое моделирование кривихина
Елена Исакова
 
Joomla! v cloudu
Joomla! v clouduJoomla! v cloudu
Joomla! v cloudu
Kačka Kubová
 
программа леонович с
программа леонович спрограмма леонович с
программа леонович с
Елена Исакова
 
начальное техническое моделирование кривихина
начальное техническое моделирование кривихинаначальное техническое моделирование кривихина
начальное техническое моделирование кривихина
Елена Исакова
 
Consciousness
ConsciousnessConsciousness
Consciousness
TereRomoB
 
Бисероплетение зоря
Бисероплетение зоряБисероплетение зоря
Бисероплетение зоря
Елена Исакова
 
Form 7 1
Form 7 1Form 7 1
Form 7 1
Елена Исакова
 
townhouse trinity / single detached house / affordable and quality / locataed...
townhouse trinity / single detached house / affordable and quality / locataed...townhouse trinity / single detached house / affordable and quality / locataed...
townhouse trinity / single detached house / affordable and quality / locataed...
Suntrust Properties Incorporated (Official FB Page)
 
Урок 4
Урок 4Урок 4
Урок 4
Елена Исакова
 
Global Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™ | Womens Health- ORAL HEALTHGlobal Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™ | Womens Health- ORAL HEALTH
Global Medical Cures™
 
κυκλαδικος πολιτισμος
κυκλαδικος πολιτισμοςκυκλαδικος πολιτισμος
κυκλαδικος πολιτισμος
TRPAGONI
 
Pražský mezinárodní maraton, Joomla! a Medicus
Pražský mezinárodní maraton, Joomla! a MedicusPražský mezinárodní maraton, Joomla! a Medicus
Pražský mezinárodní maraton, Joomla! a Medicus
Kačka Kubová
 
начальное техническое моделирование кривихина
начальное техническое моделирование кривихинаначальное техническое моделирование кривихина
начальное техническое моделирование кривихина
Елена Исакова
 
начальное техническое моделирование кривихина
начальное техническое моделирование кривихинаначальное техническое моделирование кривихина
начальное техническое моделирование кривихина
Елена Исакова
 
Consciousness
ConsciousnessConsciousness
Consciousness
TereRomoB
 
Ad

Similar to От sysV к systemd (20)

Linux Du Jour
Linux Du JourLinux Du Jour
Linux Du Jour
mwedgwood
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptxRHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
AbdellahELMAMOUN
 
Systemd mlug-20140614
Systemd mlug-20140614Systemd mlug-20140614
Systemd mlug-20140614
Susant Sahani
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
維泰 蔡
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
Susant Sahani
 
Your first dive into systemd!
Your first dive into systemd!Your first dive into systemd!
Your first dive into systemd!
Etsuji Nakai
 
CoreOS Intro
CoreOS IntroCoreOS Intro
CoreOS Intro
Isaac Johnston
 
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
Alison Chaiken
 
Systemd
SystemdSystemd
Systemd
Susant Sahani
 
Systemd poettering
Systemd poetteringSystemd poettering
Systemd poettering
Susant Sahani
 
Daemons
DaemonsDaemons
Daemons
christina555
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
Seungha Son
 
The origin: Init (compact version)
The origin: Init (compact version)The origin: Init (compact version)
The origin: Init (compact version)
Tzung-Bi Shih
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init system
PaulWay
 
systemd
systemdsystemd
systemd
nussbauml
 
systemd
systemdsystemd
systemd
Susant Sahani
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
Alison Chaiken
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developers
Alison Chaiken
 
Systemd
SystemdSystemd
Systemd
Ganesh Bhosale
 
Linux Du Jour
Linux Du JourLinux Du Jour
Linux Du Jour
mwedgwood
 
Containers with systemd-nspawn
Containers with systemd-nspawnContainers with systemd-nspawn
Containers with systemd-nspawn
Gábor Nyers
 
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptxRHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
RHSA_1_Chapter_Resume_CONTRILE_SERVCIES.pptx
AbdellahELMAMOUN
 
Systemd mlug-20140614
Systemd mlug-20140614Systemd mlug-20140614
Systemd mlug-20140614
Susant Sahani
 
Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識Linux 系統管理與安全:基本 Linux 系統知識
Linux 系統管理與安全:基本 Linux 系統知識
維泰 蔡
 
Systemd evolution revolution_regression
Systemd evolution revolution_regressionSystemd evolution revolution_regression
Systemd evolution revolution_regression
Susant Sahani
 
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 love
Alison Chaiken
 
Systemd 간략하게 정리하기
Systemd 간략하게 정리하기Systemd 간략하게 정리하기
Systemd 간략하게 정리하기
Seungha Son
 
The origin: Init (compact version)
The origin: Init (compact version)The origin: Init (compact version)
The origin: Init (compact version)
Tzung-Bi Shih
 
CLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init systemCLUG 2010 09 - systemd - the new init system
CLUG 2010 09 - systemd - the new init system
PaulWay
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
Alison Chaiken
 
Systemd for developers
Systemd for developersSystemd for developers
Systemd for developers
Alison Chaiken
 
Ad

Recently uploaded (20)

20250514 Isolate It! Hermetic Testing with Playwright.pdf
20250514 Isolate It! Hermetic Testing with Playwright.pdf20250514 Isolate It! Hermetic Testing with Playwright.pdf
20250514 Isolate It! Hermetic Testing with Playwright.pdf
Mykola Gurov
 
Building AI agents with Java and LangChain4j
Building AI agents with Java and LangChain4jBuilding AI agents with Java and LangChain4j
Building AI agents with Java and LangChain4j
Julien Dubois
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 
Introduction to Programming presentation.pptx
Introduction to Programming presentation.pptxIntroduction to Programming presentation.pptx
Introduction to Programming presentation.pptx
HorusCarlosVilln
 
SamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free DownloadSamFw Tool v4.9 Samsung Frp Tool Free Download
SamFw Tool v4.9 Samsung Frp Tool Free Download
Iobit Uninstaller Pro Crack
 
Web Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdfWeb Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdf
Secuodsoft
 
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdfTUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
Ligia Galvão
 
Lightworks PRO 2025.1 Crack Free Download
Lightworks PRO 2025.1 Crack Free DownloadLightworks PRO 2025.1 Crack Free Download
Lightworks PRO 2025.1 Crack Free Download
Berkeley
 
Grade 6 lesson 2- Mail Merge-Microsoft word.pptx
Grade 6 lesson 2- Mail Merge-Microsoft word.pptxGrade 6 lesson 2- Mail Merge-Microsoft word.pptx
Grade 6 lesson 2- Mail Merge-Microsoft word.pptx
divyaaroli
 
Best Practices Salesforce Training & Documentation.pptx
Best Practices Salesforce Training & Documentation.pptxBest Practices Salesforce Training & Documentation.pptx
Best Practices Salesforce Training & Documentation.pptx
Michael Orias
 
Admin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptxAdmin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptx
eastonmeth
 
Salesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdfSalesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdf
rinakali1
 
Linux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based ProtectionsLinux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based Protections
Vlatko Kosturjak
 
LightBurn 1.7.0.6 + Crack Download🔓
LightBurn  1.7.0.6  +  Crack  Download🔓LightBurn  1.7.0.6  +  Crack  Download🔓
LightBurn 1.7.0.6 + Crack Download🔓
Berkeley
 
Albert Pintoy - A Distinguished Software Engineer
Albert Pintoy - A Distinguished Software EngineerAlbert Pintoy - A Distinguished Software Engineer
Albert Pintoy - A Distinguished Software Engineer
Albert Pintoy
 
Getting Started with BoxLang - CFCamp 2025.pdf
Getting Started with BoxLang - CFCamp 2025.pdfGetting Started with BoxLang - CFCamp 2025.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
Advanced Cyber Security and Digital Forensics.pptx
Advanced Cyber Security and Digital Forensics.pptxAdvanced Cyber Security and Digital Forensics.pptx
Advanced Cyber Security and Digital Forensics.pptx
Muhammad54342
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Venkatesh (Rahul Shetty)
 
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdfIBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
JabbarAbdallah
 
20250514 Isolate It! Hermetic Testing with Playwright.pdf
20250514 Isolate It! Hermetic Testing with Playwright.pdf20250514 Isolate It! Hermetic Testing with Playwright.pdf
20250514 Isolate It! Hermetic Testing with Playwright.pdf
Mykola Gurov
 
Building AI agents with Java and LangChain4j
Building AI agents with Java and LangChain4jBuilding AI agents with Java and LangChain4j
Building AI agents with Java and LangChain4j
Julien Dubois
 
Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025Call of Duty: Warzone for Windows With Crack Free Download 2025
Call of Duty: Warzone for Windows With Crack Free Download 2025
Iobit Uninstaller Pro Crack
 
Introduction to Programming presentation.pptx
Introduction to Programming presentation.pptxIntroduction to Programming presentation.pptx
Introduction to Programming presentation.pptx
HorusCarlosVilln
 
Web Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdfWeb Application Development A Comprehensive Guide for 2025.pdf
Web Application Development A Comprehensive Guide for 2025.pdf
Secuodsoft
 
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdfTUG Brazil - VizQL Data Service - Nik Dutra.pdf
TUG Brazil - VizQL Data Service - Nik Dutra.pdf
Ligia Galvão
 
Lightworks PRO 2025.1 Crack Free Download
Lightworks PRO 2025.1 Crack Free DownloadLightworks PRO 2025.1 Crack Free Download
Lightworks PRO 2025.1 Crack Free Download
Berkeley
 
Grade 6 lesson 2- Mail Merge-Microsoft word.pptx
Grade 6 lesson 2- Mail Merge-Microsoft word.pptxGrade 6 lesson 2- Mail Merge-Microsoft word.pptx
Grade 6 lesson 2- Mail Merge-Microsoft word.pptx
divyaaroli
 
Best Practices Salesforce Training & Documentation.pptx
Best Practices Salesforce Training & Documentation.pptxBest Practices Salesforce Training & Documentation.pptx
Best Practices Salesforce Training & Documentation.pptx
Michael Orias
 
Admin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptxAdmin, Product & Beyond with FilamentPHP.pptx
Admin, Product & Beyond with FilamentPHP.pptx
eastonmeth
 
Salesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdfSalesforce CRM and software as service model.pdf
Salesforce CRM and software as service model.pdf
rinakali1
 
Linux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based ProtectionsLinux Improvements in Memory Corruption Based Protections
Linux Improvements in Memory Corruption Based Protections
Vlatko Kosturjak
 
LightBurn 1.7.0.6 + Crack Download🔓
LightBurn  1.7.0.6  +  Crack  Download🔓LightBurn  1.7.0.6  +  Crack  Download🔓
LightBurn 1.7.0.6 + Crack Download🔓
Berkeley
 
Albert Pintoy - A Distinguished Software Engineer
Albert Pintoy - A Distinguished Software EngineerAlbert Pintoy - A Distinguished Software Engineer
Albert Pintoy - A Distinguished Software Engineer
Albert Pintoy
 
Getting Started with BoxLang - CFCamp 2025.pdf
Getting Started with BoxLang - CFCamp 2025.pdfGetting Started with BoxLang - CFCamp 2025.pdf
Getting Started with BoxLang - CFCamp 2025.pdf
Ortus Solutions, Corp
 
Advanced Cyber Security and Digital Forensics.pptx
Advanced Cyber Security and Digital Forensics.pptxAdvanced Cyber Security and Digital Forensics.pptx
Advanced Cyber Security and Digital Forensics.pptx
Muhammad54342
 
IObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download FreeIObit Uninstaller Pro Crack {2025} Download Free
IObit Uninstaller Pro Crack {2025} Download Free
Iobit Uninstaller Pro Crack
 
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Modern Software Testing Playwright, Gen AI, and Machine Learning Models for E...
Venkatesh (Rahul Shetty)
 
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdfIBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
IBM-App-Connect-Overview-IBM-App-Connect-Overview.pdf
JabbarAbdallah
 

От sysV к systemd

  • 1. От sysV к systemd Ковалев Денис
  • 2. Уютный SysVinit ● кто не писал /etc/init.d/.... скрипты? ● unix way ● cron ● системные логи
  • 4. This is the Unix philosophy 1. Write programs that do one thing and do it well. 2. Write programs to work together. 3. Write programs to handle text streams, because that is a universal interface. Doug McIlroy
  • 5. Сколько нужно команд, чтобы узнать OS? $ uname -a $ cat /etc/issue $ cat /etc/*release $ cat /etc/*version $ lsb_release -a
  • 6. hostnamectl $ hostnamectl Static hostname: static.216.201.250.124.clients.de Icon name: computer-vm Chassis: vm Machine ID: 426df1cf0ef241c8bac0ae65ebd450b2 Boot ID: 421a1f60665c4d2284cfb0e6ba190e17 Virtualization: kvm Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-327.18.2.el7.x86_64 Architecture: x86-64
  • 7. Сколько нужно команд, чтобы вкрутить лампочку? $ /etc/init.d/lightbulb $ chkconfig lightbulb on $ /etc/supervisord.d/lightbulb.conf + logging + cron
  • 9. sshd [Unit] Description=OpenSSH server daemon Documentation=man:sshd(8) man:sshd_config(5) After=network.target sshd-keygen.service Wants=sshd-keygen.service
  • 12. date $ date Thu Jun 30 06:59:40 UTC 2016 $ timedatectl Local time: Thu 2016-06-30 06:59:40 UTC Universal time: Thu 2016-06-30 06:59:40 UTC RTC time: Thu 2016-06-30 06:59:40 Time zone: UTC (UTC, +0000) NTP enabled: yes NTP synchronized: yes RTC in local TZ: no DST active: n/a
  • 13. 2011 2012 2013 2014 2015
  • 14. systemctl ● start ● stop ● reload ● restart ● try-restart ● reload-or-restart ● reload-or-try-restart ● kill ● is-active ● is-failed ● status ● show ● cat ● help ● enable ● disable ● reenable ● is-enabled ● mask ● unmask ● edit ● snapshot ● list-jobs ● cancel ● show-environment ● set-environment ● is-system-running ● list-dependencies ● rescue ● halt ● poweroff ● reboot
  • 16. systemctl status $ systemctl status sshd ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2016-06-09 14:50:43 UTC; 2 weeks 6 days ago Docs: man:sshd(8) man:sshd_config(5) Main PID: 889 (sshd) CGroup: /system.slice/sshd.service └─889 /usr/sbin/sshd -D
  • 17. Binary logs $ journalctl -ex -u sshd | tail Jun 15 05:09:50 example.com sshd[28300]: Connection closed by 84.227.235.191 [preauth] Jun 15 05:10:28 example.com sshd[28387]: Connection closed by 90.103.213.98 [preauth] Jun 15 05:14:18 example.com sshd[28704]: Received disconnect from 115.31.116.38: 11: [preauth] Jun 15 05:14:52 example.com sshd[28762]: Connection closed by 90.103.213.98 [preauth] Jun 15 05:17:58 example.com sshd[29055]: Received disconnect from 125.18.238.11: 11: [preauth] Jun 15 05:19:12 example.com sshd[29144]: Connection closed by 90.103.213.98 [preauth] Jun 15 05:23:34 example.com sshd[29559]: Connection closed by 90.103.213.98 [preauth] Jun 15 05:23:46 example.com sshd[29564]: Received disconnect from 115.19.218.29: 11: [preauth] Jun 15 05:26:36 example.com sshd[29827]: Received disconnect from 111.31.119.26: 11: [preauth] Jun 15 05:27:57 example.com sshd[29934]: Connection closed by 90.103.213.98 [preauth]
  • 18. Analyze boot time $ systemd-analyze Startup finished in 569ms (kernel) + 770ms (initrd) + 9.244s (userspace) = 10.584s $ systemd-analyze critical-chain multi-user.target @9.239s └─tuned.service @6.201s +263ms └─network.target @6.200s └─network.service @5.678s +520ms └─NetworkManager.service @794ms +51ms └─basic.target @793ms ...
  • 19. и не только... ● параллелизация ● cлежение за запущеными сервисами (systemd-cgls, systemd- cgtop) ● взаимодействие с udev ● D-Bus API ● systemd-escape & systemd-path ● Запуск произвольной программы под systemd (systemd-run) ● Настройка локалей (localectl) ● ....
  • 20. Спасибо за внимание Ковалев Денис skype: aikikode email: aikikode@gmail.com
  翻译: