0.0.6 • Published 8 years ago

processinfo v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

processinfo

nodejs module for getting process information. Uses "ps" and currently only works on Linux systems and other environments with a compatible "ps" command.

Usage

Get all columns

This snippet lists all columns known to the ProcessList class by using the column names listed in the ProcessList.defaultColumns array.

var Ps = require("../lib/package.js");

var ps = new Ps();
ps.get(function(err, data) {
  console.log("Process information: ", data);
});

Only get some specific columns

This code returns only four columns.

var Ps = require("../lib/package.js");

var ps = new Ps({
  columns: ["processId", "parentProcessId", "lightweightProcessId", "command"]
});
ps.get(function(err, data) {
  console.log("Process information: ", data);
});

Don't list threads

The following code only lists real processes, but skips all lightweight processes (threads).

var Ps = require("../lib/package.js");

var ps = new Ps({
  listThreads: false
});
ps.get(function(err, data) {
  console.log("Process information: ", data);
});
0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago