在 Linux 上运行 PowerShell
316 2023-04-03 01:18:42
我可以通过检查来收集在Ubuntu 14.04主机上具有id foobar运行docker的容器的示例内存使用情况详细信息的使用度量:
/sys/fs/cgroups/memory/docker/foobar/memory.stat
但在Centos 7主机上,缺少’/ sys / fs / cgroups / memory / docker’目录.
如何在Centos 7主机上找到有关容器特定内存或CPU使用情况的信息.
谢谢
在探索之后,我找到了你要找的东西:
# cat /sys/fs/cgroup/memory/system.slice/docker-88018f8043d00669bbf865855ebc8a6ccc93a04ce588111e01d4e63739250340.scope/memory.stat cache 5251072rss 380928rss_huge 0mapped_file 2662400writeback 0swap 0pgpgin 1570pgpgout 195pgfault 344pgmajfault 40inactive_anon 278528active_anon 102400inactive_file 5083136active_file 167936unevictable 0hierarchical_memory_limit 18446744073709551615hierarchical_memsw_limit 18446744073709551615total_cache 5251072total_rss 380928total_rss_huge 0total_mapped_file 2662400total_writeback 0total_swap 0total_pgpgin 1570total_pgpgout 195total_pgfault 344total_pgmajfault 40total_inactive_anon 278528total_active_anon 102400total_inactive_file 5083136total_active_file 167936total_unevictable 0recent_rotated_anon 248recent_rotated_file 41recent_scanned_anon 248recent_scanned_file 1495