【问题标题】:Where can I find the normalized cpu load in linux?我在哪里可以找到 linux 中的标准化 cpu 负载?
【发布时间】:2021-04-08 14:06:37
【问题描述】:

我尝试过使用 /proc/loadavg,但我不想要平均值。有什么方法可以进行数学运算,例如实时使用我所有的内核,然后将其除以我的 cpu 的全部容量?

这里很好地解释了我需要什么https://developer.qualcomm.com/forum/qdn-forums/increase-app-performance/trepn-profiler/28696

【问题讨论】:

标签: c linux linux-kernel


【解决方案1】:

不确定标准化的 cpu 负载是否在任何地方都可用,但您可以执行类似的操作

标准化 cpuload =(测量的 cpu 负载/标准化因子)* 权重

规范化的 cpuload 实际上会给你一个值,如果它大于 weight 被认为是过载。这里的归一化因子是 1。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-11-13
    • 2012-07-08
    • 2012-08-03
    • 1970-01-01
    • 2015-06-28
    • 2012-04-19
    • 1970-01-01
    相关资源
    最近更新 更多