This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# https://github.com/nestybox/sysbox/issues/714 | |
# Memory and CPU usage of Sysbox containers isn't displayed correctly in docker stats, | |
# The bash code lists the memory usage in bytes, directly from the virtual file system | |
#CONTAINERS=$(docker ps -q --no-trunc) | |
#for c in $CONTAINERS; do | |
# cat /sys/fs/cgroup/system.slice/docker-$c.scope/memory.current | |
#done | |
# This python code just turns the bash snippet above into something easier to read |