ps-list
Get running processes
Last updated 7 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm
$ cnpm install ps-list 
SYNC missed versions from official npm registry.

ps-list Build Status

Get running processes

Works on macOS, Linux, and Windows.

Install

$ npm install ps-list

Usage

const psList = require('ps-list');

(async () => {
	console.log(await psList());
	//=> [{pid: 3213, name: 'node', cmd: 'node test.js', ppid: 1, uid: 501, cpu: 0.1, memory: 1.5}, …]
})();

The cmd, cpu, memory, and uid properties are not supported on Windows.

API

psList(options?)

Returns a Promise<Array> with the running processes.

options

Type: object

all

Type: boolean
Default: true

Include other users' processes as well as your own.

On Windows this has no effect and will always be the users' own processes.

Current Tags

  • 8.1.0                                ...           latest (4 years ago)

4 Versions

  • 6.3.0                                ...           6 years ago
  • 8.1.0                                ...           4 years ago
  • 7.2.0                                ...           5 years ago
  • 4.1.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org