crazy-ps

0.1.5 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i crazy-ps

Weekly Downloads

0

Version

0.1.5

License

BSD

Last publish

Collaborators

  • abramov