简体   繁体   English

Kubelet API / stats / summary /用法NanoCores不正确

[英]Kubelet API /stats/summary/ usageNanoCores not correct

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

On k8s node I am querying the kubelet /stats/summary to get CPU usage for node and am seeing unexpected results. 在k8s节点上,我正在查询kubelet / stats / summary以获取该节点的CPU使用率,并看到意外的结果。 Below is output of top command, I have run command to consume 100% of CPU. 下面是top命令的输出,我有run命令消耗了100%的CPU。

Output from top Command top命令的输出

Here are the usageNanoCores and time values from calling /stats/summary/. 这是来自调用/ stats / summary /的useNanoCores和时间值。

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

Since usageNanoCores is the "Total CPU usage (sum of all cores) averaged over the sample window" and I have 4 cores, shouldn't usageNanoCores be constistantly closer to 4000000000? 由于usageNanoCores是“在示例窗口中平均的CPU总使用率(所有内核的总和)”,并且我有4个内核,所以usageNanoCores是否应始终接近4000000000?

top %cpu is percentage of a single core, so it looks like your busy process is single threaded and only using 100% of a single core. top %cpu是单核的百分比,因此看起来您繁忙的进程是单线程的,并且仅使用100%的单核。 If you run 4 of them, I would expect usageNanoCores to be closer to the expected 4B. 如果您运行其中的4个,我希望usageNanoCores会更接近预期的4B。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM