coreadm command for Solaris:
You must be wondering what this coreadm command does. It is really a powerful tool that helps the administrator to look at the cores generation way.
Actually there are times when we found that our core files is getting generated with the name "core" in the process running directory. And if the process is generating cores in quick succession than the same file is getting overwritten all the time.
Thus it will become tough for us to debug the core..............
So in such cases we can actually make the core file get generated with a name pattern and this can be possible with the coreadm command in Solaris OS (x86 or SPARC).
Execute the command without any option will display the current settings done for the core files generation.
bash-3.2$ coreadm
global core file pattern:
global core file content: default
init core file pattern: core
init core file content: default
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
When i executed the command on my Solaris Sparc box above output is shown. It shows that core file generation per-process is enabled but the core file name pattern (in init core file pattern) is "core" only. Thus with this setting the same file will be overwritten all the time.
So as to set the name pattern for per-process, follwoing is the command:
- bash-3.2$ coreadm -i core.%f.%p.%t
%p - process pid
%t - default timestamp
To confirm above made settings, execute below mentioned command:
- bash-3.2$ coreadm $$
It shows the set core file name pattern.
Thus now-onwards you will notice that core files will be generated with a name pattern.
Like - "core.httpd.worker.4298.1404300544"
So coreadm makes our life easy....................
Enjoy :-)