Skip to content

Commit

Permalink
add debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Oct 22, 2024
1 parent 49b6266 commit e2608be
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions container/entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ fi

function do_cgroup {
docker_container=$(cat /proc/1/cgroup | sed 's/0::.\+\/\(.\+\)/\1/')
if [[ -z "$docker_container" ]]; then
echo "Could not determine container group base"
return
fi

cgpath=$(find /sys/fs/cgroup -type d -iname $docker_container)"/../"
if [[ ! -d "$cgpath" ]]; then
echo "Cgroup path not found for $docker_container"
return
fi

for f in "$cgpath"*/memory.swap.max; do
echo "Setting cgroup: $f"
Expand Down

0 comments on commit e2608be

Please sign in to comment.