Last active
January 9, 2019 18:57
-
-
Save sandromello/77af19fc17bb8323a6f9d01803d44c7b to your computer and use it in GitHub Desktop.
Configure Container Linux core dump on the fly
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
#!/bin/bash | |
while true; do | |
for node in $(kubectl get nodes --no-headers |grep -v master |awk {'print $1'}); do | |
echo "=====> Configuring $node" | |
ssh -l core -o StrictHostKeyChecking=no -i /root/id_rsa $node "sudo sed -i 's/#ProcessSizeMax.*/ProcessSizeMax=900G/g;s/#ExternalSizeMax.*/ExternalSizeMax=900G/g' /etc/systemd/coredump.conf" | |
ssh -l core -o StrictHostKeyChecking=no -i /root/id_rsa $node "sudo systemctl daemon-reload" | |
done | |
echo "Done! sleeping for 60 minutes ..." | |
sleep 3600 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment