[kwlug-disc] What is all this about systemd?
Chris Irwin
chris at chrisirwin.ca
Fri Jul 18 03:28:05 EDT 2014
It's 0200. Any abrasiveness is completely unintentional. I hope this
comes across as clarifying from somebody who dived in to systemd (on
Fedora), and not some flag-waving "FLOS" zealot.
Abrasiveness directed toward Canonical's Upstart is slightly
intentional, though :)
On 07/17/2014 10:45 PM, Khalid Baheyeldin wrote:
> On Ubuntu so far, upstart is the init system. It generally stays out
> of the way. Only one time I needed to deal with it, because MySQL
> would not start, and had to find out that it logged to a different
> destination (/var/log/upstart). Other than that, it is transparent.
Upstart had some serious shortcomings as an init system.
It's hard to criticize systemd for not being planned (original article
said "FLOS" seemed ad-hoc) and yet consider upstart as an alternative.
It didn't have support for overrides for several in-the-wild releases,
which means you couldn't disable an init script (or change when it runs)
without actually modifying the script -- and reconciling the changes
during upgrades.
> Systemd is not like that. Wikipedia says that systemd provides
> replacements for:
> - SysV Init
This is a freebie for systemd, since upstart does this, too. That was
the point of the debate: SysV was starting to show it's age, what do we
replace it with.
This is where the bulk of my experience with systemd lays so far. I've
written several unit files for both personal and work use. Took me less
than an hour to to write my first one, using nothing but man pages. It's
plain text, and about a dozen lines, commented. There's no boiler-plate,
no bash case statements, no environment contamination. It
compartmentalizes, and is capable of killing mis-behaving services, even
their forked, orphaned children.
It's the sanest method of configuring startup. Instead of re-inventing a
start/stop bash script for every service, you write a simple config
file. Upstart was configured similarly, but handled things far too
simplistically -- It didn't clean the environment, it allowed services
to be started as children of your shell (which caused significant issues
when testing upstart at work).
> - Cron
Systemd has an understanding of time. Instead of simply "at boot", you
can specify unit files to run seven minutes after boot, or Sundays at
0700. Now systemd can easily handle the
"/etc/cron.{hourly,daily,...}.d/*" tasks, since it's already got that
functionality. But hey, you can run your crond and disable the systemd
cron units (actually -- you have to run your own crond anyway, since
systemd apparently doesn't handle crontabs yet. I don't see why it
shouldn't eventually).
- syslog
This is the weakest point with me, simply due to my lack of exposure to
it. It has a more detail and some extra metadata associated with each
logged line. Some program logs are simply their STDOUT, so you might not
even have timestamps. With systemd's journal, you have that information
if you want it.
I haven't really leaned enough about the journal because I still have
syslog, and I'm used to it. Although after reading through dmesg logs
last week, I might finally sit down to give journal a shot. Kernel timer
offsets from boot are useless to me when I'm looking for errors around
03:00.
> - pm-utils
> - inetd
> - acpid
I can't comment on these.
> What I can't get is why Debian, the most community run of them all,
> and one of the oldest, has decided to go with something like systemd.
I don't understand why community and systemd must be opposed?
> The corporate motive is not at play here. But perhaps the FreeDesktop
> faction is more powerful than the UNIX way faction and hence the vote
> to move to systemd.
It has been for years. The original article mentioned hal and udev.
There also ALSA, which realized that /dev/dsp can only go so far, and
made programs use a library instead of throwing-and-pray bits at /dev/dsp.
Interestingly, some folks in the FreeBSD camp have been tossing around
the idea of switching to Apple's launchd. From Wikipedia:
The launchd daemon essentially replaces:
init
rc
init.d script
rc.d script
SystemStarter (OS X)
inetd / xinetd
crond / atd
watchdogd
If you think that's not Unix-like, I'd like to point out that OS X is
the only actual certified UNIX mentioned so far. :)
--
Chris Irwin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140718/bd2b5ac3/attachment.htm>
More information about the kwlug-disc
mailing list