Last active
April 21, 2023 21:11
-
-
Save sparrc/bece237a9d7fcd409a6555be08e50c2a to your computer and use it in GitHub Desktop.
cats all cgroup files in ecs and docker cgroups (for cgroups v1 system)
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/env bash | |
set -x | |
rm -rf /tmp/cgroup-ecs && touch /tmp/cgroup-ecs | |
rm -rf /tmp/cgroup-docker && touch /tmp/cgroup-docker | |
for f in $(find /sys/fs/cgroup -type f | grep "/ecs/" | sort -h); do | |
echo $f >>/tmp/cgroup-ecs | |
cat $f >>/tmp/cgroup-ecs | |
printf "\n\n" >>/tmp/cgroup-ecs | |
done | |
for f in $(find /sys/fs/cgroup -type f | grep "/docker/" | sort -h); do | |
echo $f >>/tmp/cgroup-docker | |
cat $f >>/tmp/cgroup-docker | |
printf "\n\n" >>/tmp/cgroup-docker | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment