#1756 PR merged
: Replace pstree by ps command (issue#1755)¶
Labels: fixed / solved / done
, minor bug
jsmeix opened issue at 2018-03-13 13:14:¶
-
Type: Bug Fix
-
Impact: Low
-
Reference to related issue (URL):
https://github.com/rear/rear/issues/1755 -
How was this pull request tested?
On my SLES11 and SLES12 systems. -
Brief description of the changes in this pull request:
Show descendant processes PIDs with their commands in the log
so that later the plain PIDs in the log get more comprehensible.
What works sufficiently on all systems is "pstree -Aplau $MASTER_PID"
but the pstree command is not available in the ReaR recovery system
so that the ps command is used as fallback.
jsmeix commented at 2018-03-13 13:17:¶
No longer a real "cleanup" because with what I ended after
lots of trial and error on SLES10 SLES11 and SLES12 is
Log "$( pstree -Aplau $MASTER_PID || ps f -g $MASTER_PID -o pid,args || ps --ppid $MASTER_PID -o pid,args )"
because currently I don't know a 'ps' command that "just works" on
SLES10 SLES11 and SLES12 to show all descendant processes.
For details see my comments in the code.
gdha commented at 2018-03-13 14:20:¶
@jsmeix code looks good and works on centos. Just one remark if I may?
Shouldn't we add pstree
to the PROGS array?
jsmeix commented at 2018-03-13 14:24:¶
@gdha
if you don't mind - I would like to have pstree by default in the
recovery system
because personally I am much used to use it regularily and missed it
already
several times in the past in the recovery system.
jsmeix commented at 2018-03-13 14:44:¶
Adding pstree to PROGS increases the recovery system size
by basically only the size of the /usr/bin/pstree binary
(which is on my SLES11 system about 23 KiB)
because /usr/bin/pstree needs only standard libraries.
iamlauriano commented at 2020-07-04 14:31:¶
summarizing the process just changed its name, from pstree to psmisc
[Export of Github issue for rear/rear.]