# @pugdag/process-list

> Cross-platform method to receive the list of the launched processes

Latest version **2.0.2** (published 2024-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pugdag/process-list
pnpm add @pugdag/process-list
yarn add @pugdag/process-list
bun add @pugdag/process-list
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2024-07-10 |
| First published | 2024-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8 |
| Dependencies | 4 |
| Unpacked size | 641.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Author | Dmitry Tsvettsikh |
| Maintainers | pugdag |
| Keywords | tasklist, process, list, task, taskmgr, proc, procfs, linux, windows, proclist, pm2, forever |

## Links

- npm: https://www.npmjs.com/package/@pugdag/process-list
- Repository: https://github.com/Pugdag/node-process-list
- Homepage: https://github.com/Pugdag/node-process-list#readme
- Issues: https://github.com/Pugdag/node-process-list/issues
- npm.io page: https://npm.io/package/@pugdag/process-list

## Dependencies (4)

- [nan](https://npm.io/package/nan.md) ^2.18.0
- [pify](https://npm.io/package/pify.md) ^6.1.0
- [bindings](https://npm.io/package/bindings.md) ^1.5.0
- [prebuild-install](https://npm.io/package/prebuild-install.md) ^7.1.1

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2024-07-10

## README

<p align='center'>
  <img src='logo.png' height='250' width='483' alt='logo' />
  <p align='center'>Cross-platform native method to receive the list of the launched processes</p>
</p>

[![Build Status](https://travis-ci.org/reklatsmasters/node-process-list.svg?branch=master)](https://travis-ci.org/reklatsmasters/node-process-list) [![Build status](https://ci.appveyor.com/api/projects/status/oy0sbnie2a0d5hou?svg=true)](https://ci.appveyor.com/project/ReklatsMasters/node-process-list) [![npm](https://img.shields.io/npm/v/process-list.svg)](https://npmjs.org/package/process-list) [![license](https://img.shields.io/npm/l/process-list.svg)](https://npmjs.org/package/process-list) [![downloads](https://img.shields.io/npm/dm/process-list.svg)](https://npmjs.org/package/process-list) 
[![Greenkeeper badge](https://badges.greenkeeper.io/reklatsmasters/node-process-list.svg)](https://greenkeeper.io/)

### Install

```bash
npm i process-list
# or
yarn add process-list
```

It's that easy! npm will download one of the [prebuilt](https://github.com/reklatsmasters/node-process-list/releases/latest) binaries for your OS. If you need to build `process-list`, see [node-gyp](https://npmjs.org/package/node-gyp) for more details.

### Supported OS

* `Windows` Windows 7+, Windows Server 2008 R2+
* `Linux` any Linux-based distributives
* `OS X` *Soon...*

### Usage
```js
const { snapshot } = require("process-list");

const tasks = await snapshot('pid', 'name');
console.log(tasks);

// output
// [{
//    name: "1.exe",
//    pid: 1234,
// }, ... ]
```

### API

##### `snapshot(...field: String): Promise<[]Object>`
Returns the list of the launched processes.

##### `allowedFields: []String`
List of allowed fields.

* `pid: Number` - process pid
* `ppid: Number` - parent process pid
* `name: String` - process name (title)
* `path: String` - full path to the process binary file
* `threads: Number` - threads per process
* `owner: String` - the owner of the process
* `priority: Number` - an os-specific process priority
* `cmdline: String` - full command line of the process
* `starttime: Date` - the process start date / time
* `vmem: String` - virtual memory size in bytes used by process
* `pmem: String` - physical memory size in bytes used by process
* `cpu: Number` - cpu usage by process in percent
* `utime: String` - amount of time in ms that this process has been scheduled in user mode
* `stime: String` - amount of time that in ms this process has been scheduled in kernel mode

## License

MIT, Copyright &copy; 2014 - 2019 Dmitry Tsvettsikh

---
_Source: https://npm.io/package/@pugdag/process-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
