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

vtop

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vtop - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

2

package.json
{
"name": "vtop",
"version": "0.1.6",
"version": "0.1.7",
"description": "Wow such top. So stats",

@@ -5,0 +5,0 @@ "homepage": "http://parall.ax/vtop",

@@ -36,3 +36,3 @@ /**

'CPU %': '0.4',
'Memory': '100 MB'
'Memory %': '1'
}, {

@@ -42,3 +42,3 @@ 'Command': 'Sublime Text 2',

'CPU %': '0.1',
'Memory': '200MB'
'Memory': '5'
}],

@@ -53,2 +53,5 @@

var stats = {};
// @todo If you can think of a better way of getting process stats,
// then please feel free to send me a pull request. This is version 0.1
// and needs some love.
var ps = child_process.exec('ps -ewwwo %cpu,%mem,comm', function (error, stdout, stderr) {

@@ -59,3 +62,3 @@ var lines = stdout.split("\n");

for (var line in lines) {
var currentLine = lines[line].trim();
var currentLine = lines[line].trim().replace(' ', ' ');
//console.log(currentLine);

@@ -65,4 +68,4 @@ var words = currentLine.split(" ");

var cpu = words[0];
var mem = words[2];
var offset = cpu.length + mem.length + 3;
var mem = words[1];
var offset = cpu.length + mem.length + 2;
var comm = currentLine.slice(offset);

@@ -69,0 +72,0 @@ // If we're on Mac then remove the path

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