Kubelet API / stats / summary / usageNanoCores不正确

时间:2016-09-06 21:47:30

标签: kubernetes

Kubernetes版本:1.3.0 Docker版本:1.10.3 操作系统:CoreOS稳定版(1068.9.0) VM:m3.xlarge

在k8s节点上,我正在查询kubelet / stats / summary以获取节点的CPU使用率,并且看到了意外的结果。下面是top命令的输出,我已经运行命令消耗100%的CPU。

Output from top Command

以下是来自/ stats / summary /.

的usageNanoCores和时间值
usageNanoCores: 3203229858
time: 2016-09-06T20:37:44Z
usageNanoCores: 3497892888
time: 2016-09-06T20:38:02Z
usageNanoCores: 3497892888
time: 2016-09-06T20:38:02Z
usageNanoCores: 3318318883
time: 2016-09-06T20:38:18Z
usageNanoCores: 3419241048
time: 2016-09-06T20:38:34Z
usageNanoCores: 3218012832
time: 2016-09-06T20:38:46Z
usageNanoCores: 3218012832
time: 2016-09-06T20:38:46Z
usageNanoCores: 3673825154
time: 2016-09-06T20:38:58Z
usageNanoCores: 3213540614
time: 2016-09-06T20:39:16Z
usageNanoCores: 3213540614
time: 2016-09-06T20:39:16Z
usageNanoCores: 3560073628
time: 2016-09-06T20:39:29Z
usageNanoCores: 3196742360
time: 2016-09-06T20:39:43Z
usageNanoCores: 3196742360
time: 2016-09-06T20:39:43Z
usageNanoCores: 3543065178
time: 2016-09-06T20:39:59Z
usageNanoCores: 3323870743
time: 2016-09-06T20:40:18Z
usageNanoCores: 3323870743
time: 2016-09-06T20:40:18Z
usageNanoCores: 3486174845
time: 2016-09-06T20:40:36Z
usageNanoCores: 3486174845
time: 2016-09-06T20:40:36Z
usageNanoCores: 3961347785
time: 2016-09-06T20:40:54Z
usageNanoCores: 3683434468
time: 2016-09-06T20:41:05Z
usageNanoCores: 3892752522
time: 2016-09-06T20:41:19Z
usageNanoCores: 3892752522
time: 2016-09-06T20:41:19Z
usageNanoCores: 3867897133
time: 2016-09-06T20:41:34Z
usageNanoCores: 3867897133
time: 2016-09-06T20:41:34Z
usageNanoCores: 3546368625
time: 2016-09-06T20:41:54Z

由于usageNanoCores是"在示例窗口中平均的总CPU使用率(所有核心的总和)"而且我有4个核心,不应该使用纳诺核心是否能够接近4000000000?

1 个答案:

答案 0 :(得分:0)

top%cpu是单个核心的百分比,因此看起来繁忙的进程是单线程的,只使用100%的单核。如果你运行其中4个,我希望usageNanoCores更接近预期的4B。