Is there a way to convert the os.cpus() info to percentage? Just like the output of iostat (on the CPU section).
My code:
var os = require(\'os\'); c
i'm using this code:
var cpu_used = function(){ var cpu = os.cpus(); var counter = 0; var total=0; var free=0; var sys=0; var user=0; for (var i = 0; i