TIP_Core_Patterns
| Terminals / Shells • Network • X Window System • Portage • System • Filesystems • Kernel • Other |
Tired of core files going wherever, whenever? Best thing to do about it is setup yourself a global core file repository.
First thing to do is make a directory for the new core files. It must be done by the user id, for example for UID 1000:
mkdir -pv -m 0700 /var/core/1000 chown 1000 /var/core/1000
Then to make things user readable, or just make it wherever you want to make it to (as the user):
ln -sv /var/core/$UID ${HOME}/core
Now we have to setup the sysctl for this (for more information see man 5 core). As an example:
echo 'kernel.core_pattern=/var/core/%u/%p-%t-%h-%e.core' >> /etc/sysctl.conf
Finally, setup for the user, put this in your shell rc file, something like this should do:
echo 'ulimit -c unlimited' >> "$HOME/.`basename $SHELL`rc"
or globally (as root):
echo 'ulimit -c unlimited' >> /etc/profile.d/core_file.sh
Optionally, I also put it in my shell rc to inform me if I didn't notice something dumped a core:
[ $(ls -1 /var/core/${UID} | wc -l) -ne 0 ] && echo "New corefiles are available in /var/core/`whoami`"
Last modified: Sat, 06 Sep 2008 09:17:00 +1000 Hits: 6,305
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and real estate agent tools.
