我试图看看库伯内特斯吊舱占用了多少内存和CPU。为此,我运行了以下命令:
kubectl top pod podname --namespace=default
我得到了以下错误:
W0205 15:14:47.248366 2767 top_pod.go:190] Metrics not available for pod default/podname, age: 190h57m1.248339485s
error: Metrics not available for pod default/podname, age: 190h57m1.248339485s
我该如何处理这个错误
当我用Linux的time实用工具测量Go程序的运行时,我得到以下输出:
real 1m9.177s
user 7m1.788s
sys 0m39.016s
当我查看Go的pprof CPU分析器中相同的程序执行的输出时,我得到了以下输出:
Entering interactive mode (type "help" for commands)
(pprof) top
143.32s of 176s total (81.43%)
这个176 s的数字是从哪来的呢?它既不是时钟时间,也不是CPU时间。我正在运行这个GOMAXPROCS设置为8的程序,我有一种感