1.1.4 • Published 9 years ago
pid-comm v1.1.4
pid-comm
Returns the result of running ps -ax -o pid -o comm.
In Node.js:
npm install pid-commAs a command line tool:
npm install -g pid-commThe pid-comm command is now available in your command line.
Usage
Node.js
const ps = require('pid-comm')
ps()
.then(processes => console.log(processes))
.catch(e => console.error(e))
// [
// {
// pid: 42,
// comm: "life"
// }
// ]CLI
pid-commWrites JSON to stdout with the following structure:
[
{
"pid": 42,
"comm": "life"
}
]