An operating system utility library. Some methods are wrappers of node libraries and others are calculations made by the module.
One line installation with npm.
npm install os-utils
Then in your code
var os = require('os-utils');
os.cpuUsage(function(v){
console.log( 'CPU Usage (%): ' + v );
});
os.cpuFree(function(v){
console.log( 'CPU Free:' + v );
});
The following methods are available:
This is not an average of CPU usage like it is in the "os" module. The callback will receive a parameter with the value.
os.cpuUsage( function(value) { /* ... */ } );
This is not based on average CPU usage like it is in the "os" module. The callback will receive a parameter with the value.
os.cpuFree( function(value) { /* ... */ } );
os.platform();
os.cpuCount()
os.freemem()
os.totalmem()
os.freememPercentage()
os.sysUptime();
os.processUptime()
os.loadavg(1)
os.loadavg(5)
os.loadavg(15)