sonnyp / jsps

JavaScript binding to ps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jsps

JavaScript binding to ps.

build status js-standard-style

npm install jsps

Usage

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"}

Test

npm install -g standard
npm test

About

JavaScript binding to ps.

License:ISC License


Languages

Language:JavaScript 100.0%