1.4.3 • Published 12 years ago

monitor-pid v1.4.3

Weekly downloads
6
License
-
Repository
github
Last release
12 years ago

node-monitor-pid

Monitors a pid and all its sons

Installation

npm install monitor-pid

Usage as a command line

npm install -f monitor-pid
monitor-pid --pid 5253 --period 5000

It will monitor the pid 5253 each 5 secondes and output the statistics on stdout.

Usage as a nodejs module

var MonitorPid = require('monitor-pid');

// creates an instance of MonitorPid
// - pid to monitor is 5253
// - monitoring will occure each 5 secondes
var mapp = new MonitorPid(5253, { period: 5000 });

// begin the monitoring
mapp.start();

// received each time the pid tree has been monitored
mapp.on('monitored', function (pid, stats) {
  console.error('monitored', pid, stats);
});

// occurs when the monitoring is finished
// (no more pid or stop has been called)
mapp.on('end', function (pid) {
  console.error('end', pid);
});

// stop the monitoring after 50 secondes
setTimeout(function () {
  mapp.stop();
}, 50000);
1.4.3

12 years ago

1.4.2

12 years ago

1.4.1

12 years ago

1.4.0

12 years ago

1.3.9

12 years ago

1.3.8

12 years ago

1.3.7

12 years ago

1.3.5

12 years ago

1.3.4

12 years ago

1.3.3

12 years ago

1.3.2

12 years ago

1.3.1

12 years ago

1.3.0

12 years ago

1.2.0

12 years ago

1.1.0

12 years ago

1.0.1

12 years ago