Re: [systemd-devel] Howto detect a program/service is started by systemd?

2025-06-30 Thread Mantas Mikulėnas
No, it really shouldn't detect "started by systemd" at all. These are several independent things and you shouldn't mix them all together. Regarding startup, systemd services have several distinct Type= settings with different expectations and the program has no way to reliably detect which one is

Re: [systemd-devel] [EXT] Re: Changing database formats for systemd-journald

2025-06-30 Thread Windl, Ulrich
Well, I had almost 3 minutes, and someone else from SLES support testing hat 20 minutes to read the logs on SSD. SLES support was able to speed up thing by a factor of 500 or so. However I don’t know what they did. I guess the update will be published soon. Kind regards, Ulrich Windl From: sy

Re: [systemd-devel] Howto detect a program/service is started by systemd?

2025-06-30 Thread Nils Kattenbeck
Hi, $INVOCATION_ID is quite a reliable source for this. I do not what if there are other behavior changes apart from forking you want to do but it is usually better to do those at a finer resolution than just a big check for systemd. First and foremost there are also other service managers which m

Re: [systemd-devel] cgroup messages on service stop

2025-06-30 Thread Michal Koutný
Hello. On Wed, Jun 04, 2025 at 10:57:20AM -0600, Orion Poplawski wrote: > I'm seeing the following on an EL9.6 system when stopping the bdsec-daemon > service: > > Jun 03 12:41:12 systemd[427214]: bdsec-daemon.service: Failed to attach > process to cgroup /system.slice/bdsec-daemon.service/.con

Re: [systemd-devel] Odd behavior with ProtectSystem, ProtectHome, and ReadWritePaths=/root in combination

2025-06-30 Thread Michal Koutný
Hello. On Sat, Jun 21, 2025 at 02:20:10AM +, Daniel Hast wrote: > run0 --property=ProtectSystem=strict --property=ProtectHome=read-only > --property=ReadWritePaths="$DIRECTORY" bash -c "findmnt -nru -o OPTIONS > --target=$DIRECTORY" > > If $DIRECTORY is a non-root user's home directory, t

Re: [systemd-devel] Question about the systemd slice hierarchy

2025-06-30 Thread Michal Koutný
Hello. On Mon, Jun 30, 2025 at 07:45:53AM +, Matthew Chae wrote: > I have some questions about "Example 1. Enabling and disabling controllers" > from the slice-related man page linked below. > https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html# > > First,

Re: [systemd-devel] Howto detect a program/service is started by systemd?

2025-06-30 Thread Andy Pieters
On Mon, 30 Jun 2025 at 12:13, Lukasz Stelmach wrote: > It was <2025-06-30 pon 12:25>, when Stef Bon wrote: > > > it's important for a program to detect it has been started by systemd. > > easy solution best solution, add a command-line flag?

Re: [systemd-devel] Howto detect a program/service is started by systemd?

2025-06-30 Thread Lukasz Stelmach
It was <2025-06-30 pon 12:25>, when Stef Bon wrote: > it's important for a program to detect it has been started by systemd. > For example it does not have to fork since it has already been forked. > > I've written a test script, which calls env, and there are a few > unique environment variables

[systemd-devel] Howto detect a program/service is started by systemd?

2025-06-30 Thread Stef Bon
Hi, it's important for a program to detect it has been started by systemd. For example it does not have to fork since it has already been forked. I've written a test script, which calls env, and there are a few unique environment variables which are an indication it has been started by systemd: S

[systemd-devel] Question about the systemd slice hierarchy

2025-06-30 Thread Matthew Chae
Hello everyone, I have some questions about "Example 1. Enabling and disabling controllers" from the slice-related man page linked below. https://www.freedesktop.org/software/systemd/man/latest/systemd.resource-control.html# First, under system.slice, there is a slice named b.slice. Is this poss