-
Notifications
You must be signed in to change notification settings - Fork 527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mem usage doesn't match docker stats -a
#314
Comments
I believe its a ctop issue. |
Yes I can confirm,
Ctop shows this:
|
I noticed the same: c.MemUsage = int64(stats.MemoryStats.Usage - stats.MemoryStats.Stats.Cache) First I thought that this calculation would explain the difference, but the docker stats API seems to do the same:
I tried to query the Docker API directly for the example container: $ curl --silent -XGET --unix-socket /run/docker.sock http://localhost/containers/5448a42fa234/stats?stream=false | jq .memory_stats
{
"usage": 531767296,
"stats": {
"active_anon": 11137024,
"active_file": 229097472,
"anon": 34324480,
"anon_thp": 0,
"file": 458465280,
"file_dirty": 0,
"file_mapped": 13746176,
"file_writeback": 0,
"inactive_anon": 24154112,
"inactive_file": 229367808,
"kernel_stack": 311296,
"pgactivate": 85402,
"pgdeactivate": 125321,
"pgfault": 9911151,
"pglazyfree": 9997,
"pglazyfreed": 0,
"pgmajfault": 34183,
"pgrefill": 129975,
"pgscan": 381701,
"pgsteal": 239245,
"shmem": 0,
"slab": 37055848,
"slab_reclaimable": 36716704,
"slab_unreclaimable": 339144,
"sock": 0,
"thp_collapse_alloc": 0,
"thp_fault_alloc": 13,
"unevictable": 0,
"workingset_activate": 0,
"workingset_nodereclaim": 0,
"workingset_refault": 0
},
"limit": 536870912
}
^C This shows that The Docker Documentation notes that the Since it seems to be unmaintained, it probably won't get fixed in this project. Update: Calling |
Hey there,
I'm running the latest version of ctop, and when comparing the mem usage stats between
docker stats -a
, I've noticed that the values are all larger. Which app is correct, and why are the values larger?Thanks!
The text was updated successfully, but these errors were encountered: