systemd – tutorial

The new init tool systemd is already several distributions as an alternative to Upstart or dusty Sysvinit at. Some Sysvinit- and Upstart distributions familiar commands and tricks to work through compatibility measures under systemd. To use the capabilities of systemd correctly, the administrator should know, however, also tools and parameters of systemd.

The most important tool to interact with systemd's command line program systemctl. For changes to the configuration or restarting of background services it requires root privileges; some diagnostic calls can also perform simple user. Who calls the program without any parameters, receives a list of “Units”, do the at startup used tasks. In addition to the integration and testing of volumes includes the start background services or setting up hardware.

In a default installation of Fedora 16 lists Systemctl hundred sixty active units in ten different varieties. Among the most important service units. They take care of background services, a Sysvinit distribution typically starts about init scripts. Mount- and automount Units bind a file systems. Socket-Units legen Sockets an; they start indirect dependencies one other Unit, is accessed when the socket. (A detailed explanation of the Unit concept, see the first part of the article.)

you can instruct Systemctl A parameter, list only units of a particular type, about all service units:

Systemctl automatically directs its output further to less; Use the arrow keys can be not only high- and scroll down, but also to the right, because there sometimes hide further information.

The startup does Systemd with Units. The come in different varieties, the Systemctl can list separately. VergrößernIn the first column of output we find the unit name. The second column indicates, whether systemd could invite the Unit-Definition, the third, whether the unit is active. Inactive - installed, but not to start envisaged - Units are the program only with the switch -a out; The same applies to units, which was unable to load the init system about because of an error in the unit file.

Column four gives the current status. “exited” shows, that the process has completed without error. This is for example the case for services, the running in the background - for example in the service unit, the known Sysvinit file performs compatibility reasons /etc/rc.local at system startup. “running” stands for services, running in the background: cron, dbus, sshd, udev and other.

The fifth column is a description of Unit. If you with “LSB” or “SYSV” starts, Systemd generated the unit automatically, work off a traditional init script.

For services, which could not be started or have crashed later, is in the fourth column “failed” - Highlighted in red, provided that the console colored output controls. The status-Command of sytemctl is the time of the cancellation and the returned error code of the program, for example

The status command of Systemctl supplies cutoff time and error code crashed services. In a freshly installed Fedora 16 lists Systemctl the 60 Service units on. Among them are the login processes for textconsole (agetty), because unlike Sysvinit Systemd handles this via service units as a normal background service.

Units …

The configuration files for generating Units, the systemd brings, liegen in / lib / systemd / system /; a same file in / etc / systemd / system / but takes precedence.

Unit definition are usually much shorter than the classic Sys V init scripts. A unit file for the service for network time synchronization via NTP is only a few lines long:

All unit files contained by a [Unit] introduced section with general settings, including a short description. In section [Service] follow service-specific information; with NTP that is only the command, to start the service. If a special command to exit is necessary, this can be a ExecStop-define statement. In the NTP daemon that is unnecessary, because it can be terminated in good Unix tradition by a SIGTERM signal; sending systemd to end, when no other command is specified.

The section [Install] includes instructions, the systemd in (From-)interpreted installation; , the entry in the NTP Example, that the time synchronization with the driving of the target “Multi-User” to be called.

… and targets

The target units offer a concept, resembling runlevels Sysvinit; For reasons of compatibility is understood Systemd even runlevels names to control equivalent targets. As before you can therefore at Fedora 16 the kernel in the boot loader parameter single give to; Systemd then controls an, the minimal, the single-user mode corresponding area offers.

Also 3 is working, to control the multi-user mode without graphical login manager. Represents is this mode in systemd by the target unit multi-user. a to become the standard, submits Links:

If the graphical login manager later but start by default again, you can in the same way raise the standard target; it is the equivalent of runlevel 5 Fedora and OpenSuse. As an alternative to the old runlevel designations can give to the kernel, the name of the starting target unit:

In order to drive a different target unit in operation, serves the isolate-Command of Systemctl:

The change in the Rescue Target's interesting for administration tasks, because it ended Systemd all user logins and background services, leaving only system services run - as those for monitoring Logical Volumes (lvm2-monitor). Sometimes they have to be shut down for renovations, what with the emergency mode succeed; here only run the kernel threads.


The show-Command of Systemctl delivers some of the internals to the current units and the work carried out on them. It can be used also spend, calls which Units systemd in driving the multi-user targets:

In issue other targets can be found - when about This in turn depends on from, the local-fs.targetpresupposes. These three targets care about the basic setup of the system; these include the integration of the file system and the start of Udev. To specify the function of the Basic Target Unit contains the configuration file following information:

By After-Indication learns Systemd, that it not only call the target, but must wait for its full launch. Next Requires there is also the weaker Wants. In specified Units calls systemd to also, sets the start but also continued, if one of them does not start.

This type of function can also links to unit files specify, that are created in a directory, whose name composed of the name of the target unit and an attached .wants, about



Who wants to disable NTPD Service Unit, so that the system at boot time is not synchronized via NTP, can do the following command:

Here Systemctl does nothing, to remove as the link to the service unit file in the directories Wants; when activating a service with enablethe tool will create a link. Both can be done manually, to Units to (from)check box to enable.

If a service is not of a Unit, but started a traditional init script, passes Systemctl prompted to activate the program chkconfig continue. In the Fedora is the case, if you installed Apache and activated via Systemctl.

The (From)Activate a service takes effect only after the next start or stop the system. The following command starts a service unique immediately:

The parameters stop ended the service. The command status Systemctl provides information about the unit, including its current state and the name of the file specifying them. In addition, the program gives, whether and how long does the service already and which processes belong to him; the main process has Systemctl thereby explicitly from.

About the group membership can be seen, to which service has a process.
Belonging to the scale of systemd Control Groups can be quite easy to find, the processes used and from which service to start. The scale of systemd cgroup hierarchy gives the command systemd-cgls out; alternatively shows ps the group membership to:ps crude -eour pid,args,cgroup


If problems during startup problems, where systemd seems directly or indirectly involved, you should give to the kernel, the following parameters in the boot loader:

Systemd then writes detailed debugging information on the console and in the buffer of the kernel messages, to you later dmesg can read.

For systemd include the command line tools poweroff, halt and reboot; alternatively, you can shut down the system via the homonymous Systemctl commands or restart. A restart is also achieved with the command

The tool “systemd-cgls” , the Control Groups and their associated processes Show.
After stopping all services has Systemd the running kernel at, directly to start a previously configured Linux kernel - without BIOS self-test and boot loader. If no Kexec kernel configured, carried out a normal restart.


In common administration tasks to get only with the service- and target units in direct contact; the other units are particularly important for special features of systemd or do at startup all those things, around which at Sysvinit- have looked after and Upstart distributions distribution specific scripts. Among them is the inclusion of in / etc / fstab file systems specified, Enabling swap space or the occasional cleaning up the / tmp directory.

For some of these works systemd brings an automount function, the pseudo-mount may invest for in / etc / fstab configured file systems; actually involved they are, however, only on the first access. Adding “comment=systemd.automount” in / etc / fstab turns any mount point in a car mount point. This can speed up the startup process and is useful for example for network shares, if the network connection through the Network Manager is only set up when logging in a user.

cause research

About Systemctl can systemd for transmitting a signal calling, without knowing the process ID of the service. The following command offset Rsyslogd in debug mode; This is terminated, if one invokes the command a second time:

If you omit the indication of the signal to be transmitted, sends Systemctl a normal term signal, whereupon all processes should end, belonging to a service.

Systemd brings a program with, to visualize the startup process; the dark red areas, the starting phase of services from. Vergrößern
The command systemd-analyze outputs, how long the startup took and how much time it at the cost of kernel, omitted Initramfs and setting up the userland by systemd. The command systemd-analyze blame are the start times of the individual units of. For a more detailed consideration of the boot process, the program can create an SVG file, die the Start where Units visualized:

Sometimes you get so Units on the track, the strong pull the startup in the length. Some notes regarding the correct interpretation of these results provides the seventh part of the blog series “Systemd for Administrators”. The previous twelve-stranded series also includes many other tips and hints for practical use by systemd:

  1. Verifying Bootup
  2. Which Service Owns Which Processes?
  3. How Do I Convert A SysV Init Script Into A systemd Service File?
  4. Killing Services
  5. The Three Levels of “Off”
  6. Changing Roots
  7. The Blame Game
  8. The New Configuration Files
  9. On /etc/sysconfig and /etc/default
  10. Instantiated Services
  11. Converting inetd Services
  12. Securing Your Services

About the Homepage Lennart Poettering also found numerous other articles with backgrounds for init system. Im third “Systemd Status Update” Poettering has also listed some of the innovations recently, which were incorporated in the last eighteen months in systemd.



o2 homebox

read access

1. In die o2 Box ( (Router Arcadyan IAD4421, ARE 6431) login and download the config.bin: “System” -> "Save settings" -> "Save Configuration".
2. Tool “Arcadyan IAD Decrypter” download ( and extract.
3. Microsoft “strings” download, so unpack and head off on the bin file folder.
4. Run the batch, which belongs to the box. (decrypt_o2_box_6431.bat)

In the o2box6431_strings.txt exists:
PPPoE1 -> Standing here login, these also apply for VoIP.
PPPoE2 -> If only something, these are the data for Internet access with VLAN 7. Danger: If it is not a T-COM VDSL resale Adapters applies VLAN ID = 11.



configure VoIP:

Internetrufnummer = 49XXXYYYYYY
Username = 49XXXYYYYYY (identical)
Password = 0XXXYYYYYYbb45
Register =

In the FritzBox Telephony menu! there is a list of other providers. When you interrupt “My numbers” on “new” followed by a wizard of it one makes the Internet phone book.

Automatic configuration of SIP

Connects to your Fritzbox (note enclosed instructions) and go to the configuration page via / or
Now follow the Wizard - For the DSL connection is the Internet Service Provider "O2 DSL" to use, the username is your (Head-)Phone number and password does not exist; give anything here. - If the data is not correct just call o2 and ask for your DSL access. These give them out in contrast to the VoIP data.
Now go to the left menu click "System" and then on the sub-item "Update" - Ensures that its latest FRITZ!OS version for your Fritzbox have - Should this not be the case you have to update this
Now it may happen quickly or take some. Via the "Telephony" and then the sub-heading "Own numbers" should be in the foreseeable future your numbers be listed (the page must be manually updated!). These are accessed by o2 and automatically set.
If your numbers but be not set up after ten minutes patience, you have to disconnect your Fritzbox the current now. After a minute, you can connect this again. After the Fritz box is now completely started and did you logged back on the configuration page, should now your numbers exist.

Utilities Forum:


W3 Total Cache – Intermittent Browser Decode Errors

I have modified my W3TC browser cache config to disable gzip compression.

However I still have a gzip encoding header. It looks like I have introduced a config issue with phpfpm (my assumption right now). I thought I had ruled out double encoding already, but missed something. I’ll confirm my assumptions later, but it doesn’t appear W3TC has anything to do with my issue after further investigation.

watch for osx

easy to add the .bashrc