2016-09-06 144 views
0

Kubernetes版本:1.3.0 泊塢版本:1.10.3 OS:CoreOS穩定(1068.9.0) VM:m3.xlargeKubelet API /統計/彙總/ usageNanoCores不正確

在K8S節點我我正在查詢kubelet/stats/summary來獲取節點的CPU使用情況,並看到意想不到的結果。下面是top命令的輸出,我有運行命令佔用100%的CPU。

Output from top Command

以下是通話/統計/彙總/的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個核心,不應該usageNanoCores是constistantly接近40億?

回答

0

top%cpu是單核的百分比,所以看起來你的繁忙進程是單線程的,只能使用單核的100%。如果你運行其中4個,我預計usageNanoCores接近預期的4B。