Questions tagged [systemd]

systemd is a modern replacement for the traditional Linux init. Its main features include the ability to express dependencies between services and aggressive parallelization of service startup.

Filter by
Sorted by
Tagged with
0 votes
1 answer
20 views

shutdown and systemd service

At 5am cron runs shutdown, systemd executed /home/myuser/bin/mailme-shutdown.sh and my pc poweroff. When I startup the pc an email coming to me. The email is the script (mailme-shutodown.sh) executed ...
user avatar
  • 1,025
0 votes
0 answers
12 views

How to dynamically change cgroup of systemd service subprocesses (gitlab runner)?

I am running a gitlab runner and I want each job to put itself into its own cgroup. I can set the gitlab bash subprocess to the right cgroup, but its children don't inherit the cgroup. This is how I'm ...
user avatar
  • 523
0 votes
0 answers
8 views

Is it possible to change the signal Systemd uses to shut down a process when MermoryMax is reached?

I have a Systemd configuration which has MemoryMax=30% set. But if that is reached, I would like to send reload rather than stop/restart to the process. Is that possible?
user avatar
-2 votes
1 answer
26 views

How do I autostart a program with a "X" second delay after internet connection is established at login (LINUX)

I want to use systemd to configure this, do I have to create a custom target and then custom services on it to make this happen? How do I do that?
user avatar
0 votes
0 answers
19 views

Is systemctl restart the same as systemctl stop/start?

Is systemctl restart foo.target equivalent to this? systemctl stop foo.target systemctl start foo.target Suppose we have a simple layout: foo.target |- bar.service |- baz.service |- qux.service ...
user avatar
  • 483
0 votes
1 answer
36 views

Can another process signal systemd to restart a service?

We have a service which is managed by systemd. I'm looking for a way to programatically restart that service on demand - for instance, by sending a signal, writing to a file, or messaging over a ...
user avatar
  • 1,505
0 votes
1 answer
48 views

Is it possible for a systemd service to update itself?

Hey faultless server folks, I'd like to write a systemd service that can update itself. Specifically, every 5 minutes it should look at Amazon S3 for new versions of its binary and .service files. If ...
user avatar
0 votes
1 answer
50 views

How to list systemd unit files with descriptions

The command systemctl list-units only displays instances of units, such that are currently loaded into the memory. The command systemctl list-unit-files on the other hand lists all unit ...
user avatar
  • 5
0 votes
2 answers
19 views

Difference between systemd's "System unit directories" and "User unit directories"

I am currently reading the systemd manual page, where under the section directories it discriminates between the unit directory types "System unit directories" and "User unit ...
user avatar
  • 5
1 vote
1 answer
43 views

Setting global DNS + MAC address settings on a Debian-based Linux distribution with systemd-resolved + NetworkManager

I'm running a Debian-based Linux distribution, specifically Pop!_OS 22.04 (Ubuntu jammy). I'd like to set custom DNS + MAC address settings globally - that is, to be applied to all network connections ...
user avatar
  • 13
0 votes
0 answers
23 views

systemd network wait online hanging even though connection is established

I decided to go full on systemd for network management but I face this issue with networkd-wait-online hanging... systemd-networkd work fine, be it wire of wireless but when I try to run a service ...
user avatar
  • 1
0 votes
0 answers
13 views

journalctl – Is there any Issue with generating a new Forward Secure Sealing (FSS) Key every 30 Seconds?

Goal Improve Security of the System by sealing the Journal Logs in a shorter Interval. What could be Problems? System Performance? To Much different files were generated, so that I have to set the ...
user avatar
0 votes
0 answers
18 views

Redirect legacy logfile to systemd journal

I have a program that logs to two configurable logfiles. The file names are given in a configuration file, and not via command line parameter (which is the case in this similiar question). How can I ...
user avatar
  • 171
0 votes
0 answers
11 views

Watch pattern with PathModified/PathChanged but ignore several files and folders

I would like my service to watch changes inside a folder /path/to/projectname except for changes happening to a virtualenv located at /path/to/projectname/venv. The architecture of files inside /path/...
user avatar
  • 155
0 votes
1 answer
48 views

Environment variables in systemd ExecStart, ExecStop clauses not working as expected

I'm working on some unit files for some systemd services. The path prefix to some of my binaries is quite long and they are used several times in ExecStart=, ExecStartPost=, and ExecStop= clauses. I ...
user avatar
0 votes
1 answer
45 views

Set INFO/ERROR priority for messages logged to journal via stdout and stderr?

We have many production apps (first and third-party) that leave logging up to the process that runs the app and just log to stdout for INFO and stderr for ERROR logs (ie only 2 log priorities: INFO|...
user avatar
  • 541
1 vote
1 answer
44 views

Getting PID of dependency in systemd?

I would like to write a systemd unit file that needs to pass to the exec command the PID of one of its dependencies. In the unit file I would like to have: ExecStart=bar -p <PID of foo.service> ...
user avatar
  • 11
0 votes
1 answer
110 views

Unknown key name 'ExecRestart' in section 'Service'

I have this systemd unit file in /etc/systemd/system/ei-integrator.service as below: [Unit] Description=Integrator After=network.target [Service] ExecStart=/tmp/ei-6.6.0/bin/integrator.sh start ...
user avatar
0 votes
0 answers
17 views

I want to reset a FC_HOST before the multipath tries to mount paths from it

I have an HPE SN1100Q 2port 16G HBA card on my hpe proliant gen10 server which is connected to HPE 3par storage direct attach. And some wierd stuff happening. Im using qla2xxx driver version 10.01.00....
user avatar
0 votes
0 answers
38 views

Why is this self-made systemd service failed on CentOS 8.3 as "Failed with result 'protocol'"?

First, this issue becomes a problem only on CentOS8, while it works well on CentOS7. This is the version: # cat /etc/redhat-release CentOS Linux release 8.3.2011 I tried to make a service to execute ...
user avatar
  • 330
0 votes
1 answer
66 views

How to troubleshoot Ubuntu Certbot cron/timer?

lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.2 LTS Release: 20.04 Codename: focal and have installed certbot via apt-get My issue is ...
user avatar
0 votes
0 answers
17 views

Why do I can't see the bond created by systemd service

I have created systemd service to create a bond, and confirmed it's created successfully from the output in the logs, but I can not see the bond in my current shell. mlx_bonding.service [Unit] ...
user avatar
0 votes
1 answer
131 views

why is faillog, tallylog and lastlog so big?

I got a notice from a backup system (rsnapshot) today that it's storage volume was full. A closer look reveals some older snapshots where faillog, tallylog and lastlog are bigger than the actual ...
user avatar
  • 171
1 vote
0 answers
78 views

Make systemd ask for password and authenticate instead of just denying access

When I run a command like this on my raspberry pi I get the following output: $ service sshd restart ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units === Authentication is required to ...
user avatar
  • 11
0 votes
1 answer
30 views

How to restart a web application via SystemD if not responding?

When using Supervisor there are a couple of plugins available that are able to restart an application if it's using to much memory (-> memory leak at e.g. some Java-tools) or if the application is ...
user avatar
  • 553
0 votes
0 answers
18 views

systemctl startup with dependencies

I am implementing a highly available memcached service. Since memcached does not persist data, when an instance starts up, I want to seed its data from a running instance. Hence the startup (in pseudo ...
user avatar
  • 19.9k
0 votes
0 answers
41 views

System failed, please help me interpret last console messages (screen capture)

This server runs several processes of satellite imagery, it has 256GB of RAM, 12TB disk, 64 CPU cores Intel(R) Xeon(R) Gold 6226R CPU @ 2.90GHz. It should not fail with this charge but it does ...
user avatar
0 votes
0 answers
17 views

Restart two Systemd services simulatenously [duplicate]

I have two runtime services running on my linux machine. I have it setup so that apt-get update and apt-get upgrade updates the services, in case I've pushed an update to either one. Now my problem is,...
user avatar
  • 1
1 vote
1 answer
337 views

Postfix causes issues when its service is enabled using systemctl and doesn't launch on boot

On a Rocky Linux version 8.5 machine (a bug-for-bug compatible Red Hat Enterprise Linux downstream), I have configured Postfix + Dovecot setup. After troubleshooting all configuration errors, I got to ...
user avatar
0 votes
1 answer
80 views

How can I artificially induce corrupt ext4 filesystem without data loss?

I am trying to deal with a very rare corner case where my system has a minor corruption in the ext4 filesystem. This trigger systemd's emergency.service and I am trying to alter the behavior of it to ...
user avatar
0 votes
1 answer
61 views

Networkctl: Manual VLAN IP Link

I've a network interface eth0 that carries my main network as untagged traffic and a "management" network with tagged traffic with the id 18. This is how it's configured: 10-eth0.network: [...
user avatar
  • 1,046
0 votes
1 answer
64 views

systemd service definition for SAP (or any other application) start

I have issues to configure a systemd service for starting and stopping SAP (or any other appliaction). I am new to configuring systemd services and please have mercy asking "stupid" ...
user avatar
  • 1
0 votes
0 answers
37 views

How to configure service log format?

I have a service, for example : [Unit] Description=My app PartOf=myorg.target After=network-online.target [Service] Type=notify User=myuser NotifyAccess=main ExecStart=/usr/bin/my_app Restart=always ...
user avatar
  • 586
0 votes
0 answers
35 views

systemd: Configure correct dependencies with LVM devices

I have a device setup that I don't know how to model correctly with systemd: The setup I have the following setup: --------- | mount | /mnt/* ...
user avatar
  • 101
0 votes
0 answers
14 views

Systemd does not obey After= in Unit section

I have a simple service that needs to start after the bluetooth.service unit and a couple others: [Unit] Description=My Application Requires=bluetooth.service some.service another.service After=...
user avatar
  • 101
0 votes
1 answer
193 views

Run Systemd Service After Display Manager

I have a script that changes some Gnome settings which I want to run on startup. The script itself works fine when I run it manually, but I get the following error when I run it as a systemd service: ●...
user avatar
0 votes
0 answers
31 views

How to resolve list of zones locally

My goal is to use some of the rate-limited DNS BLs, on a system configured to use public DNS. Environment includes configured BIND and systemd. Is there a way / how do I do that by using /etc/resolv....
user avatar
1 vote
1 answer
43 views

How CPUQuote works in systemd

I'm setting up a .slice file for systemd. I want to restrict the slice to a certain amount of CPU time. But it's not clear to me from the systemd docs whether the percentage given to the CPUQuota is ...
user avatar
0 votes
0 answers
92 views

systemd-nspawn - run a host binary with network isolation

I am trying to run a binary sitting on the host machine using systemd-nspawn with networking support. I am trying to run multiple copies of the binary where each instance would have its IP address. I ...
user avatar
0 votes
0 answers
19 views

How can I make postgres startup on connection - and shutdown after a period of being out of use?

In the day time I do software development where I use Postgres via Django on Ubuntu. In the evening the computer is my personal laptop (still running Ubuntu). How can I make Postgres startup when it ...
user avatar
0 votes
1 answer
90 views

How to constraint already running interactive processes with cgroup2

My home-server is running some aged hardware (Core i5-3450, software RAID1 on SATA disks) and often has problems when I run performance-intensive things like a compile-job besides "normal" ...
user avatar
1 vote
1 answer
172 views

Show a systemd unit file with its overrides merged in

systemctl cat myunit.service prints the contents of the main myunit.service file followed by any override files. Is there a way to print the unit file that systemd will actually use, i.e. the one ...
user avatar
  • 125
1 vote
1 answer
25 views

CentOS7 sets time to +8h in the night: [systemd] Time has been changed

I am curious: My CentOS7 server, which did not run ntpd or chrony, updated the system's time to +8h at 11pm. Message: [systemd] Time has been changed appears in /var/log/messages. Well: I don't know ...
user avatar
  • 141
0 votes
0 answers
15 views

Using systemd-run To Limit I/O on cPanel for Grep Command

When I run the grep command on Linux on my cPanel-based shared hosting account, I hit an I/O resource limit, it says on the cPanel. I tried to research how to limit resources on a command that I run ...
user avatar
0 votes
0 answers
42 views

How to catch access/request to an (non-existent) directory under a base path?

I would like to reproduce the autofs capability to detect the access to a sub-path of a base path and call the corresponding handler. The motive is that autofs cannot set (nor keep) the shared or ...
user avatar
0 votes
0 answers
154 views

systemd fails to restart even after calling reset-failed

We have a need for restarting a service frequently in certain special scenarios. So when it fails with start-limit, the suggested solution is to call "reset-failed". What we found is that, ...
user avatar
0 votes
0 answers
81 views

Systemd limit network bandwidth for multiple services

I have a machine with multiple systemd services running which have some network bandwidth requirements. On that same machine I have a FTP server and I need to make sure that if someone is uploading or ...
user avatar
2 votes
1 answer
448 views

'--ssl=off' Error in Mysql 8.0.26 service startup

I'm seeing an odd error in the mysqld.service status notes... The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead. The thing is I've ...
user avatar
  • 435
1 vote
1 answer
377 views

systemd process stdout/stderr

When I run the service manually, it logs something when it starts. But I cannot find this log anywhere when it starts as systemd process. journalctl -u <service> only shows the records about the ...
user avatar
  • 111
0 votes
3 answers
111 views

How can I cause systemd to wait starting a unit until a certain condition is fullfilled

I'm still struggling to understand boot sequence dependency configuration in systemd unit files. I've read the manual (systemd.unit). I tried to add dependencies using the After= and Requires= lines ...
user avatar
  • 609

1
2 3 4 5
27