]> git.ipfire.org Git - thirdparty/systemd.git/commit
core,systemctl: add bus API to retrieve processes of a unit
authorLennart Poettering <lennart@poettering.net>
Wed, 20 Apr 2016 13:28:28 +0000 (15:28 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Apr 2016 14:06:20 +0000 (16:06 +0200)
commit291d565a04263452c03beaf537773ade4f0b1617
tree257b4d239c7bbe9daf312a70c6aa5e2c5033ee65
parent2b45d88163b29f04bf784385f4a490b2cf206861
core,systemctl: add bus API to retrieve processes of a unit

This adds a new GetProcesses() bus call to the Unit object which returns an
array consisting of all PIDs, their process names, as well as their full cgroup
paths. This is then used by "systemctl status" to show the per-unit process
tree.

This has the benefit that the client-side no longer needs to access the
cgroupfs directly to show the process tree of a unit. Instead, it now uses this
new API, which means it also works if -H or -M are used correctly, as the
information from the specific host is used, and not the one from the local
system.

Fixes: #2945
18 files changed:
Makefile.am
src/basic/process-util.c
src/basic/process-util.h
src/core/busname.c
src/core/dbus-manager.c
src/core/dbus-unit.c
src/core/dbus-unit.h
src/core/mount.c
src/core/org.freedesktop.systemd1.conf
src/core/service.c
src/core/socket.c
src/core/swap.c
src/core/unit.c
src/core/unit.h
src/shared/bus-unit-util.c [new file with mode: 0644]
src/shared/bus-unit-util.h [new file with mode: 0644]
src/shared/cgroup-show.c
src/systemctl/systemctl.c