# nv-linux-cpu-usage

> nv-linux-cpu-usage ======================= - simple cpu usage monitor of current-process - this should be used in a worker thread, it will creat 6 setInterval(1s,5s,10s,20s,30s,60s), use it in main process is NOT good

Latest version **1.0.3** (published 2023-05-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-linux-cpu-usage
pnpm add nv-linux-cpu-usage
yarn add nv-linux-cpu-usage
bun add nv-linux-cpu-usage
```

## 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 | 1.0.3 |
| Published | 2023-05-02 |
| First published | 2023-05-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-linux-cpu-usage
- npm.io page: https://npm.io/package/nv-linux-cpu-usage

## Dependencies (1)

- [nv-facutil-prms](https://npm.io/package/nv-facutil-prms.md) ^1.0.3

## Recent versions

- 1.0.3 (latest) — 2023-05-02
- 1.0.2 — 2023-05-01
- 1.0.1 — 2023-05-01

## README

nv-linux-cpu-usage
=======================
- simple cpu usage monitor of current-process
- this should be used in a worker thread,  it will creat 6 setInterval(1s,5s,10s,20s,30s,60s), use it in main process is NOT good

install
=======
- npm install nv-linux-cpu-usage

splitted
--------


usage
=====
    
      const x   = require("nv-linux-cpu-usage");
 

     


example
-------

        > x._10s.start()
        > x._10s
        Cpusage [1 2023-05-01T11:54:09.852Z] { intv: 10000 }
        > x._10s
        Cpusage [1 2023-05-01T11:54:09.852Z] { intv: 10000 }
        > x._10s
        Cpusage [0.2877386363636364 2023-05-01T11:54:19.859Z] { intv: 10000 }
        > x._10s
        Cpusage [0.2877386363636364 2023-05-01T11:54:19.859Z] { intv: 10000 }
        > x._10s
        Cpusage [0.2877386363636364 2023-05-01T11:54:19.859Z] { intv: 10000 }
        >
        > x._10s
        Cpusage [0.2877386363636364 2023-05-01T11:54:19.859Z] { intv: 10000 }
        > x._10s
        Cpusage [0.2877386363636364 2023-05-01T11:54:19.859Z] { intv: 10000 }
        > x._10s
        Cpusage [0.2585454545454546 2023-05-01T11:54:29.866Z] { intv: 10000 }
        >
        > x._10s
        Cpusage [0.2585454545454546 2023-05-01T11:54:29.866Z] { intv: 10000 }
        >
        > x._10s.percent
        0.1617159090909091
        > x._10s.stop()
        > x._10s
        Cpusage [inactive] { intv: 10000 }
        >
        >


METHODS
========
             
          .start();
          .stop();
          .is_active()   
          .percent            // getter
          .lst_time           // getter calculated at

APIS
=======

        {
          from_shell: [Function: from_shell],
          from_api: [Function: from_api],
          random_delay: [AsyncFunction: random_delay],
          creat: [Function: creat],
          creat_and_start: [Function: creat_and_start],
          _1s: Cpusage [inactive] { intv: 1000 },
          _5s: Cpusage [inactive] { intv: 50000 },
          _10s: Cpusage [inactive] { intv: 10000 },
          _20s: Cpusage [inactive] { intv: 20000 },
          _30s: Cpusage [inactive] { intv: 30000 },
          _60s: Cpusage [inactive] { intv: 60000 }
        }

LICENSE
=======
- ISC

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