1070 |
sysctl -w kernel.core_pattern = /var/crash/core/core.%e.%t.%p |
sysctl -w kernel.core_pattern = /var/crash/core/core.%e.%t.%p |
1071 |
sysctl -w kernel.core_setuid_ok = 0 |
sysctl -w kernel.core_setuid_ok = 0 |
1072 |
sysctl -w kernel.core_uses_pid = 1 |
sysctl -w kernel.core_uses_pid = 1 |
1073 |
echo -e "bt\nquit" > /etc/gdb.batch |
echo -e "bt\nquit" > /etc/gdb.batch |
1074 |
echo "ulimit -c unlimited" >> /etc/sysconfig/httpd |
echo "ulimit -c unlimited" >> /etc/sysconfig/httpd |
1075 |
echo "CoreDumpDirectory /var/crash/core" > /etc/httpd/conf.d/core.conf |
echo "CoreDumpDirectory /var/crash/core" > /etc/httpd/conf.d/core.conf |
1076 |
</pre> |
</pre> |
1077 |
|
|
1078 |
Crontab based core aging: |
Crontab based core aging: |
1079 |
<pre> |
<pre> |
1080 |
10 1 * * * /usr/bin/find /var/crash/core/ -mtime +1 -exec rm -f {} \; |
10 1 * * * /usr/bin/find /var/crash/core/ -type f -mtime +1 -exec rm -f {} \; |
1081 |
</pre> |
</pre> |
1082 |
|
|
1083 |
Monit set to watch the directory timestamp change and send last core backtrace: |
Monit set to watch the directory timestamp change and send last core backtrace: |