Skip to content

Instantly share code, notes, and snippets.

@forestbaker
Last active March 1, 2016 05:54
Show Gist options
  • Save forestbaker/dfc990ed9beedb24c9df to your computer and use it in GitHub Desktop.
Save forestbaker/dfc990ed9beedb24c9df to your computer and use it in GitHub Desktop.
when you want to run programming marathon, first take a core dump
#!/bin/bash
#pseudo
if $(ulimit -c)
then
ulimit -c unlimited
mkdir -m 1777 -p /var/log/dumps
echo "kernel.core_pattern=var/log/dumps/core.%e.%p" >> /etc/sysctl.conf
# echo “/var/log/dumps/core.%e.%p” > /proc/sys/kernel/core_pattern
else
:
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment