Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

proc

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proc - npm Package Compare versions

Comparing version 0.0.2 to 0.1.0

History.md

6

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc