ps: possibility to display slice unit for a process

Library systemd-login offers possibility to display
name of a systemd slice unit for specific pid.

This patch adds output option "slice" which will
show name of systemd slice unit.

To maintain compatibility with non-systemd systems,
procps must be configured with --with-systemd option
to enable this option.
This commit is contained in:
Lukas Nykryn
2013-08-07 11:57:24 +02:00
committed by Jaromir Capik
parent f5d15f4718
commit d66ed3350e
3 changed files with 26 additions and 2 deletions

View File

@ -154,8 +154,8 @@ AC_ARG_WITH([systemd],
[], [with_systemd=no]
)
if test "x$with_systemd" != xno; then
PKG_CHECK_MODULES([SYSTEMD], [libsystemd-login >= 202], [], [
AC_CHECK_LIB(systemd-login, sd_pid_get_machine_name, [have_systemd=yes], [have_systemd=no])
PKG_CHECK_MODULES([SYSTEMD], [libsystemd-login >= 206], [], [
AC_CHECK_LIB(systemd-login, sd_pid_get_slice, [have_systemd=yes], [have_systemd=no])
if test "x$have_systemd" = xno; then
AC_MSG_ERROR([systemd support missing/incomplete])
fi