k8s pod里SystemStatusListener获取到的是物理机的load不是pod的load
可以获取到pod或容器里的load
k8s
1qczuiv01#
这个确实是个问题,社区可以一起来看一下获取容器 load 的比较好的方式。
dm7nw8vv2#
The same issue entranced in micrometer-metrics/micrometer#1534 .
vngu2lb83#
Also refer alibaba/sentinel-golang#415
dxxyhpgq4#
maybe you can refer this https://juejin.cn/post/6986598285406371871/ ,it is my ideas about solving this.
nue99wik5#
容器里获取 CPU 可以参考以下方法:
参考: https://stackoverflow.com/questions/35692667/in-docker-cpu-usage-calculation-what-are-totalusage-systemusage-percpuusage-a
5条答案
按热度按时间1qczuiv01#
这个确实是个问题,社区可以一起来看一下获取容器 load 的比较好的方式。
dm7nw8vv2#
The same issue entranced in micrometer-metrics/micrometer#1534 .
vngu2lb83#
Also refer alibaba/sentinel-golang#415
dxxyhpgq4#
The same issue entranced in micrometer-metrics/micrometer#1534 .
maybe you can refer this https://juejin.cn/post/6986598285406371871/ ,it is my ideas about solving this.
nue99wik5#
容器里获取 CPU 可以参考以下方法:
参考: https://stackoverflow.com/questions/35692667/in-docker-cpu-usage-calculation-what-are-totalusage-systemusage-percpuusage-a