🚸 Cross platform children list of a PID.
Coded with ❤️ by Simone Primarosa.
Uuh, and a fancy CLI is also available!
var pidtree =// Get childs of current process// Include the given pid in the result array// Get all the processes of the System (-1 is a special value of this package)// Include PPID in the results// If no callback is given it returns a promise insteadconst pids = awaitconsole// => [141, 42, ..., 15242]
✅ = Working ❓ = Not tested but should work
Please if your platform is not supported file an issue.
Show a tree of the processes inside your system inside your terminal. CLI
npx pidtree $PPID
$PPID with one of the pids inside your system.
Or don't pass anything if you want all the pids inside your system.
To display the output as a list, similar to the one produced from
pgrep -P $PID,
npx pidtree --list
pidtree(pid, [options], [callback]) ⇒
Get the list of children pids of the given pid.
Kind: global function
Promise.<Array.<Object>> - Only when the callback is not provided.
||A pid. If -1 will return all the pids.|
||Optional options object.|
||Include the provided pid in the list. Ignored if -1 is passed as pid.|
||Called when the list is ready. If not provided a promise is returned instead.|
- pidusage - Cross-platform process cpu % and memory usage of a PID
- Simone Primarosa - simonepri
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the license file for details.