An open API service indexing awesome lists of open source software.

https://github.com/1j01/process-tree

Node library to find all the child processes
https://github.com/1j01/process-tree

library list list-processes module node node-module pid process-children process-tree processes ps ps-tree tree wmic

Last synced: 17 days ago
JSON representation

Node library to find all the child processes

Awesome Lists containing this project

README

        

# process-tree

> like [ps-tree](https://www.npmjs.com/package/ps-tree), but cross-platform, and providing sub-children

Get a tree of processes starting from the children of a given PID.

```js
require("process-tree")(pid, function(err, children){
if(err){
console.error(err);
}else{
console.log(JSON.stringify(children, null, 4));
console.assert(children[0].ppid === pid);
console.log(children[0].children[0].pid);
console.log(children[0].name); // "Name" from wmic, "comm" from ps
}
});
```