0.4.1 • Published 10 years ago

procps v0.4.1

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

procps build status

Node.js bindings for procps, a library that provides information about processes using the /proc filesystem, using the better maintained fork.

Supported Platforms

Unixes with a /proc directory only. Tested on arch linux and ubuntu.

Installation

npm install procps

Table of Contents generated with DocToc

Example

var procps = require('procps');

var proctab = procps.readproctab();
var bycommand = proctab.reduce(function (acc, p) {
  acc[p.cmd] = p;
  return acc;
}, {});

console.log(bycommand.node)
{ cutime: 0,
  majFlt: 0,
  vmSize: 661152,
  resident: 0,
  startCode: 4194304,
  rgroup: 'kermit',
  egid: 1000,
  pgrp: 13690,
  minFlt: 3199,
  startTime: 3344937,
  suser: 'kermit',
  fgid: 1000,
  processor: 0,
  startStack: 76310960,
  sgroup: 'kermit',
  cmajFlt: 0,
  flags: 4202496,
  rss: 2431,
  tid: 13834,
  ...
  environ:
   [ 'LC_PAPER=en_US.UTF-8',
     ...
     'npm_node_execpath=/usr/bin/node' ],
  nlwp: 2,
  kstkEsp: 76309144,
  fuser: 'kermit',
  cmdline: [ 'node', 'example/readproctab.js' ],
  sigcatch: '0000000180014202',
  utime: 2,
  vmRss: 9724,
  wchan: 4294967295,
  euid: 1000,
  sigignore: '0000000000001000',
  share: 0 }

API

Unofficial procps documentation.

So far readproctab has been implemented, but lots more to come, i.e. meminfo.

generated with docme

LICENSE

MIT

0.4.1

10 years ago

0.4.0

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago