personal/api/node_modules/pstree.remy
shenjianZ 71554afae8 add api/node_modules 2025-02-27 17:37:49 +08:00
..
lib add api/node_modules 2025-02-27 17:37:49 +08:00
tests add api/node_modules 2025-02-27 17:37:49 +08:00
.travis.yml add api/node_modules 2025-02-27 17:37:49 +08:00
LICENSE add api/node_modules 2025-02-27 17:37:49 +08:00
README.md add api/node_modules 2025-02-27 17:37:49 +08:00
package.json add api/node_modules 2025-02-27 17:37:49 +08:00

README.md

pstree.remy

Cross platform ps-tree (including unix flavours without ps)

Installation

npm install pstree.remy

Usage

const psTree = psTree require('pstree.remy');

psTree(PID, (err, pids) => {
  if (err) {
    console.error(err);
  }
  console.log(pids)
});

console.log(psTree.hasPS
  ? "This platform has the ps shell command"
  : "This platform does not have the ps shell command");