Comparing version 0.0.2 to 0.1.0
{ | ||
"name": "proc", | ||
"version": "0.0.2", | ||
"description": "Solaris process info", | ||
"version": "0.1.0", | ||
"description": "Expose system state via the /proc file system.", | ||
"author": "Daniel D. Shaw <dshaw@dshaw.com> (http://dshaw.com)", | ||
"main": "./build/Release/usage", | ||
"main": "./proc", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "install": "node-waf configure clean build" |
# Proc | ||
Expose low level system proc data. | ||
Expose system state via the /proc file system. | ||
## Known limitations | ||
This was written for us to use at Voxer on Joyent. It has not been tested outside of SmartOS and I have no expectations that this should run on anything but some flavor of Solaris. | ||
## usage | ||
Expose `/proc/self/usage` | ||
## Usage usage (Oh, so meta.) | ||
var proc = require('proc'); | ||
setTimeout(function () { | ||
var usage = proc.usage(); | ||
console.log(usage); | ||
}, 2500); | ||
## Underlying data structure | ||
<pre> | ||
/* | ||
* Resource usage. /proc/<pid>/usage /proc/<pid>/lwp/<lwpid>/lwpusage | ||
* Resource usage. | ||
*/ | ||
@@ -41,2 +59,28 @@ typedef struct prusage { | ||
ulong_t filler[10]; /* filler for future expansion */ | ||
} prusage_t; | ||
} prusage_t; | ||
</pre> | ||
## License | ||
(The MIT License) | ||
Copyright (c) 2012 Daniel D. Shaw <dshaw@dshaw.com> | ||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
@@ -1,11 +0,8 @@ | ||
var usage = require('../'); | ||
var proc = require('../'); | ||
console.dir(usage); | ||
console.dir(proc); | ||
for (var i=0; i < 10; i++) { | ||
console.log('ts', Date.now(), 'i', i); | ||
console.log('usage', usage.usage()); | ||
console.log('msnd', usage.msnd()); | ||
console.log('mrcv', usage.mrcv()); | ||
console.log('ioch', usage.ioch()); | ||
} | ||
setInterval(function () { | ||
console.log('ts', Date.now()); | ||
console.log('usage', proc.usage()); | ||
}, 2500); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
10792
10
15
85
0