Skip to content

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

License

Notifications You must be signed in to change notification settings

0xDaksh/node-pc-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
})
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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published