crazy-ps
v0.1.5
Published
Show process CPU usage and memory
Downloads
7
Readme
crazy-ps
Show process CPU usage and memory
Instalation
npm install crazy-ps
Usage
var ps = require('crazy-ps');
// just print in console current process cpu and ram
ps();
// return cpu and ram of process with pid=1234 to callback
ps(1234, function (err, result) {});
// return all processes info to callback
ps({isFullList: true}, function (err, result) {});
// print all NodeJS processes info
ps({isNodeOnly: true});
// log process loading in text file
var pid = 123;
var prefix = 'myProcess';
ps.logProcess(pid, prefix); // log in myProcess.123.log
Process info format example
{ user: 'alex', pid: 14152, cpu: 0.01, ram: 0.01, time: '0:22' }