Prevent Solaris core files creation with coreadm

Contributor Icon Contributed by qmchenry Date Icon March 31, 2004  
Tag Icon Tagged: Solaris system administration

Core files provide debugging information about a process that has terminated unexpectedly. Unless you are developing an application, core files are typically of little use and can cause serious problems by filling up filesystems. This recipe describes configuring Solaris to turn off core file creation for processes.


The coreadm command controls the generation of core files. To determine the current coreadm settings, run coreadm as root. Output such as the following will be generated:

global core file pattern:
init core file pattern: core
global core dumps: disabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setid core dumps: disabled
global core dump logging: disabled

Given the sample configuration above, per-process core dumps are enabled. When a process terminates abnormally or receives an appropriate signal, it will generate a core file named ‘core’ in the working directory of the process.

To disable per-process core file creation, use:

coreadm -d process

This will modify the /etc/coreadm.conf which is read at boot when /etc/init.d/coreadm is executed from a runtime control script. To make permanent changes to coreadm, do not edit the /etc/coreadm.conf file, use the coreadm command.

Previous recipe | Next recipe |
 
  • Adam Leventhal
    You can do this, but it can create real problems. If an application crashes the ISV who wrote that app should want the core file. If you want to better manage your core files, set up a global core file repository with "coreadm -e global -g /var/cores/core.%f.%n" or something similar.
blog comments powered by Disqus