Support Center > Search Results > SecureKnowledge Details
How to enable User Mode core dump generation on different Operating Systems Technical Level
Solution

On most Operating Systems, when a User Mode process crashes, a core dump file is not generated by default. The core dump file is necessary to understand why the process crashed.

Select the Operating System :

  • R7x Gaia OS / SecurePlatform OS 2.6
  • SecurePlatform OS 2.4
  • RedHat Enterprise Linux OS
  • IPSO OS
  • Windows OS (post-Vista)

 
Important: In R80.x, for both Gaia 2.6.18 and 3.10 the core dump generation is enabled by default and controlled by clish “show/set core-dump” commands.

R7x Gaia OS / SecurePlatform OS 2.6 

Refer to

 

  1. To enable the generation of User Mode core dump files on-the-fly:

    1. Enter Expert mode: # expert

    2. Set the size of core dump file to 'unlimited'
      # ulimit -a
      # ulimit -c unlimited
      # ulimit -a

      Note: to disable, run 'ulimit -c 0' command

    3. Make sure the following line exists and set to 1 (one) in '/etc/sysctl.conf' file

      # Controls whether core dumps will append the PID to the core filename.
      # Useful for debugging multi-threaded applications.
      kernel.core_uses_pid = 1


    4. Make sure this directory exists
      /var/log/dump/usermode

      If not, then create it
      # mkdir -p /var/log/dump/usermode


  2. To enable the generation of User Mode core dump files permanently:

    1. Enter Expert mode: # expert

    2. Enable generation of core dump files: # um_core enable

      Notes:
      • to disable, run 'um_core disable' command
      • how the 'um_core' script works :
        • the 'um_core [enable|disable]' script creates/removes a file '/etc/sysconfig/enable_cores'
        • script called '/etc/initscript' runs 'ulimit -c unlimited' command, if '/etc/sysconfig/enable_cores' exists


    3. Make sure the following line exists and set to 1 (one) in '/etc/sysctl.conf' file

      # Controls whether core dumps will append the PID to the core filename.
      # Useful for debugging multi-threaded applications.
      kernel.core_uses_pid = 1


    4. Make sure this directory exists: /var/log/dump/usermode

      If not, then create it
      # mkdir -p /var/log/dump/usermode

    5. # reboot


  3. Core dump files should be located here
    /var/log/dump/usermode/ProcessName.PID.core



SecurePlatform OS 2.4

Refer to

  1. To enable the generation of User Mode core dump files on-the-fly :

    1. Enter Expert mode: # expert

    2. Set the size of core dump file to 'unlimited'
      # ulimit -a
      # ulimit -c unlimited
      # ulimit -a

      Note: to disable, run 'ulimit -c 0' command

    3. Make sure the following line exists and set to 1 (one) in '/etc/sysctl.conf' file

      # Controls whether core dumps will append the PID to the core filename.
      # Useful for debugging multi-threaded applications.
      kernel.core_uses_pid = 1


    4. Verify that the proper level of the dump is set for LKCD utility
      # less -N -M /etc/sysconfig/dump

      Go to the bottom of the file - the parameters and their values should be as follows
      (if other numbers appear, then edit this file in Vi editor)

      DUMP_ACTIVE=1
      DUMPDEV=/dev/vmdump
      DUMPDIR=/var/log/dump
      DUMP_SAVE=1
      DUMP_LEVEL=8
      DUMP_FLAGS=0
      DUMP_COMPRESS=0
      PANIC_TIMEOUT=5


    5. Save the configuration for LKCD utility: # /sbin/lkcd config

    6. Make sure this directory exists
      /var/log/dump/usermode

      If not, then create it
      # mkdir -p /var/log/dump/usermode


  2. To enable the generation of User Mode core dump files permanently:

    1. Enter Expert mode: # expert

    2. Set the size of core dump file to 'unlimited'
      # echo 'ulimit -c unlimited' >> /etc/rc.local

      Another way, is to add 'ulimit -c unlimited' line to '/etc/rc.d/init.d/cpboot' script
      • after the line with '/opt/CPshrd-RXX/tmp/.CPprofile.sh'
      • and before the line with 'case $1 in'

      Note: to disable, use 'ulimit -c 0' command

    3. Make sure the following line exists and set to 1 (one) in '/etc/sysctl.conf' file

      # Controls whether core dumps will append the PID to the core filename.
      # Useful for debugging multi-threaded applications.
      kernel.core_uses_pid = 1


    4. Verify that the proper level of the dump is set for LKCD utility
      # less -N -M /etc/sysconfig/dump

      Go to the bottom of the file - the parameters and their values should be as follows
      (if other numbers appear, then edit this file in Vi editor)

      DUMP_ACTIVE=1
      DUMPDEV=/dev/vmdump
      DUMPDIR=/var/log/dump
      DUMP_SAVE=1
      DUMP_LEVEL=8
      DUMP_FLAGS=0
      DUMP_COMPRESS=0
      PANIC_TIMEOUT=5


    5. Save the configuration for LKCD utility
      # /sbin/lkcd config

    6. Make sure this directory exists
      /var/log/dump/usermode

      If not, then create it
      # mkdir -p /var/log/dump/usermode

    7. # reboot


  3. Core dump files should be located here
    /var/log/dump/usermode/ProcessName.PID.core



RedHat Enterprise Linux OS

Refer to sk77080 - How to use GDB to get function stack from User Mode process

  1. To enable the generation of User Mode core dump files on-the-fly :
    # ulimit -a
    # ulimit -c unlimited
    # ulimit -a

    Note: to disable, run 'ulimit -c 0' command

  2. To enable the generation of User Mode core dump files permanently :
    # echo 'ulimit -c unlimited' >> /etc/rc.local
    # reboot

    Note: to disable, use 'ulimit -c 0' command

  3. Make sure this directory exists
    /var/log/dump/usermode

    If not, then create it
    # mkdir -p /var/log/dump/usermode

  4. Core dump files should be located here
    /var/log/dump/usermode/ProcessName.PID.core



IPSO OS

Refer to the following articles:



Windows OS (post-Vista)

Refer to the following articles :



This solution is about products that are no longer supported and it will not be updated
Applies To:
  • Run cpstat os from expert mode to determine OS base.

Give us Feedback
Please rate this document
[1=Worst,5=Best]
Comment