Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Lennart Poettering
On Do, 07.05.20 09:21, Tomasz Torcz (to...@pipebreaker.pl) wrote: > On Thu, May 07, 2020 at 08:56:24AM +0200, Lennart Poettering wrote: > > > > > Is there an API in systemd to move specific program to a dedicated > > > > > slice? > > > > > > > > Use Slice= in the service file. > > > > > >

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Tomasz Torcz
On Thu, May 07, 2020 at 08:56:24AM +0200, Lennart Poettering wrote: > > > > Is there an API in systemd to move specific program to a dedicated > > > > slice? > > > > > > Use Slice= in the service file. > > > > That would require having a service file. I don't have it. I just have a > > single

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Lennart Poettering
On Do, 07.05.20 08:28, Tomasz Torcz (to...@pipebreaker.pl) wrote: > On Wed, May 06, 2020 at 11:53:14PM +0200, Lennart Poettering wrote: > > > > > > > > > > You can use low-level cgroup access to move it. Something like: > > > > > systemctl show --property MainPID --value your.service > > > > >

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-07 Thread Tomasz Torcz
On Wed, May 06, 2020 at 11:53:14PM +0200, Lennart Poettering wrote: > > > > > > > > You can use low-level cgroup access to move it. Something like: > > > > systemctl show --property MainPID --value your.service > > > > > /sys/fs/cgroup/NEW.slice/cgroup.procs > > > > > > You void your warranty if

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-06 Thread Lennart Poettering
On Mi, 06.05.20 22:05, Tomasz Torcz (to...@pipebreaker.pl) wrote: > On Wed, May 06, 2020 at 05:18:34PM +0200, Lennart Poettering wrote: > > On Mo, 04.05.20 08:31, Tomasz Torcz (to...@pipebreaker.pl) wrote: > > > > > On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote: > > > > Hello, > >

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-06 Thread Tomasz Torcz
On Wed, May 06, 2020 at 05:18:34PM +0200, Lennart Poettering wrote: > On Mo, 04.05.20 08:31, Tomasz Torcz (to...@pipebreaker.pl) wrote: > > > On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote: > > > Hello, > > > > > >We have this odd want to move a daemon between different systemd

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-06 Thread Lennart Poettering
On Mo, 04.05.20 08:31, Tomasz Torcz (to...@pipebreaker.pl) wrote: > On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote: > > Hello, > > > >We have this odd want to move a daemon between different systemd slices. > > Not sure if that's even a valid thing to do, but here is the

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-06 Thread Lennart Poettering
On Mo, 04.05.20 11:52, nitish nagesh (nagesh.nit...@gmail.com) wrote: > Hello, > >We have this odd want to move a daemon between different systemd slices. > Not sure if that's even a valid thing to do, but here is the > requirement. The Linux kernel gets a bit confused with accounting if you

Re: [systemd-devel] Moving a service from one systemd slice to another..

2020-05-04 Thread Tomasz Torcz
On Mon, May 04, 2020 at 11:52:37AM +0530, nitish nagesh wrote: > Hello, > >We have this odd want to move a daemon between different systemd slices. > Not sure if that's even a valid thing to do, but here is the requirement. You can use low-level cgroup access to move it. Something like:

[systemd-devel] Moving a service from one systemd slice to another..

2020-05-04 Thread nitish nagesh
Hello, We have this odd want to move a daemon between different systemd slices. Not sure if that's even a valid thing to do, but here is the requirement. The daemon while booting up belongs to a systemd slice (say X) which has parameters like startupCPUShares tuned to bring the system up