Reputation: 68
I'm wondering how could I read hard disk utilization / idle time, hdd type using Javascript for Windows and MacOS. I have access to nodejs and electron API for my app. I can't seem to find any API or npm packages that allow reading of harddisk stats and disk utilization.
Upvotes: 0
Views: 2944
Reputation: 1037
There is 1 npm package "systeminformation" which provides these details : Below is the reference : https://www.npmjs.com/package/systeminformation
const si = require('systeminformation');
setInterval(function() {
si.mem(function(data) {
console.log('Memory-Information:');
console.log(data);
});
}, 1000)
Upvotes: 4