0.0.2 • Published 9 years ago

ps-sync v0.0.2

Weekly downloads
6
License
BSD-2-Clause
Repository
github
Last release
9 years ago

ps-sync

Syncronous ps tool for node.js

This library is written to be executed syncronously. As such, it is not recommended to be used in for web servers where blocking processes would be a problem.

installation

npm install ps-sync

Usage

var ps = require('ps-sync')

var psRecs = ps.query({pid: <pid(s)>})

where: <pid(s)> is a single pid or an array of multiple pids

psRecs will contain an object with pid as the key and an object containing process info for the given pid.

If pid is not found you will get back ps.PID_NOT_FOUND which looks like '(pid_not_found)'. You can easily test for pid like: if(psRecspid==ps.PID_NOT_FOUND){ // handle accordingly } else { // pid found, you should have an object with data. }

Data returned if pid is found:

0.0.2

9 years ago

0.0.1

9 years ago