System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Stop duplicate core file creation

ksmiley2
Established Member

Stop duplicate core file creation

Hi everyone,

As it stands now when a core file is produced by our application, our admin team has to notify us of its creation because it follows the coreadm global file pattern set by coreadm and is owned by root. 

 

$ coreadm
global core file pattern: /dump/core.%p.%u.%n

 

I have been successful in implementing a unique coreadm per-process file pattern that handles core files according to my custom string, but the global file pattern still triggers; creating a duplicate core file.  Another reason for the unique coreadm per-process pattern is to avoid overwriting previous core files which may still prove useful.

 

$ coreadm 29391
29391: core.<server name>.29391

 

Also since this is a clustered application server domain ALL of the server processes will be dumped so I may wind up with as many as about 3 core files that double down to about 6 core files.  We need to avoid this sort of disk space wasteage.

 

Can anyone tell me how to eliminate the duplication of core files by using the coreadm per-process file pattern to override the coreadm global file pattern?

1 REPLY
ksmiley2
Established Member

Re: Stop duplicate core file creation

*****For anyone who has this question in the future*****

 

I contacted HP support and their solution is as follows:

 

Configure coreadm as follows...

 

$ coreadm
global core file pattern: /dump/core.%p.%u.%n (DOESN'T MATTER)
init(1M) core file pattern: /dump/core.%p.%u.%n (DOESN'T MATTER)
global core dumps: disabled
per-process core dumps: enabled
global setid core dumps: disabled
per-process setid core dumps: disabled

 

With global core dumps disabled, NO process will produce a core file UNLESS either a per-process or init core file pattern are specified.  A per-process core file pattern can be created at the start of the process and will live until the process stops.  While an init core file pattern can be placed in the user's .profile i.e., coreadm -p /home/core.%f.%t to create an init core file pattern when any process is started by that user and again will live until the process stops; so there is NO cleanup after the process has ended.

 

To test your core file pattern you can execute:

 

coreadm PID

 

These configurations will take care of:

 

- Duplicate core files: If global and per-process core file patterns are set, an identical core file pattern will be produced for both core file patterns.

 

- Overwriting of core files: If the global core file pattern is set to the default: core, it will overwrite other "core" core files.

 

- Immediately recognized: (for per-process) If a per-process is set at the start of the process it can be integrated into a start script to leverage existing identity variables i.e., core.${SERVER}.${PROCESS_NAME}.  This can save some time identifying which process produced the core file and what server/node it was located on.

 

- User ownership of the core file: The produced core file is owned by the user that set the core file pattern so the responsibility can be taken off of administrators and put onto the teams that need the core file(s) for analysis.

 

Hope this helps someone...

 

Thanks for the views!