This document provides a history of Unix and Linux service management from the early days of /etc/init through the development of systemd. It describes the issues with early init systems like limitations in flexibility, lack of monitoring, and inconsistencies. It then discusses how various operating systems attempted to address these problems through tools like SMF, launchd, upstart, and others. Finally, it provides an overview of how systemd comprehensively solves the issues through features like unit files, control groups, journald logging, and integration with the Linux kernel.
This document is a summary of most used commands in Linux( mostly based on ubuntu).
It is a quick reference and good source for interview questions :).
The document contains the package install, update for both fedora and ubuntu, a nice comparison between two.
Ubuntu server configuration
Présentation aux Geeks Anonymes Liège par Cyril Soldani, le 13 décembre 2017.
Page des Geeks Anonymes : https://www.recherche.uliege.be/cms/c_9463913/fr/geeks-anonymes
Per chi incomincia addentrarsi nel magico mondo dei comandi da terminale la vita può essere dura. In rete esistono diverse guide, ma la “Linux Bash Shell Cheat Sheet for Beginners” di Raphael è qualcosa che i principianti dovrebbero tenere a portata di mano. La segnaliamo un po’ perchè è molto semplice e chiara, e un po’ perchè è stata scritta da un sedicenne canadese. Personalmente è una cosa che mi fa piacere, perchè dimostra che anche i giovanissimi si accostano a linux nel modo migliore, ovvero “imparo e a mia volta diffondo”.
I’ve been keeping a collection of Linux commands that are particularly useful; some are from websites I’ve visited, others from experience
I hope you find these are useful as I have. I’ll periodically add to the list, so check back occasionally.
This document is a summary of most used commands in Linux( mostly based on ubuntu).
It is a quick reference and good source for interview questions :).
The document contains the package install, update for both fedora and ubuntu, a nice comparison between two.
Ubuntu server configuration
Présentation aux Geeks Anonymes Liège par Cyril Soldani, le 13 décembre 2017.
Page des Geeks Anonymes : https://www.recherche.uliege.be/cms/c_9463913/fr/geeks-anonymes
Per chi incomincia addentrarsi nel magico mondo dei comandi da terminale la vita può essere dura. In rete esistono diverse guide, ma la “Linux Bash Shell Cheat Sheet for Beginners” di Raphael è qualcosa che i principianti dovrebbero tenere a portata di mano. La segnaliamo un po’ perchè è molto semplice e chiara, e un po’ perchè è stata scritta da un sedicenne canadese. Personalmente è una cosa che mi fa piacere, perchè dimostra che anche i giovanissimi si accostano a linux nel modo migliore, ovvero “imparo e a mia volta diffondo”.
I’ve been keeping a collection of Linux commands that are particularly useful; some are from websites I’ve visited, others from experience
I hope you find these are useful as I have. I’ll periodically add to the list, so check back occasionally.
Beyond Golden Containers: Complementing Docker with Puppetlutter
Often, Docker or more generally containers and immutable infrastructure are viewed as a replacement for configuration management. This talk explains why that is not the case, and that they are in fact complementary.
Containers move the challenges that configuration management solves to different places in the application lifecycle. The talk explains where Puppet fits into this changed lifecycle, and what tools Puppet provides there.
Slides for a talk I gave at the Linux Foundation Colaboration Summit 2015
While probably the most prominent, Docker is not the only tool for building and managing containers. Originally meant to be a "chroot on steroids" to help debug systemd, systemd-nspawn provides a fairly uncomplicated approach to work with containers. Being part of systemd, it is available on most recent distributions out-of-the-box and requires no additional dependencies.
This deck will introduce a few concepts involved in containers and will guide you through the steps of building a container from scratch. The payload will be a simple service, which will be automatically activated by systemd when the first request arrives.
Advanced Level Training on Koha / TLS (ToT)Ata Rehman
Advanced Level Training on Koha / Total Library Solution - TLS - (ToT), December 4-8, 2017 – PASTIC, Islamabad
All training material provided during this training can be found at: https://drive.google.com/drive/folders/1hwWGHV1iHgcpjK_tw6-Xgf-ZVUPchIS_
LinuxAlt 2013: Writing a driver for unknown USB deviceLubomir Rintel
Reverse engineering an USB Video Grabber device protocol and creating a Linux kernel driver.
Mostly the same talk as in OSSConf 2013, with Alice in Wonderland pictures.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Enhancing Performance with Globus and the Science DMZGlobus
ESnet has led the way in helping national facilities—and many other institutions in the research community—configure Science DMZs and troubleshoot network issues to maximize data transfer performance. In this talk we will present a summary of approaches and tips for getting the most out of your network infrastructure using Globus Connect Server.
The Metaverse and AI: how can decision-makers harness the Metaverse for their...Jen Stirrup
The Metaverse is popularized in science fiction, and now it is becoming closer to being a part of our daily lives through the use of social media and shopping companies. How can businesses survive in a world where Artificial Intelligence is becoming the present as well as the future of technology, and how does the Metaverse fit into business strategy when futurist ideas are developing into reality at accelerated rates? How do we do this when our data isn't up to scratch? How can we move towards success with our data so we are set up for the Metaverse when it arrives?
How can you help your company evolve, adapt, and succeed using Artificial Intelligence and the Metaverse to stay ahead of the competition? What are the potential issues, complications, and benefits that these technologies could bring to us and our organizations? In this session, Jen Stirrup will explain how to start thinking about these technologies as an organisation.
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
A journey through the years of UNIX and Linux service management
1. From /etc/init to systemd
A journey through the years of
UNIX
and
Linux
service management
Lubomir Rintel <lkundrak@v3.sk>
BTC: 15wvWxN5QMpreKR37pYb7VBu8xLu4TiNR2
2. Sixth Edition UNIX (1976)
●
/etc/init
(219 lines)
●
●
gettys from /etc/ttys
●
●
Single user shell
utmp & wtmp
/etc/rc
(2 lines)
rm -f /etc/mtab
/etc/update
3. UNIX System III (1980)
●
/etc/init
●
(486 lines)
/etc/inittab "states" controlling gettys on
terminals
●
/etc/rc
(67 lines)
●
State aware, single user mode
●
acct
●
errdemon
●
cron
●
"edit to add umounts"
4. 2.9 BSD UNIX (1983)
●
/sbin/init
(593 lines)
●
●
●
Single user shell
gettys from /etc/ttys
/etc/rc
(53 lines)
●
fsck, quotacheck
●
mount -a, from /etc/fstab
●
savecore, ex/vi recovery
●
clear /tmp, locks in /usr/spool
●
update, cron, acct
●
hostname
5. UNIX System V Release 4 (1983)
●
/etc/init
●
●
/etc/inittab with runlevels, respawns
/etc/rc?
●
Modular init system, /etc/rc.d
●
Per-daemon init scripts (8-56 lines, avg. 26)
–
–
●
●
start & stop arguments
pid from ps, stop = kill -TERM
Enablement/disablement by linking into level
dir
Ordered by numbers
6. #ident
"@(#)/etc/init.d/cron.sl 1.1 4.0 10/15/90 8479 AT&T-SF"
#
cron control
pid=`/usr/bin/ps -e | /usr/bin/grep cron |
/usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
case $1 in
'start')
if [ "${pid}" = "" ]
then
/usr/bin/rm -f /etc/cron.d/FIFO
if [ -x /usr/bin/cron ]
then
/usr/bin/cron
elif [ -x /usr/sbin/cron ]
then
/usr/sbin/cron
fi
fi
;;
'stop')
if [ "${pid}" != "" ]
then
/usr/bin/kill ${pid}
fi
;;
*)
echo "usage: /etc/init.d/cron {start|stop}"
;;
esac
7. 2.11 BSD UNIX (1986)
●
/sbin/init
(782 lines)
●
●
●
Single user
gettys from /etc/gettytab
/etc/rc
(165 lines)
●
●
●
Everything 2.9BSD had
Network, inetd, routed, named, lpd, rwhod
/etc/rc.local
●
Editable for starting local daemons
8. Red Hat Enterprise Linux 5 (2007)
●
SVR4-like init
●
●
Some BSD elements: /etc/rc, /etc/rc.local
Init scripts LSB compliant
●
61-584 lines, avg. 128
●
start, stop, status, restart, condrestart
●
Pidfiles in /var/run
●
Subsystem locks in /var/lock/subsys
●
/etc/rc.d/functions library
●
/etc/sysconfig init script configuration
9. #!/bin/bash
#
# sendmail
This shell script takes care of starting and stopping
#
sendmail.
#
# chkconfig: 2345 80 30
# description: Sendmail is a Mail Transport Agent, which is the program
#
that moves mail from one machine to another.
# processname: sendmail
# config: /etc/mail/sendmail.cf
# pidfile: /var/run/sendmail.pid
if [ -x /usr/bin/make -a -f /etc/mail/Makefile ]; then
make all -C /etc/mail -s > /dev/null
else
for i in virtusertable access domaintable mailertable ; do
if [ -f /etc/mail/$i ] ; then
makemap hash /etc/mail/$i < /etc/mail/$i
fi
done
fi
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd)
$([ -n "$QUEUE" ] && echo -q$QUEUE)
RETVAL=$?
killproc sendmail -HUP
RETVAL=$?
echo
if [ $RETVAL -eq 0 -a -f /var/run/sm-client.pid ]; then
echo -n $"reloading sm-client: "
killproc sm-client -HUP
RETVAL=$?
echo
fi
return $RETVAL
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
# Source sendmail configureation.
if [ -f /etc/sysconfig/sendmail ] ; then
. /etc/sysconfig/sendmail
else
DAEMON=no
QUEUE=1h
fi
[ -z "$SMQUEUE" ] && SMQUEUE="$QUEUE"
[ -z "$SMQUEUE" ] && SMQUEUE=1h
}
stop() {
# Stop daemons.
if test -f /var/run/sm-client.pid ; then
echo -n $"Shutting down sm-client: "
killproc sm-client
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/sm-client.pid
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sm-client
fi
echo -n $"Shutting down $prog: "
killproc sendmail
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail
return $RETVAL
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
[ -f /usr/sbin/sendmail ] || exit 0
RETVAL=0
prog="sendmail"
start() {
# Start daemons.
echo -n $"Starting $prog: "
if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
make all -C /etc/mail -s > /dev/null
else
for i in virtusertable access domaintable mailertable ; do
if [ -f /etc/mail/$i ] ; then
makemap hash /etc/mail/$i < /etc/mail/$i
fi
done
fi
/usr/bin/newaliases > /dev/null 2>&1
daemon /usr/sbin/sendmail $([ "x$DAEMON" = xyes ] && echo -bd)
$([ -n "$QUEUE" ] && echo -q$QUEUE) $SENDMAIL_OPTARG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail
if ! test -f /var/run/sm-client.pid ; then
echo -n $"Starting sm-client: "
touch /var/run/sm-client.pid
chown smmsp:smmsp /var/run/sm-client.pid
if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
/sbin/restorecon /var/run/sm-client.pid
fi
daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac
-q$SMQUEUE $SENDMAIL_OPTARG
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sm-client
fi
return $RETVAL
reload() {
# Stop daemons.}
echo -n $"reloading $prog: "
/usr/bin/newaliases > /dev/null 2>&1
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
reload)
reload
RETVAL=$?
;;
restart)
stop
start
RETVAL=$?
;;
condrestart)
if [ -f /var/lock/subsys/sendmail ]; then
stop
start
RETVAL=$?
fi
;;
status)
status sendmail
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
11. Issues
●
inittab
●
service control inflexible
Not actually used very much
●
No way to monitor services
●
Error output is lost
●
Inflexible startup ordering
●
Single-threaded startup
●
●
●
Slow
Malfunctional startup script can lock up boot
Limited to single instance of a service
12. Issues (cont.)
●
No way to track processes belonging to a service
●
●
No way to reliably terminate a service
●
No way to tell whether the service is operational
●
●
They double-fork to daemonize
Resource hogging
Inconsistent
●
Who drops privileges?
●
Who writes PID files?
●
Who chroots?
13. SVR4 & LSB init scripts
●
Unbelievably shitty
●
Unreliably work around issues mentioned
●
Very long and ugly
●
Lots of code duplication
●
●
Races, improper
subsystem locks
Insecure PID
determination
14. How did UNIX address this
●
Sun Solaris 10: SMF
●
●
Multiple service instances
Apple Darwin: launchd
●
●
On demand startup of network daemons (inetd)
●
●
System and User sessions
Job scheduler
Common:
●
●
Dependency management, service ordering
●
●
Parallel startup
Monitoring/restarts of services
Various others: upstart, daemontools, Monit, ...
15. Linux: systemd
●
Heavily inspired by concepts from launchd
●
Already used in most modern Linux distributions
●
Solves all of the mentioned issues!
●
Leverages Linux inovations -- a lot more powerful
●
Control groups, Namespaces
●
Seccomp, Capabilities, SELinux
●
Auditing
●
Automounter
●
DBus API
●
Structured kernel messaging
16. systemd Unit types
Unit type
Description/equivalent
service
A daemon (SVR4 init script)
socket
A network or UNIX socket (inetd)
device
UDev device instance
mount
Mount point (fstab)
target
Runlevel
swap
Swap space (fstab)
automount
Autofs
path
Inotify watch
timer
Crond
snapshot
Dynamically created target
18. systemd Units
●
Defined from unit files
●
●
●
/lib/systemd
/etc/systemd
Generated automatically
●
●
●
Compatibility or dynamic changes
device unit appears as device appears in
udev
mount units generated from /etc/fstab
19. Service units
●
Service runs in its own control group
●
Isolated from the rest of system to some extent
●
A process can't escape
●
Freezer control group assures reliable shutdown
●
Service should not double-fork (launchd)
●
systemd-journald takes care of logging
●
Can depend on socket units for activation (inetd)
●
DBus activation also possible
20. User sessions
●
Manages processes for a user session (e.g. tty
or GNOME desktop)
●
Session runs in separate control group
●
systemd-logind replaces ConsoleKit
●
Multiseat
●
Reliable log-off
22. What else
●
Takes care of system-wide events
●
●
Laptop lid close
●
●
Pinging watchdog
Shutdown, kexec
Documentation
●
●
Well written manual pages for everything
Lightweight virtualization (LXC)
●
clone()s all namespaces