Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
27.  Managing Core Files (Tasks) Managing Core Files Overview How to Set a Core File Name Pattern  Previous   Contents   Next 
   
 

How to Enable a Per-Process Core File Path

  1. Become superuser.

  2. Enable a per-process core file path.

    # coreadm -e process
  3. Display the current process core file path to verify the configuration.

    $ coreadm $$
    1180:   /home/kryten/corefiles/%f.%p

How to Enable a Global Core File Path

  1. Become superuser.

  2. Enable a global core file path.

    # coreadm -e global -g /var/core/core.%f.%p
  3. Display the current process core file path to verify the configuration.

    # coreadm
          global core file pattern: /var/core/core.%f.%p
            init core file pattern: core
                 global core dumps: enabled
            per-process core dumps: enabled
           global setid core dumps: disabled
      per-process setid core dumps: disabled
          global core dump logging: disabled

Troubleshooting Core File Problems

Error Message
 
NOTICE: 'set allow_setid_core = 1' in /etc/system is obsolete
NOTICE: Use the coreadm command instead of 'allow_setid_core'
Cause

You have an obsolete parameter that allows setuid core files in your /etc/system file.

Solution

Remove allow_setid_core=1 from the /etc/system file. Then use the coreadm command to enable global setuid core file paths.

Examining Core Files

Some of the proc tools have been enhanced to examine process core files as well as live processes. The proc tools are utilities that can manipulate features of the /proc file system.

The /usr/proc/bin/pstack, pmap, pldd, pflags, and pcred tools can now be applied to core files by specifying the name of the core file on the command line, similar to the way you specify a process ID to these commands.

For more information on using proc tools to examine core files, see proc(1).

Example--Examining Core Files With proc Tools

$ ./a.out
Segmentation Fault(coredump)
$ /usr/proc/bin/pstack ./core
core './core' of 19305: ./a.out
 000108c4 main     (1, ffbef5cc, ffbef5d4, 20800, 0, 0) + 1c
 00010880 _start   (0, 0, 0, 0, 0, 0) + b8
 
 
 
  Previous   Contents   Next