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

ps-list

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ps-list - npm Package Compare versions

Comparing version 6.0.0 to 6.1.0

5

index.js

@@ -30,3 +30,3 @@ 'use strict';

await Promise.all(['comm', 'args', 'ppid', '%cpu', '%mem'].map(async cmd => {
await Promise.all(['comm', 'args', 'ppid', 'uid', '%cpu', '%mem'].map(async cmd => {
const {stdout} = await execFile('ps', [flags, `pid,${cmd}`], {maxBuffer: TEN_MEGABYTES});

@@ -50,3 +50,3 @@

return Object.entries(ret)
.filter(([, value]) => value.comm && value.args && value.ppid && value['%cpu'] && value['%mem'])
.filter(([, value]) => value.comm && value.args && value.ppid && value.uid && value['%cpu'] && value['%mem'])
.map(([key, value]) => ({

@@ -57,2 +57,3 @@ pid: Number.parseInt(key, 10),

ppid: Number.parseInt(value.ppid, 10),
uid: Number.parseInt(value.uid, 10),
cpu: Number.parseFloat(value['%cpu']),

@@ -59,0 +60,0 @@ memory: Number.parseFloat(value['%mem'])

2

package.json
{
"name": "ps-list",
"version": "6.0.0",
"version": "6.1.0",
"description": "Get running processes",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -1,2 +0,2 @@

# ps-list [![Build Status](https://travis-ci.org/sindresorhus/ps-list.svg?branch=master)](https://travis-ci.org/sindresorhus/ps-list) [![Build status](https://ci.appveyor.com/api/projects/status/i733mfqw11sja2xf/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/ps-list/branch/master)
# ps-list [![Build Status](https://travis-ci.org/sindresorhus/ps-list.svg?branch=master)](https://travis-ci.org/sindresorhus/ps-list)

@@ -22,7 +22,7 @@ > Get running processes

console.log(await psList());
//=> [{pid: 3213, name: 'node', cmd: 'node test.js', ppid: 1, cpu: 0.1, memory: 1.5}, …]
//=> [{pid: 3213, name: 'node', cmd: 'node test.js', ppid: 1, uid: 501, cpu: 0.1, memory: 1.5}, …]
})();
```
> The `cmd`, `cpu`, and `memory` properties are not supported on Windows.
> The `cmd`, `cpu`, `memory`, and `uid` properties are not supported on Windows.

@@ -29,0 +29,0 @@

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