Questions tagged [systemd]

Systemd is a replacement for the classic init during boot.

When booting most linux systems many items need to be bootstrapped, services started, networks configured, etc. One of the classic ways to do this was init and init scripts. This worked quite well, but performance was sometimes lacking, which was not an issue on classic setups sunch as servers.

However over time the setups diverged and a modern Linux program may need to consider many variations in these scripts.

Red Hat (in the form of the software engineers Lennart Poettering and Kay Sievers) wrote a replacement called systemd. This 'new init' is supposed to be faster and more capable, and hopefully the new joined standard on many Linux distributions.

There has been some complains about the current stability and the complexity of the new, tightly integrated system. While stability is likely to increase over time the system does not adhere to the Unix philosophy, making it a hotly debated issue.

833 questions
63
votes
6 answers

Writing a service that depends on Xorg

I'm trying to write a user level service for redshift, and it needs to wait until Xorg is up and running. My current service file looks like…
mkaito
  • 2,062
49
votes
3 answers

How do you make a systemd service as the last service on boot?

Many years ago, we can write our startup-script into /etc/rc.local. After all system services loaded, your script will run. Now, we use systemd, we don't have rc.local anymore. Systemd starts the service parallel. You can write your own service to…
36
votes
3 answers

enabled systemd unit does not start at boot

I’ve a systemd-unit on my system that is enabled. The problem is, it doesn't restart after a reboot. It depends on two other services that are both started as expected. The service is known, enabled and dead: [centos@ansible-kube-4 ~]$ sudo…
maklemenz
  • 741
  • 1
  • 6
  • 10
11
votes
1 answer

Is there any strategy for *really* disabling systemd services? Some start up even after disabling with systemctl

It seems like whenever I try to disable a systemd service, the service finds some way to reenable itself. The most recent example has been PackageKit, which I have discovered is the source of the problem I asked about in this question. If I run…
10
votes
2 answers

Systemd can't start script?

I have a BASH-script I want to run on start up. My system is running systemd so I created a .service file with whith what I think is the neccessary information: [Unit] Description=My…
TokyoMEWS
  • 103
8
votes
1 answer

Enable Systemd User-Service globally

Simple task. I have a user service that is installed globally on the system (i.e. in a path like /usr/lib/systemd/user). I now want to enable this service for all users on the system (i.e. make it enabled by default. I don't care whether users can…
Felix
  • 207
8
votes
1 answer

Generated systemd unit does not start on boot

I have a generator script (as described by man systemd.generator) in /etc/systemd/system-generators/ directory. The generator runs on boot and successfully generates a unit file into dir /run/systemd/generator.late/ (using the ARGV[3] argument). The…
Markos
  • 189
  • 1
  • 4
7
votes
2 answers

How to create composite systemd unit

There I certain services, that I typically start together: say zookeeper+kafka+elassandra. Is there a way how to write composite unit: all starts together, all dies together? Meaning if I start this, it will delegate to start all that, and vice…
7
votes
2 answers

What does "failed (Result: resources)" mean in systemd?

I have a systemd unit which failed, and I'm not sure what the result type is supposed to mean. Active: failed (Result: resources) since Thu 2016-11-17 21:06:42 UTC; 32min ago What does Result: resources mean? I'm familiar with Result: exit-code,…
2rs2ts
  • 707
6
votes
1 answer

getting journalctl logs for a unit

While I'm debugging a systemd error in my system, I noted the that journalctl -u doesn't do what I expected. For example, I want to see logs about systemd-modules-load unit. Here are two ways I did it, and they yielded different results. using -u…
qweruiop
  • 161
6
votes
1 answer

Know if a systemd is really enabled or not

I want to figure out if a service is enabled or not. With the SysV Init was easy. But with systemctl status is confusing and systemd is too complex to dig in. Specifically, I try enabling with # systemctl enable watchdog.service but…
5
votes
1 answer

How to stop a group of systemd custom services

I wrote three service units, say a.service b.service and c.service. C requires and runs after b, b requires and runs after a, so when I execute "systemctl start c.service", all three of them will be launched one by one. But when I want to stop all…
5
votes
1 answer

Why isn't systemd restarting this service that has Restart=always?

I have a backup daemon running on my server that's crashing every few days. I'm not sure why. In the long run I'd like to figure out why and fix it, but in the mean time I'd like systemd to restart it when it crashes. It has an old-style SysV init…
4
votes
1 answer

DRYing up my Service files for Systemd

Right now I have systemd service files with 20+ environment variables in them, expressed as Environment= This is a lot of duplication that I would like to git rid of since I have systemd files for celery, gunicorn, and celerybeat. I'd like to have…
boatcoder
  • 542
4
votes
2 answers

Systemd calendar interval, "Failed to parse calendar specification"

I'm on Ubuntu 16.04. When I try to use the time syntax show here (Mon..Fri) I get an error. It seems I have to use 'Mon-Fri'. $ sudo systemctl status mytouch.timer ● mytouch.timer - Runs mytouch every hour Loaded: error (Reason: Invalid…
Fonnae
  • 213
1
2 3 4 5