Child pages
  • Process management

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

kill $(pstree -p <PID> | grep --only-matching '[0-9]*'|tac)

A array of PIDs in a process tree can be generated by:

PID=tree_root_PID
pids=($(pstree --show-pids --long $PID | sed -e 's/.*(//' -e 's/)/ /'))

top

TBC