Skip to content

Instantly share code, notes, and snippets.

@apurvadave
Created November 1, 2016 15:43
Show Gist options
  • Save apurvadave/5eaf079e26e7aeee44165757e646f46e to your computer and use it in GitHub Desktop.
Save apurvadave/5eaf079e26e7aeee44165757e646f46e to your computer and use it in GitHub Desktop.
Example docker stats API. Useful as a stepping stone to docker monitoring
"cpu_stats": {
"cpu_usage": {
"percpu_usage": [
12763896556733
],
"total_usage": 12763896556733,
"usage_in_kernelmode": 918680000000,
"usage_in_usermode": 5232460000000
},
"system_cpu_usage": 6587736350000000,
"throttling_data": {
"periods": 0,
"throttled_periods": 0,
"throttled_time": 0
}
},
"memory_stats": {
"failcnt": 0,
"limit": 1043800064,
"max_usage": 31395840,
"stats": {
"active_anon": 17752064,
"active_file": 1081344,
"cache": 1146880,
"dirty": 0,
"hierarchical_memory_limit": 9223372036854771712,
"hierarchical_memsw_limit": 9223372036854771712,
"inactive_anon": 0,
"inactive_file": 65536,
"mapped_file": 1138688,
"pgfault": 12515,
"pgmajfault": 246,
"pgpgin": 16132,
"pgpgout": 11518,
"rss": 17752064,
"rss_huge": 0,
"swap": 0,
"total_active_anon": 17752064,
"total_active_file": 1081344,
"total_cache": 1146880,
"total_dirty": 0,
"total_inactive_anon": 0,
"total_inactive_file": 65536,
"total_mapped_file": 1138688,
"total_pgfault": 12515,
"total_pgmajfault": 246,
"total_pgpgin": 16132,
"total_pgpgout": 11518,
"total_rss": 17752064,
"total_rss_huge": 0,
"total_swap": 0,
"total_unevictable": 0,
"total_writeback": 0,
"unevictable": 0,
"writeback": 0
},
"usage": 18898944
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment