Support Center > Search Results > SecureKnowledge Details
Enabling the generation of User Mode core dump files on SecurePlatform OS
Solution

Note: This procedure is a simple change in Linux configuration, which has no impact on performance.

 

Procedure

  • Show / Hide instructions for SecurePlatform OS 2.6 - (R70 and above)

    • Enabling the generation of User Mode core dump files on-the-fly

      Show / Hide instructions

      1. Log in to Expert mode:

        # expert

      2. Set the size of core dump file to 'unlimited':

        [Expert@HostName]# ulimit -a
        [Expert@HostName]# ulimit -c unlimited
        [Expert@HostName]# 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 the following directory exists:

        /var/log/dump/usermode

        If it does not exist, then create it:
        [Expert@HostName]# mkdir -p /var/log/dump/usermode


    • Enabling the generation of User Mode core dump files permanently

      Show / Hide instructions

      1. Log in to Expert mode:

        # expert

      2. Enable generation of core dump files:

        [Expert@HostName]# um_core enable

        Notes:

        • To disable, run 'um_core disable' command

        • The 'um_core' script works in the following way:

          1. The 'um_core [enable|disable]' command creates/removes a file '/etc/sysconfig/enable_cores'

          2. If the '/etc/sysconfig/enable_cores' file exists, then the '/etc/initscript' start-up script runs the 'ulimit -c unlimited' 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 the following directory exists:

        /var/log/dump/usermode

        If it does not exist, then create it:
        [Expert@HostName]# mkdir -p /var/log/dump/usermode

      5. Reboot the machine:

        [Expert@HostName]# reboot


    • Core dump files should be located here:

      /var/log/dump/usermode/ProcessName.PID.core


  • Show / Hide instructions for SecurePlatform OS 2.4 - (R55 / R60 / R61 / R62 / R65)

    • Enabling the generation of User Mode core dump files on-the-fly

      Show / Hide instructions

      1. Log in to Expert mode:

        # expert

      2. Set the size of core dump file to 'unlimited':

        [Expert@HostName]# ulimit -a
        [Expert@HostName]# ulimit -c unlimited
        [Expert@HostName]# 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:

        [Expert@HostName]# 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:

        [Expert@HostName]# /sbin/lkcd config

      6. Make sure the following directory exists:

        /var/log/dump/usermode

        If it does not exist, then create it:
        [Expert@HostName]# mkdir -p /var/log/dump/usermode


    • Enabling the generation of User Mode core dump files permanently

      Show / Hide instructions

      1. Log in to Expert mode:

        # expert

      2. Set the size of core dump file to 'unlimited':

        1. Edit the /etc/rc.d/rc.local script in Vi editor:

          [Expert@HostName]# vi /etc/rc.d/rc.local

        2. Add the following line at the bottom:

          ulimit -c unlimited

        3. Save the changes and exit from Vi editor.

        Another way is to add the 'ulimit -c unlimited' line to the /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:

        [Expert@HostName]# 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:

        [Expert@HostName]# /sbin/lkcd config

      6. Make sure the following directory exists:

        /var/log/dump/usermode

        If it does not exist, then create it:
        [Expert@HostName]# mkdir -p /var/log/dump/usermode

      7. Reboot the machine:

        [Expert@HostName]# reboot


    • Core dump files should be located here:

      /var/log/dump/usermode/ProcessName.PID.core

 

Related solutions

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