pc-stats

0.0.7 • Public • Published

Node-PC-Stats

An NPM Module which returns Your Personal Computer's (PC) Resource Usage.

npm version GitHub issues GitHub stars GitHub license

How It Works?

  • Import It
  • Run it as a Function
  • Returns a Promise
  • Use the Javascript then function on the Promise for Success Message
  • Use the Javascript catch function to the Promise for Error Message

The Code

var stats = require('pc-stats')
stats().then((statistics) => {
    console.log(statistics)
}).catch((err) => {
    console.log(err)
})

The Output (https://npm.runkit.com/pc-stats)

cpu: Object
name: "Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz"
threads: Array (8 items)
0: Object {idle: 92.63157894736842, …}
1: Object {idle: 76.13636363636364, …}
2: Object {idle: 86.95652173913044, …}
3: Object {idle: 92.63157894736842, …}
4: Object {idle: 89.58333333333334, …}
5: Object {idle: 95.6989247311828, …}
6: Object {idle: 96.84210526315789, …}
7: Object {idle: 96.80851063829788, …}
Array Prototype
...
...
ram: Object
free: "1.55"
total: "15.77"
unit: "GB"

Extras

License

This Module is Licensed Under MIT 2017, Created by Daksh Miglani

Dependencies (2)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i pc-stats

    Weekly Downloads

    5

    Version

    0.0.7

    License

    MIT

    Last publish

    Collaborators

    • dakshmiglani