Created
March 12, 2019 18:27
-
-
Save lanefu/c984c8d7bf19a772b690d9f5b8a585f9 to your computer and use it in GitHub Desktop.
watch cgroup memory
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
#!/bin/bash | |
cd /sys/fs/cgroup/memory | |
while [[ /bin/true ]];do | |
date | |
for item in $(ls memory.*usage*); do echo $item $(echo echo $(echo $(cat $item) /1024/1024 |bc))M;done | |
echo "container count $(docker ps -a|wc -l)" | |
echo | |
sleep 10s | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment