pc-stats
v0.0.7
Published
A Module that Provides you System Resource Usage (CPU, RAM, DISK) Information.
Downloads
35
Maintainers
Readme
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
- ✨ pc-stats-api - PC Stats API
- 🚩 employee-churn - A Deep Neural Network for Calculating Churn
- 🌎 node-FileScraper - A File Scraper Which Scrapes Files for you