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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
32 views

Why isn't a systemd user session started by `su`?

When I use ssh to log in to the root user on my server, an entry 0 is created in /var/run/user because pam_systemd tells systemd-logind to do this. This is an indicator that a user session has been ...
user avatar
  • 147
0 votes
0 answers
12 views

Where is the list of key names I can use in hwdb remapping?

I'm remapping keyboard keys using a .hwdb file. All the guides I've found say to use the format KEYBOARD_KEY_[scancode]=[key]. But they never explain how to find the acceptable values for the right-...
user avatar
0 votes
0 answers
13 views

Systemd Service Java/Bash Script

I wish to create a custom service to start/stop a java process. There already exists a start.sh/stop.sh for this java program. sh-4.2$ cat /mnt/crx/publish/start.sh #!/bin/bash if pgrep -x java >/...
user avatar
  • 1
0 votes
0 answers
9 views

trying to start sidekiq via systemd hangs on boot

Here's the tech stack on this server. Ubuntu 20.04.4 LTS Sidekiq 6.4.2 Redis server 5.0.7 Ruby 3.1.0 After a boot service sidekiq status returns ● sidekiq.service - Sidekiq Loaded: loaded (/lib/...
user avatar
  • 101
0 votes
0 answers
12 views

socat listen on fd for systemd socket activation

When using systemd socket activation, systemd listens on the socket and passes the fd to the service. Is it possible to have socat listen on the fd and connect to some where else? I am trying to move ...
user avatar
  • 4,039
0 votes
0 answers
35 views

systemd doesn't read environment variables required for script

I want to use borg backup and systemd timers to do my backups. I am using the script from borg backup website very slightly adjusted. You can see the original HERE and my script below: #!/bin/sh # ...
user avatar
  • 101
2 votes
1 answer
38 views

How to limit IO bandwidth using systemd?

I'm trying to limit IO usage of a service (or process/command). (Limit for IO read/write on hardware device, not for network.) I found IOAccounting from systemd: systemd-run --scope --user -p "...
user avatar
0 votes
0 answers
12 views

How to daily journalctl the status of my systemd units?

Once a day I check my units by manually typing these steps: Search my units For each unit I query journalctl --user -u unitname -n How can I See all my user units status and error if failed? Not ...
user avatar
  • 249
2 votes
1 answer
25 views

systemd: what is a "non-container" system?

Regarding exit.target, man systemd.special states it is: A special service unit for shutting down the system or user service manager. It is equivalent to poweroff.target on non-container systems, and ...
user avatar
0 votes
1 answer
24 views

How to inherit XDG_SESSION_TYPE in systemd units?

My current desktop environment: Plasma Wayland. Many GUI applications can't be launched from within Emacs daemon (started by e systemd unit) unless XDG_SESSION_TYPE is set to "wayland". It's ...
user avatar
1 vote
0 answers
39 views

Any way to disable "A stop job is running" in Debian 10 [duplicate]

edit2: This question keep getting closed with links which point to completely irrelevant posts so giving up on it. edit: I'm asking how to disable/kill the Stop Job, not change the time to SIGKILL (...
user avatar
0 votes
0 answers
11 views

Systemd.service LOAD STATE SUB Meanings

I'm trying to better understand the state of units in my system. I've read the systemd and systemctl man pages, and I understand that systemd has three high level state components for a unit - LOAD, ...
user avatar
0 votes
1 answer
70 views

Udev, libpam-systemd, systemd-sysv and systemd dependencies errors causes apt to be unusable

After mistakenly downloading pop-desktop again, udev and systemd have dependency errors that make me unable to use apt. When I run sudo apt upgrade, this error shows up: user@computer:~$ sudo apt ...
user avatar
0 votes
0 answers
15 views

How can I keep both access point and connection to wifi working simultaneously?

I am working on a device running Yocto Linux. A systemd service is set to create an access point at boot: systemd unit: [Unit] Description=Creates access point. After=network.target [Service] ...
user avatar
  • 117
0 votes
0 answers
28 views

Access to the display when loading the systemd service

I am writing a bootable service in C and D languages. There is a database of users with thin client settings. I access this database over the network during the download and get from there the data of ...
user avatar
0 votes
0 answers
15 views

redis startup on boot via systemd

while preparing two redis server instances and getting them work as systemd services i'm running into problems. Its the first time creating own services. The systemd service file was copied from the ...
user avatar
0 votes
0 answers
13 views

cryptsetup mistake and fixing a start job is running for no time limit

I was messing with cryptsetup to mount a LUKS encrypted volume automatically without prompting for a passphrase (which I was successful in doing) however I naively deleted everything in /etc/ccryptab ...
user avatar
  • 4,121
1 vote
1 answer
29 views

How to stop a service when a network interface goes down?

I have a service which I want to start and stop my service when a specific network interface (eth0 in my case) goes up and down. Reading through documentation, and posts, I have come to the unit below,...
user avatar
0 votes
1 answer
41 views

on reboot, Debian 11 always open /run/systemd folder

on reboot, Debian 11 always open /run/systemd folder, whereas before, Debian did not open any specific folder after restart. This doesn't cause any problems, but nevertheless. Edit: grep search ~$ ...
user avatar
  • 1,183
1 vote
1 answer
21 views

What is timedatectl's definition of "synchronized"?

timedatectl produces the following output: Local time: Tue 2022-05-10 01:07:46 UTC Universal time: Tue 2022-05-10 01:07:46 UTC RTC time: Tue 2022-05-10 01:07:...
user avatar
0 votes
0 answers
35 views

status=203/EXEC with systemd and RootDirectory=/RootImage=

I am trying to create a simple systemd service that uses a Golang app and RootDirectory=/ but it always fails with status=203/EXEC /usr/bin/app: No such file or directory. The unit file looks like ...
user avatar
  • 1
0 votes
0 answers
25 views

Copy folder/files from a custom initramfs to real root when the root_switch is done, and run one of the copied files (best set as systemd service)

In grub.cfg besides the default initramfs I'm using a custom iniramfs menuentry "Custom Install Ubuntu Server" { set gfxpayload=keep linux vmlinuz autoinstall url=http://.....
user avatar
1 vote
1 answer
39 views

Alpine Linux: Convert Podman systemd to openrc

I use Alpine Linux and podman command to generate container systemd Command: podman generate systemd -n test -f Output: # container-test # autogenerated by Podman 3.4.7 # Fri Apr 29 02:29:47 CEST ...
user avatar
0 votes
1 answer
36 views

Need to run a database shutdown script before RHEL 7 is rebooted

I am trying to execute the script with systemd and below is the service definition I am using but, the script is not running before the reboot occurs: [Unit] Description=Before Shutting Down Before=...
user avatar
1 vote
1 answer
35 views

SSH_AUTH_SOCK set to wrong value after login but there is nothing that sets it explicitly

I am using KDE on Arch Linux and I am trying to run gpg-agent in ssh-agent emulation mode as described here. I created env file ~/.config/environment.d/80_gpg_agent.conf for systemd-environmentd-...
user avatar
  • 11
0 votes
0 answers
9 views

systemd service: kill previously started processes before restart

My service starts a number of inotifywait monitors. The systemd restartstarts new processes but leaves the old processes running so that I have multiple monitors on the same targets. How do I do this ...
user avatar
1 vote
1 answer
38 views

service start automatically on debian 10

I have server with debian 10, previously on this server unbound service installed. Today I noticed that the service is reset every minute. I even deleted the file /lib/systemd/system/unbound.service ...
user avatar
  • 569
1 vote
1 answer
42 views

How can I get the full output from the command systemctl status? [duplicate]

When I run the command systemctl status, I got this output: [root@192 ~]# systemctl status sshd.service ● sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; ...
user avatar
0 votes
1 answer
32 views

ExecCondition How can I make it do the opposite?

I want to migrate a SysV service that is in a script to a unit file in systemd. I have two machines, one main and one secondary. On both machines the service will be enabled at startup, but the ...
user avatar
  • 1
0 votes
2 answers
17 views

systemd service file closing socket

I need to run a C++ binary with systemd. When I execute the binary directly or with a bash script it runs fine for days: nohup ./testbinary & ./test.sh test.sh: #!/bin/bash LD_LIBRARY_PATH="...
user avatar
0 votes
1 answer
25 views

sytemctl -> Failed to look up unit file state: Invalid argument

SETUP I have a simple script: script.sh #!/bin/bash while true;do echo "$(date)" sleep 3 done And I want to keep it running by including it in a service unit for systemd. So I ...
user avatar
0 votes
1 answer
17 views

Systemd Bash script daemon causes timeout and fails

I have a service file: Memory.service [Unit] Description=Memory Service [Service] ExecStart=%h/opt/bin/Memory --quiet SyslogIdentifier=MemoryService [Install] WantedBy=default.target It starts a ...
user avatar
  • 1,362
1 vote
0 answers
7 views

systemctl running ok but status says activating

I have a simple systemd.service to start a qmi connection from an LTE module. It works fine and the connection is established when I start the service. My issue is that status does not inform the ...
user avatar
  • 111
2 votes
1 answer
18 views

systemd-logind.service, get current settings?

The logind.conf page says something about compiled defaults and multiple configurations files that has precedence rules. All those make it difficult for me to figure out what the current setting is. ...
user avatar
0 votes
0 answers
15 views

Systemd, rc-local and shutting down

I am using CentOS 7 and I needed to start some applications on boot automatically After a lot of problems with systemd and permissions I managed to start it right using rc-local service and its ...
user avatar
0 votes
1 answer
53 views

Installing a systemd user service for all users

Goal: install a systemd service, which any user should be able to start. The problem is to enable a user service (no sudo), as a step of installing it (with sudo). I put a service file in /etc/systemd/...
user avatar
  • 810
1 vote
0 answers
24 views

Booting arm64 linux from PHRAM device on RAM failed on systemd processing

I'm trying to boot a busybox based ext4 Liunx image built by yocto, from the RAM, using PHRAM device(dev/mtdblock0) as rootfs. The machine is Intel FPGA board(Stratix 10). I have enabled PHRAM in ...
user avatar
  • 11
0 votes
1 answer
33 views

ACPI trigger wakeup on low battery while suspended, in order to hibernate

I want to hibernate on low battery: SUBSYSTEM=="power_supply", \ ATTR{status}=="Discharging", \ ATTR{capacity}=="[0-5]", \ RUN+="/usr/bin/systemctl ...
user avatar
  • 1,588
0 votes
0 answers
42 views

Systemd service not running

I modified this script to help me continuously sync a folder to a remote using rclone. The code for said script is posted below. My issue is that on first run, it seemed to be syncing properly, only I ...
user avatar
  • 101
0 votes
1 answer
14 views

See logs of a command inside a systemd service?

I have a systemd service that runs ngrok. [Unit] Description=Ngrok After=network.service [Service] type=simple User=ubuntu WorkingDirectory=/home/ubuntu ExecStart=/snap/bin/ngrok http 4000 --host-...
user avatar
0 votes
0 answers
32 views

systemd service not enabling

I need your help to enable a service that starts and executes on boot a program that I have made. The program is a command line one and takes parameters through the flags therefore in /etc the service ...
user avatar
  • 1
0 votes
0 answers
24 views

RPI4 with Raspbian OS locked in boot loop after changing watchdog timeouts in `system.conf`

In view of enabling the watchdog on my Raspberry Pi 4 running Raspbian (raspberry pi OS) I have modified /etc/systemd/system.conf by uncommenting the following three lines: RuntimeWatchdogSec=2min ...
user avatar
  • 1
1 vote
0 answers
19 views

How to run VNC as a System Service on 64-bit Arm?

I'm following this guide to setup VNC server in my Ubuntu arm64 machine (specifically, armbian 64-bit). There's one problem I found with it so far. When I start the VNC server using vncserver :1 -...
user avatar
0 votes
0 answers
8 views

Resource exhaustion with systemd socket-activated service

I recently set up a new service with systemd having the following configuration: # myservice@.service [Unit] Description=My Service [Service] Type=simple RemainAfterExit=yes ExecStart=/usr/local/bin/...
user avatar
0 votes
0 answers
15 views

Timers in systemd: monthly timer -> service A -> 24h wait timer -> service B: is this possible?

I have the following setup: zfs-scrub.service zfs-scrub.timer zfs-status.service zfs-status.timer zfs-scrub.timer starts zfs-scrub.service every 2nd and 16th day of the month. I would like to ...
user avatar
  • 101
1 vote
0 answers
30 views

How to use apachectl with systemd instances

I’m attempting to isolate sites and configurations using multiple instances of httpd via systemd as per this article. Everything seems to be working as expected, however when attempting to debug ...
user avatar
  • 123
1 vote
1 answer
66 views

shutdown command: why the "wall message" is not broadcast to all logged users if the time is equals or greater than 16 minutes?

About man shutdown at: shutdown(8) — Linux manual page it indicates: ... The first argument may be a time string (which is usually "now"). Optionally, this may be followed by a ...
user avatar
0 votes
1 answer
82 views

very slow boot time at linux - how to improve

sudo systemd-analyze Startup finished in 35.729s (firmware) + 5.933s (loader) + 32.920s (kernel) + 3min 18.149s (userspace) = 4min 32.732s graphical.target reached after 2min 46.619s in userspace ...
user avatar
0 votes
1 answer
32 views

Multiple ExecStartPre in systemd unit override files. Does systemd guarantee execution order?

From various sources, it seems like having ExecStartPre in an override conf file is executed in order and after the main service file. But is this guaranteed by systemd itself? Also what happens if ...
user avatar
1 vote
0 answers
32 views

is there a way to configure a local systemd service to be a "proxy" for a remote service?

I am running in an embedded environment where multiple hosts have a cryptographically secure network between each other. One of my hosts is the so-called "service module" where sysadmins and ...
user avatar

1
2 3 4 5
78