Topics: AIX, System Admin

Core file naming

Before AIX 5L Version 5.1, a core file was always stored in a file named core. If the same or another application generated another core file before you renamed the previous one, the original content was lost.

Beginning with AIX 5L Version 5.1, you can enable a unique naming of core files, but be aware that the default behavior is to name the files core. You apply the new enhancement by setting the environment variable CORE_NAMING to a non-NULL value, for example:

CORE_NAMING=yes
After setting CORE_NAMING, you can disable this feature by setting the variable to the NULL value. For example, if you are using the Korn shell, do the following:
export CORE_NAMING=
After setting CORE_NAMING, all new core will be stored in files of the format core.pid.ddhhmmss, where:
  • pid: Process ID
  • dd: Day of the month
  • hh: Hours
  • mm: Minutes
  • ss: Seconds
In the following example, two core files are generated by a process identified by PID 30480 at different times:
# ls -l core*
-rw-r--r--   1 user group   8179 Jan 28 2010  core.30480.28232347
-rw-r--r--   1 user group   8179 Jan 28 2010  core.30482.28232349
The time stamp used is in GMT and your time zone will not be used.

Also check out the lscore and the chcore commands, which can also be used to list and set core naming. These commands can also be set to define a core location, and to turn core compression on.



If you found this useful, here's more on the same topic(s) in our blog:


UNIX Health Check delivers software to scan Linux and AIX systems for potential issues. Run our software on your system, and receive a report in just a few minutes. UNIX Health Check is an automated check list. It will report on perfomance, capacity, stability and security issues. It will alert on configurations that can be improved per best practices, or items that should be improved per audit guidelines. A report will be generated in the format you wish, and the report includes the issues discovered and information on how to solve the issues as well.

Interested in learning more?