Skip to content

Instantly share code, notes, and snippets.

@sandromello
Last active January 9, 2019 18:57
Show Gist options
  • Save sandromello/77af19fc17bb8323a6f9d01803d44c7b to your computer and use it in GitHub Desktop.
Save sandromello/77af19fc17bb8323a6f9d01803d44c7b to your computer and use it in GitHub Desktop.
Configure Container Linux core dump on the fly
#!/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