Questions tagged [systemd]

Systemd is a system management daemon designed for Linux. Use this tag for *programming questions* using systemd or its libraries. Questions about *configuring the daemon* (including writing unit files) are better directed to Unix & Linux: https://unix.stackexchange.com.

Systemd is a system management daemon designed for Linux and programmed exclusively for the Linux API. For systems using it, it is the first process which is executed in user space during the Linux startup process. Therefore, systemd serves as the root of the user space's process tree.

2384 questions
8
votes
2 answers

Processes started with systemd are logging to /var/log/syslog and /var/log/daemon.log

I'm running a couple of python scripts on a Beaglebone Black, both started at init by systemd. I noticed yesterday that my eMMC flash was completely full, and the reason was I had 1.8 gigs of log files. It seems that the standard output of these…
Dave
  • 151
  • 1
  • 6
8
votes
2 answers

Cannot disable systemd service

I've been using the dbus API from systemd and I've been enabling services with the EnableUnitFiles() function as detailed here http://www.freedesktop.org/wiki/Software/systemd/dbus/ However, when I try to disable the same service with the command…
Andy Kim
  • 83
  • 1
  • 3
8
votes
1 answer

Connecting to systemd DBUS signals using gdbus-codegen

I am not able to receive systemd DBus signals when using gdbus-codegen generated manager proxy. But I am able to successfully call methods provided by systemd over DBus. I searched online and looked these links without much success. There aren't…
VJ-
  • 211
  • 2
  • 7
8
votes
5 answers

How should I handle remote logging with systemd?

I run multiple CoreOS instances on Google Compute Engine (GCE). CoreOS uses systemd's journal logging feature. How can I push all logs to a remote destination? As I understand, systemd journal doesn't come with remote logging abilities. My current…
mattes
  • 8,936
  • 5
  • 48
  • 73
8
votes
2 answers

How can I turn either a Unix POSIX file descriptor or standard input Handle into a Socket?

In inetd and systemd type systems, it is possible for the system to bind a socket and launch the application with the socket already existing, for example to provide socket based service starting. I would like to take advantage of this functionality…
ocharles
  • 6,172
  • 2
  • 35
  • 46
7
votes
3 answers

Ansible - Edit a systemd service file

The systemd module: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html I'm looking for a way to add a Condition to the service file. For instance: ConditionPathIsMountPoint=/mnt/myreplication/path/ This would be…
KdgDev
  • 14,299
  • 46
  • 120
  • 156
7
votes
0 answers

Is there a MacOS (launchd) implementation for IHostLifetime?

Microsoft has defined the IHostLifetime interface for WorkerServices to run as services on different platforms. (You can create a Worker Service project with dotnet new worker in the console). If you want to run them as system services, you can use…
Mafii
  • 7,227
  • 1
  • 35
  • 55
7
votes
1 answer

Systemd enabled services not starting at boot anymore

I made some custom systemd services long time ago, all have the same configuration (except for the ExecStart of course) This configuration worked for years, I have ubuntu up and running since version 18.04 LTS, but now looks like some of these…
blastbeng
  • 187
  • 2
  • 11
7
votes
0 answers

How to upgrade systemd to a specific version in ubuntu v18.04?

I am using Ubuntu version 18.04.3 LTS (Bionic Beaver). The default version of systemd with this version of ubuntu is 237. I am need to upgrade systemd to version 239. What is the recommended procedure to do this upgrade safely? Thanks.
D.prd
  • 605
  • 1
  • 7
  • 21
7
votes
1 answer

What return code does systemctl status return for an error in systemctl status (not the underlying service)?

http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT According to this systemctl status has a special list of return codes which return information about the service you're querying. If the status action…
Jazzepi
  • 5,259
  • 11
  • 55
  • 81
7
votes
2 answers

where can I find the list of systemd node exporter metrics?

I have looked and googled all around , unable to find the list of systemd metrics that node exporter exposes?
user2062360
  • 1,323
  • 5
  • 16
  • 29
7
votes
2 answers

Syslog - How to Show Colorized Messages?

I need to clarify that I am not looking to colorize the log output, and I am only interested in the program outputs that are written to syslog. So here is the scenario, I have a systemd unit service that runs a script, which indicates the 256 colors…
user3707763
  • 121
  • 1
  • 8
7
votes
8 answers

Cannot start prometheus by using systemd

OS level: CentOS Linux release 7.4.1708 Prometheus level: 2.4.2 prometheus.service: [Unit] Description=Prometheus [Service] User=prometheus ExecStart=/usr/local/prometheus/prometheus [Install] WantedBy=default.target When I use systemctl start…
Kaol
  • 431
  • 2
  • 7
  • 16
7
votes
1 answer

Change system locale inside a CentOS/RHEL without using localectl?

I'm trying to build a Docker image based on oracle/database:11.2.0.2-xe (which is based on Oracle Linux based on RHEL) and want to change the system locale in this image (using some RUN command inside a Dockerfile). According to this guide I should…
Anthony O.
  • 22,041
  • 18
  • 107
  • 163
7
votes
1 answer

systemd error "failed to start service: unit service is not loaded properly: exec format error"

I can execute the exact ExecStart command from the shell and it works, but for some reason in this service file this doesnt work-- any ideas? error: Failed to start previewapi.service: Unit previewapi.service is not loaded properly: Exec format…
Micah
  • 10,295
  • 13
  • 66
  • 95