Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [systemd]

systemd is an alternative approach to SystemV and Upstart init daemons for Linux. It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel at system startup, and to reduce shell overhead.

1
vote
1answer
29 views

How to add a static route in systemd-networkd?

I have a host which is on 192.168.0.0/24 with an IP of 192.168.0.13. Its DHCP-provided gateway is 192.168.0.254. The configuration is done via systemd-networkd and the issue below is present at ...
0
votes
0answers
5 views

Changing LimitNICE of a sysv-init service

I know that for systemd unit files, we could do things like LimitNICE=-15 in the file to adjust the ultimate NICE limit. However, I have a service that got redirected to systemd-sysv-install when ...
1
vote
1answer
32 views

How to limit a systemd service to “play nice” with the CPU?

I have a systemd service (a CI runner) that tends to bog the system down with very CPU intensive jobs. I caught the load average flying over 100 just now and want to put a stop to that nonsense. ...
0
votes
0answers
22 views

systemctl status shows “active since” from before reboot

I have Debian 9.6 running on Beagle Bone Black. I have external hardware clock on /dev/rtc1 with correct date. Upon reboot /dev/rtc1 is initialized in rc.local. I added to rc.local lines showing date ...
0
votes
1answer
51 views

Who writes the log on the screen during shutdown and startup (after grub)

As we know, when we startup the system (after grub) and when we shutdown the system, many logs will be printed on screen. I know that the kernel would write some logs of the kernel. But how about the ...
3
votes
2answers
41 views

How do I specify a path to an executable for a systemd unit file on nix?

I'm trying to write a systemd unit file. How do I specify the path to an executable? How can I determine what to use? In this specific case I'm trying to use mkdir. ExecStartPre = "/bin/mkdir -p %h/...
0
votes
0answers
31 views

How to start a systemd service running in an ssh-agent?

The answer to How to start and use ssh-agent as systemd service? gets us a running ssh-agent. How can you write another systemd service file so that its process runs under that ssh-agent? In ...
0
votes
0answers
16 views

User Resource management: cgroups + systemd + ssh

I am trying to limit the memory of a single user that keeps crashing our OpenSuse Server. What I have done is as desribed here, to modify the limit of the user's slice via systemctl set-property ...
1
vote
1answer
23 views

How to show journal messages from all `fsck` units

Is there a reasonable procedure for a system administrator to view all the fsck messages? On my current Fedora 29 system, I can view all the fsck messages from my current boot like this: sudo ...
1
vote
0answers
15 views

User d-bus service post-start/pre-stop

I need to run a script AFTER systemd has started the user dbus.service and run another script BEFORE systemd attempts to stop dbus.service. I don't want to modify the existing service files. The ...
3
votes
0answers
41 views

How to protect an EnvironmentFile used by a systemd service?

Background I have multiple RESTful web services being deployed through Azure DevOps Release Pipelines to a CentOS VM. Each of these services is managed by systemd and uses environment variables to ...
0
votes
1answer
21 views

Control docker daemon

I had observe on the same OS (ubuntu 16.04), different machines, that if I run sudo systemctl status docker, then I have different results concerning the location of docker.service, more exactly on ...
3
votes
1answer
28 views

list systemd RuntimeDirectory mounts

I have a systemd service with this declaration: RuntimeDirectory=plex RuntimeDirectoryMode=750 which creates the in memory directory /run/plex. How would I list the capabilities of this mount ...
0
votes
0answers
32 views

Systemd output to external file [closed]

I have a master.config file which runs through supervisor, But I want to use systemd to create daemon of that configuration and eliminate supervisor. master.config [program:master] ; Point the ...
0
votes
0answers
32 views

Systemd under Ubuntu 18.04.1 fails with “Failed to create /user.slice/…service/init.scope control group: Permission denied”

On my Ubuntu 18.04.1 system the User Manager of systemd fails to start. I suppose this to be the root cause of other problems that I currently encounter. Any ideas how to get rid of this? systemd ...
1
vote
0answers
33 views

Restart a process if cpu usage is more than 90% for more than a 60sec

Normally one of my systemd services will take about 0...5% cpu Usage. In some cases it can reach up to 100% but only for some seconds. If the Service "crashes" it takes up to 100% continuously. So I ...
0
votes
1answer
59 views

systemd[1]: realmd.service start operation timed out. Terminating

I am trying to put my CentOS 7 in the domain, I put some others and it was normal, but this machine is not working. follows the configuration of the machine: Icon name: computer-vm Chassis: vm ...
0
votes
1answer
31 views

Unit docker.socket not found

Cannot run docker daemon, sudo systemctl status docker.socket returns Loaded: Not found (Reason: No such file or directory). I had modified docker.service, sudo sytemctl edit docker.service and tried ...
1
vote
1answer
22 views

Why is one of my mount units missing `Before=local-fs.target`?

$ systemctl show -p Before /home/.shared-separate Before=umount.target $ systemctl show -p Before /data Before=umount.target local-fs.target Why is the mount unit for /home/.shared-separate missing ...
1
vote
0answers
36 views

Using variables in systemd unit file

I want to use a variable in a unit file. Note, I do not want an environment variable, as I do not want the variable to be visible in the service. I just want to minimize redundancy in the unit file. ...
1
vote
0answers
31 views

systemd-nspawn: how to allow access to all devices?

I'm trying to create a rough equivalent of Docker's --privileged in a systemd container, but I've got no idea how to allow the container to access all of the devices available on the host (without ...
0
votes
0answers
8 views

Is it possible to have a drop-in file for templates?

I have a template file (namely /lib/systemd/system/systemd-nspawn@.service) which has an ExecStart entry. This entry is correct for all services started from that template, except for one. For that ...
0
votes
1answer
42 views

systemd-fsck failed with error code 8. Unable to repair disk on bootup

I have two partitions, one for the RO root filesystem (mmcblk3p1), and the other is the RW home partition (mmcblk3p2). I can't figure out why systemd-fsck is unable to fix my partition when I manually ...
3
votes
1answer
28 views

If the “transaction” for default.target fails, will systemd try to boot to emergency.target?

If a unit A that conflicts with a unit B is scheduled to be started at the same time as B, the transaction will either fail (in case both are required part of the transaction) or be modified to be ...
3
votes
1answer
29 views

systemd service A has `Conflicts=B`. Both A and B are enabled. Can you tell which service will be allowed to start at boot, if any, or is it random?

Installing the firewalld package on Debian 9 also pulls in the ebtables package. This adds two services to the system, firewalld and ebtables. As usual, Debian enables both services. firewalld....
1
vote
1answer
46 views

Which resolv.conf is mandatory and how can I influence this?

When I use my home WiFi my Network Manager constantly loses connection to the right nameserver. It looks like it has lost the connection at all, but disconnect and connect manually gives me access to ...
0
votes
0answers
32 views

Show terminal window from systemd service daemon

Setup: Raspberry Pi running raspbian with a display connected (HDMI) A continuously running systemd service (daemon) Goal: Starting a new terminal window that's visible on the display As a proof of ...
1
vote
1answer
40 views

Why calling agetty directly from bash doesn't seem to have any effect?

I try to call /usr/bin/agetty - from bash in a terminal-emulator(both X-based and Kernel-based), then it asked me to input a username, but after input that username, it just "freeze" a little while, ...
0
votes
2answers
71 views

How to use uswsusp for suspend-then-hibernate with systemd?

Configure suspend-then-hibernate to use uswsusp I'm using uswsusp for suspend to RAM and suspend to disk (hibernate) via systemd. Therefore I've adjusted /etc/systemd/system/systemd-suspend.service.d/...
2
votes
0answers
55 views

Idle timeout for NFS share mounted with systemd automount

What I want to do? I want to configure my /etc/fstab so that my NFS share was: mounted automatically when accessed (auto-mount on-demand), unmounted automatically after specified idle timeout (x-...
0
votes
0answers
27 views

No desktop up to 15 seconds after login

I was worried that my computer could be compromised and my login session is being hijacked by some malicious hook. In .xsession executed by xdm, I capture a pstree snapshot a file to debug this ...
1
vote
1answer
34 views

Create a service with a custom command to check status with systemd

I have a script that sets some iptables rules (/bin/myrules). I start it with systemd using this unit file myrules.service: [Unit] Description=My Rules [Service] Type=oneshot ExecStart=/sbin/...
0
votes
0answers
29 views

systemd: How to run a single command that should exit on boot

I'd like to have systemd run a program after the system is completely booted and ready to go. Eventually, that process may complete and exit with hopefully 0; in some situations, it may need to have a ...
3
votes
1answer
96 views

How to block shutdown or reboot in Debian xfce when other users logged in

I want to prevent users to start shutdown or reboot when another user is logged in. Users can be a TTY user (Ctrl+Alt+F3) or a ssh user from a client host. In OpenBSD, I use polkit org.xfce.session....
2
votes
1answer
162 views

systemd status=127 for /usr/bin/install when trying to start MariaDB

I just upgraded my MariaDB installation to 10.2. When I now try to start the service, it tells me it failed an checking the status shows me this rather strange message: root@server # systemctl status ...
2
votes
1answer
80 views

How does systemctl suspend work?

From the systemctl manpage: suspend Suspend the system. This will trigger activation of the special target unit suspend.target. This command is asynchronous, and will return after the ...
0
votes
0answers
25 views

Running xrandr from systemd

I have ~/.config/systemd/user/resume@.service: [Unit] Description=User resume actions After=suspend.target [Service] ExecStart=xrandr --output eDP1 --auto [Install] WantedBy=suspend.target Now ...
0
votes
0answers
22 views

How to disable Xorg from installation media

After installing Arch Linux, I installed Xorg along with KDE Plasma (along with Nvidia drivers etc.) Once I first booted into Plasma, everything froze at the desktop screen after moving my mouse ...
0
votes
0answers
67 views

What is a “Systemd login session”?

I read https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825394#221, but I wonder what a "systemd login session" is? Is it called more frequently as a "systemd logind session"? Is it some process? (...
10
votes
1answer
385 views

Prevent Logoff from Killing tmux Session

I have noticed that a logoff (log out) from my X user session will kill any tmux session I have initiated, even sessions I had run with sudo tmux and similar commands. I am sure that this formerly did ...
-5
votes
1answer
75 views

How can I run systemd as a process with pid 1 and with pid not 1?

Manpage of systemd says: --system, --user For --system, tell systemd to run a system instance, even if the process ID is not 1, i.e. systemd is not run as init process. --user ...
0
votes
0answers
31 views

systemd not autorestarting the last docker container after it crashes or kill -9 or docker stop service

I have 3 docker containers whose unit files are as below. Autorestart works for 1st and 2nd in the dependency chain but doesnot work for last. I replaced docker containers with some test bash scripts ...
0
votes
1answer
45 views

Why is there a `systemd` process owned by each user that is logged in?

In my ps output: root 1 0.0 0.0 225552 5316 ? Ss /lib/systemd/systemd --system --deserialize 19 message+ 572 0.0 0.0 51564 3076 ? Ss /usr/bin/dbus-daemon --system --address=...
0
votes
0answers
26 views

Systemd service for fetching data from the web at startup

I would like to fetch a random picture from unsplash in /usr/share/wallpapers each time I reboot my laptop. I wrote this service as a first try: [Unit] Description=Fetch random picture from unsplash ...
0
votes
3answers
32 views

Is telinit run as a daemon?

In sysvinit, telinit is a symlink to init. init is run as a daemon. Is telinit run as a daemon? I don't have sysvinit installed on my Lubuntu. For comparison, systemctl plays similar role to ...
-2
votes
1answer
56 views

In sysvinit, do `telinit` and `init` run in the same process?

In https://manpages.debian.org/stretch/sysvinit-core/init.8.en.html /sbin/telinit is linked to /sbin/init. It takes a one-character argument and signals init to perform the appropriate action. ...
3
votes
3answers
264 views

What is the difference between “init” and “service manager”?

From When the operating system shuts down, how does a service manager know that it should sends SIGTERM and SIGKILL to its services? systemd IS BOTH the init and service manager What is the ...
0
votes
1answer
30 views

systemd service that reboots?

I am getting a new microSD flash ready for deploying a large number of BeagleBones, Blacks and Greens. There's a new-ish u-boot feature that is required for this, but I can't know in advance what ...
-3
votes
1answer
105 views

How does Linux operating system shut down? [closed]

Gilles wrote an excellent reply about how Linux kernel shuts down at https://unix.stackexchange.com/a/122667/674 I was wondering how Linux OS shuts down (in cases of both systemvinit and systemd)? I ...
0
votes
1answer
42 views

rsyslog: send logs to different file using custom template

So, I'm using systemd to send the logs to rsyslog, and I want to write the logs to /var/log/app.log. Since it is a Java app with its own log format, I don't want to have timestamps or anything on it,...