ps: possibility to display machine name for a process

Library systemd-login offers possibility to display
the name of the VM or container which process belongs to.

This patch adds output option "sd_machine" which will
show machine name or "-" when the name can not be determined.

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-04-22 12:33:31 +02:00
parent 785776c10d
commit 4c1536d5f1
3 changed files with 22 additions and 2 deletions

View File

@@ -1489,6 +1489,10 @@ SCHED_FIFO, SCHED_RR, SCHED_BATCH, SCHED_ISO, and SCHED_IDLE are respectively
displayed as 0, 1, 2, 3, 4, and 5.
T}
sd_machine MACHINE T{
displays machine name for processes assigned to VM or container.
T}
sd_ouid OWNER T{
displays the Unix user identifier of the owner of the session of a process.
T}