[systemd-devel] How to get all PIDs in a service
Sébastien Luttringer
seblu at seblu.net
Fri Jun 5 00:43:44 PDT 2015
On Thu, 2015-06-04 at 19:31 +0300, Andrei Borzenkov wrote:
> В Thu, 04 Jun 2015 10:08:52 +0200
> Sébastien Luttringer <seblu at seblu.net> пишет:
> It seems to work here using systemd 210 on openSUSE
>
> bor at opensuse:~/src/systemd> cat /sys/fs/cgroup/systemd/$(systemctl
> show
> systemd-rfkill at rfkill1.service -p ControlGroup | cut -f2 -d=)/tasks
>
> bor at opensuse:~/src/systemd> systemctl show
> systemd-rfkill at rfkill1.service -p ControlGroup --no-pager
> ControlGroup=/system.slice/system-systemd\
> x2drfkill.slice/systemd-rfkill at rfkill1.service
Could you try with serial-getty?
I don't know if it works with systemd-rfkill at rfkill1.service
because it 's a script which exits immediately, so control group
quickly property is empty.
In my test, it cat the tasks file in systemd directory.
> > What's the right way to get all pid belonging to a service? How can
> > I
> > unescape strings from systemctl?
> >
>
> Well, you can use systemd-escape -u, but real question is why it gets
> escaped twice and is it intentional.
Thanks, that helps!
--
Sébastien "Seblu" Luttringer
https://seblu.net | Twitter: @seblu42
GPG: 0x2072D77A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150605/cc75c7f4/attachment.sig>
More information about the systemd-devel
mailing list