Sun Gathering Debug Data for Sun Java System Web Server

ProcedureTo Configure Solaris to Generate Core Files

  1. Run the following commands as root.

    mkdir -p /var/cores
    coreadm -g /var/cores/%f.%n.%p.%t.core -e global -e global-setid -e 
    log -d process -d proc-setid

    In this command:

    -g

    Specifies the global core file name pattern. Unless a per-process pattern or setting overrides it, core files are stored in the specified directory with a name such as program.node.pid.time.core, for example: mytest.myhost.1234.1102010309.core.

    -e

    Specifies options to enable. The preceding command enables:

    • Use of the global (that is, system-wide) core file name pattern (and thereby location)

    • Capability of setuid programs to also dump core as per the same pattern

    • Generation of a syslog message by any attempt to dump core (successful or not)

    -d

    Specifies options to disable. The preceding command disables:

    • Core dumps per the per-process core file pattern

    • Per-process core dumps of setuid programs

    The preceding command stores all core dumps in a central location with names identifying what process dumped core and when. These changes only impact processes started after you run the coreadm command. Use the coreadm -u command after the preceding command to apply the settings to all existing processes.

  2. Display the core configuration.


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

    See the coreadm man page for further information.

  3. Set the size of the core dumps to unlimited.


    # ulimit -c unlimited
    # ulimit -a
    
            coredump(blocks) unlimited

    See the ulimit man page for further information.

  4. If the Web Server instance is running in SSL mode, it does not generate a core file . To enable the instance to generate the core file, add the following line to the server start script start.

    SSL_DUMP=1; export SSL_DUMP


    Note –

    This step applies to Web Server 6.0 and 6.1. If you are using Web Server 7.0, this step must be skipped.


  5. Verify the core file creation.


    # cd /var/cores
    # sleep 100000 &
    [1] PID
    # kill -8 PID
    # ls