# proc-stats

> gets usage stats for a process

Latest version **0.0.4** (published 2015-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install proc-stats
pnpm add proc-stats
yarn add proc-stats
bun add proc-stats
```

## 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.4 |
| Published | 2015-09-24 |
| First published | 2015-09-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | smc-tenacious |

## Links

- npm: https://www.npmjs.com/package/proc-stats
- Repository: https://github.com/southbite/proc-stats
- Homepage: https://github.com/southbite/proc-stats#readme
- Issues: https://github.com/southbite/proc-stats/issues
- npm.io page: https://npm.io/package/proc-stats

## Recent versions

- 0.0.4 (latest) — 2015-09-24
- 0.0.3 — 2015-09-23
- 0.0.2 — 2015-09-23
- 0.0.1 — 2015-09-21

## README

proc-stats
----------

library for getting memory and cpu usage for windows, mac or linux - other os's are not supported. No production dependancies or compilation needed :)

look at the unit tests to see how it is used. remember - you can pull out basic process memory stuff (rss, heapTotal, heapUsed) using process.memoryUsage() - this gives you the % CPU usage per process, and if you are using linux the vsize

usage:
------
npm install proc-stats

```javascript

var procStats = require('proc-stats');

procStats.stats(function(e, result){
	/*
	  linux:
	  result looks like:
	  { 
	  	memory: 25751552, // resident set size
	  	memoryInfo: 
	  		{ rss: 25751552, // resident set size
	  		  vsize: 3123171328,//virtual set size
	  		  heapTotal: 16486912, 
  			  heapUsed: 9636688 
  			}, 
	  	cpu: 1.6 
	  } //CPU USAGE

	  windows:
	  result looks same, but no vsize 
	  { 
	  	memory: 25751552, // resident set size
	  	memoryInfo: 
	  		{ rss: 25751552, // resident set size
	  		  heapTotal: 16486912, 
  			  heapUsed: 9636688 
  			}, 
	  	cpu: 1.6 
	  } //CPU USAGE
	*/
});

```

thanks to Kyll Ross for the windows stuff, https://github.com/KyleRoss/windows-cpu - NB though, I have been testing, and the CPU time always seems to be returningzero - I suspect my unit test isnt generating enough load on windows, dont have time right now to investigate further...

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