Run the following commands as root.
mkdir -p /var/cores coreadm -g /var/cores/%f.%n.%p.core -e global -e process -e \ global-setid -e proc-setid -e log
View the core configuration.
# coreadm global core file pattern: init core file pattern: %f.%n.%p.core global core dumps: enabled per-process core dumps: enabled global setid core dumps: enabled per-process setid core dumps: enabled global core dump logging: enabled |
See the coreadm man page for further information.
Set the size of the core dumps to unlimited.
# ulimit -c unlimited # ulimit -a coredump(blocks) unlimited |
See the ulimit man page for further information.
You may find that when you issue a kill -SEGV or a kill -BUS commands, the core file is not generated even though you have done the necessary setting using the coreadm command. To enable the instance to generate the core file, add the following line to the Proxy Server start script.
The start file looks like (# more server-root/proxy-identifier/start):
#!/bin/shcd /proxyserver/p36sp5/bin/proxy: ./ns-proxy -d /proxyserver/p36sp5/proxy-sun-proxy/config $@
Replace the start file with the following:
#!/bin/shcd /proxyserver/p36sp5/bin/proxy: ./ns-proxy -c -d /proxyserver/p36sp5/proxy-sun-proxy/config $@
The change is that -c is added before -d
You must restart the modified Proxy Server instance. When you issue a kill -SEGV or a kill -BUS, it will generate a core file under the proxy-instance/config directory.
Verify core file creation.
# cd /var/cores # sleep 100000 & [1] PID # kill -8 PID # ls |