bottom icon indicating copy to clipboard operation
bottom copied to clipboard

Filter process tree: only show a subtree by root PID

Open singalen opened this issue 3 years ago • 2 comments

Describe the feature request

In order to monitor a process that spawns extensive number of subprocesses, it would be really great to only display the root process' children.

Additional context/details

One of the ways to do so would be to extend process filter from #59.

  • Option 1: introduce functions to the query language. Then, the query will look like childof(1234);
  • Option 2: introduce root_pid pseudo-variable, e.g.root_pid=1234. This may be inconsistent with the current implementation, as root_pid is not a real value, but still a function of the root PID that we compare to.
  • Option 3: introduce a new operator instead of a function, e.g. pid childof 1234 or pid <- 1234, where <- is a possible substitution for symbol.

singalen avatar Dec 18 '20 02:12 singalen

This sounds like a good idea, I can look into adding something like that in the future.

ClementTsang avatar Dec 18 '20 03:12 ClementTsang

+1 for monitor a single pid (subtree is better).

red010182 avatar Jan 28 '22 03:01 red010182