# node-usage

> a process usage monitor with nodejs

Latest version **0.0.3** (published 2016-07-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-usage
pnpm add node-usage
yarn add node-usage
bun add node-usage
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2016-07-22 |
| First published | 2016-07-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ~metrue |

## Links

- npm: https://www.npmjs.com/package/node-usage
- npm.io page: https://npm.io/package/node-usage

## Recent versions

- 0.0.3 (latest) — 2016-07-22
- 0.0.2 — 2016-07-21
- 0.0.1 — 2016-07-21

## README

## node-usage

a process usage monitor with nodejs

* support MEM, RSS, VSZ, %MEM, %CPU
* support process group usage monitor

## usage

```
$ npm install node-usage

```

then just use it in your codes like this

```
  import UsageMonitor from 'node-usage';

  const memMonitor = new UsageMonitor({ interval: 500 });
  memMonitor.run(p.pid, (err, data) => {
    console.log(data);
  });

```

the default monitor will count child process memory, virtual memory size, and physical resident memory into result. you can disable it like this:

```
  memMonitor.run(p.pid, { countChild: false },  (err, data) => {
    console.log(data);
  });
```

## LICENSE

MIT

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