usage
Advanced tools
Comparing version 0.3.5 to 0.3.6
var usage = require('../'); | ||
var pid = (process.argv[2])? parseInt(process.argv[2]): process.pid; | ||
@@ -6,3 +7,3 @@ setInterval(function() { | ||
var options = { keepHistory: true }; | ||
usage.lookup(parseInt(process.argv[2]), options, function(err, stat) { | ||
usage.lookup(pid, options, function(err, stat) { | ||
@@ -9,0 +10,0 @@ console.log(err, stat); |
@@ -16,4 +16,4 @@ module.exports = function(sysinfo) { | ||
callback(new Error('node-usage mac provider does not implemented yet! patches are welcome.')); | ||
sysinfo.getUsage(pid, callback); | ||
}; | ||
} | ||
} |
{ | ||
"name": "usage", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "simple way to lookup linux process usage", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,3 +6,3 @@ # node-usage [![Build Status](https://travis-ci.org/arunoda/node-usage.png?branch=master)](https://travis-ci.org/arunoda/node-usage) | ||
* Simple interface to lookup cpu and memory usage of any accessible process on the system. | ||
* Works on Linux, SmartOS and Solaris | ||
* Works on OSX, Linux, SmartOS and Solaris | ||
* Tested on Heroku and Nodejitsu | ||
@@ -53,2 +53,5 @@ | ||
## Notes on OSX | ||
if you are going to monitor usage of a foriegn pid, please do it as `sudo`. See [here](https://github.com/arunoda/node-usage/pull/5) for more details. | ||
## Motivation | ||
@@ -55,0 +58,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
20958
26
247
60