ps: possibility to display login session for a process
Library systemd-login offers possibility to display name of login session for specific pid. Note that not all processes are part of a login session (e.g. system service processes, user processes that are shared between multiple sessions of the same user, or kernel threads). This patch adds output option "sd_session" which will show name of session or "-", when process does not belong to any session. To maintain compatibility with non-systemd systems, procps must be configured with --with-systemd option to enable this option.
This commit is contained in:
4
ps/ps.1
4
ps/ps.1
@@ -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_session SESSION T{
|
||||
displays login session identifier of a process.
|
||||
T}
|
||||
|
||||
sd_unit UNIT T{
|
||||
displays systemd unit which a process belongs to.
|
||||
T}
|
||||
|
||||
Reference in New Issue
Block a user