ps: possibility to display uid of session owner for a process

Library systemd-login offers possibility to display the Unix
user identifier of the owner of the session of a process.
This information will also be displayed for user processes which
are shared between multiple login sessions of the same user,
where sd_session will be blank.

This patch adds output option "sd_ouid" which will show
user UID or "-", when there is no owner for a process.

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-17 10:32:50 +02:00
parent 716d96b8eb
commit 785776c10d
2 changed files with 20 additions and 0 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_ouid OWNER T{
displays the Unix user identifier of the owner of the session of a process.
T}
sd_session SESSION T{
displays login session identifier of a process.
T}