Created
July 29, 2021 20:50
-
-
Save oxr463/6c1f29ae98b79767d08de8231f1e1110 to your computer and use it in GitHub Desktop.
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
# Check Open Sockets | |
# See: https://github.com/rancher/rancher/issues/31324 | |
NAME=$(docker ps --format='{{.Names}}' |grep k8s_cluster-register_cattle-cluster-agent) | |
PID=$(docker inspect -f '{{.State.Pid}}' "$NAME") | |
[ ! -d /var/run/netns ] && mkdir /var/run/netns | |
ln -sf /proc/$PID/ns/net "/var/run/netns/$NAME" | |
ip netns exec ${NAME} lsof -i -n -P |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment