Convert the output of os.cpus() in Node.js to percentage

后端 未结 8 1650
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 11:27

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         


        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-08 11:56

    If you are looking at the CPU Usage per process try node-usage

提交回复
热议问题