Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Calculating Docker Metrics Usage

$
0
0

Does anyone know how Docker calculates its memory usage, cpu usage and network/o usage? i am aware that some metrics can be obtained from the cgroup but upon calculating CPU usage and Memory usage, i realise that my metrics do not tally with the metrics shown when i run docker stats. can anyone help me with this?

for memory usage, i obtained metrics from the memory.stat file and used the following to calculate:(anon+inactive_anon+kernel_stack+active_anon+file+inactive_file+pagetables+slab ) / memory limit x100

for cpu usage, i obtained metrics from the cpu.stat and cpu.max file :

user_usec / (cpu quota * cpu max) * 100

still was unable to obtain a value that corresponds to docker stats though.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>