Created
March 12, 2025 16:30
-
-
Save kincl/18a65ddd6cf2b684d4c2cab407ac533b to your computer and use it in GitHub Desktop.
Finding the pid limit with cgroupv2 and crio
This file contains hidden or 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
# get the UID of the running pod and substitute dashes for underscores | |
POD_UID=$(crictl pods --name dns-default -o json | jq -r '.items[0].metadata.uid' | tr "-" "_") | |
# check the cgroup contents if it has resource requests: | |
systemd-cgls /kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice | |
# or if it doesn't :o | |
systemd-cgls /kubepods.slice/kubepods-besteffort.slice/kubepods-besteffort-pod${POD_UID}.slice | |
# check the pid max | |
cat /sys/fs/cgroup/kubepods.slice/kubepods-burstable.slice/kubepods-burstable-pod${POD_UID}.slice/pids.max | |
4096 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment