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
- Host: GitHub
- URL: https://github.com/1j01/process-tree
- Owner: 1j01
- Created: 2015-07-08T02:18:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-11-28T05:21:23.000Z (over 8 years ago)
- Last Synced: 2025-05-11T19:42:16.124Z (about 2 months ago)
- Topics: library, list, list-processes, module, node, node-module, pid, process-children, process-tree, processes, ps, ps-tree, tree, wmic
- Language: CoffeeScript
- Homepage: https://www.npmjs.com/package/process-tree
- Size: 2.93 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
}
});
```