JavaScript binding to ps.
npm install jsps
var ps = require('jsps')
var options = {
pid: process.pid, // if undefined, process.pid is used
keywords: ['%cpu', '%mem'] // man ps for the list of keywords
}
ps.lookup(options, function(err, result) {
console.log(err || result)
})
{"%cpu": "44.7", "%mem": "0.4"}
npm install -g standard
npm test