如何计算数字海洋API的CPU百分比
我称数字海洋API进行监测,这是数字海洋的反应。
我不了解这些模式,例如'idle'或'iadle'或'iowait'and'iowait'and and'and'and'and'and'and'and'and'and'如何从这些索引中计算%CPU,请帮助我!!!谢谢大家!!!
I have call Digital Ocean API for monitoring, and here is the response from Digital Ocean.
I don't understand these modes, such as 'idle' or 'iowait' and how to calculate %CPU from these index, please help me !!! thank you all !!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
总计=闲置 +爱荷华州 + IRQ + nice + softirq + shet + system +用户
百分比=(1-(idle / total)) * 100;
total = idle + iowait + irq + nice + softirq + steal + system + user
percent = ( 1 - ( idle / total ) ) * 100;