How to set CoreDump in SuSE 10

Hi All,
Am trying to modify the coreDump value in SuSE 10 by doing the following steps :

1. Add the line "ulimit -Sc 1004" to /etc/profile
2. Relogin using telnet and try the command "ulimit -c". The value is 1004
3. Now relogin using xbrowser the ulimit value is not reflected.

OS : SuSE 10 - 64 bit OS

The above changes works perfectly fine in Suse 9, whether i login through telnet or xbrowser.

Please help. Also lemme know what difference it makes when i login through telnet and xbrowser?

Hi All

This section will show three different examples of creating core files. All of the examples will use the application top to create core files. The examples will be as follows:

  1. Create a core file in the default pattern with an appended PID
  2. Create a core file in a designated directory
  3. Create a core file using % specifiers

Create a Core File In The Default Pattern With An Appended PID

Complete the following to take a core of the top program in the default pattern with and appended PID (logged in as root):

# ulimit -c unlimited
# echo 1 > /proc/sys/kernel/core_uses_pid
# cat /proc/sys/kernel/core_pattern
core
# top &
[1] 20992
# kill -6 20992

[1]+ Stopped top
# fg %1
top
Aborted (core dumped)
# ls core*
core.20992

Please note that the kill command uses the processes PID and the PID of the process will always be different

Create a Core File In a Designated Directory

Complete the following to take a core of the top program with the core file being saved in a specific directory (logged in as root):

# ulimit -c unlimited
# echo 1 > /proc/sys/kernel/core_uses_pid
# mkdir /corefiles
# chmod 777 /corefiles
# echo /corefiles/core > /proc/sys/kernel/core_pattern
# top &
[1] 20992
# kill -6 20123

[1]+ Stopped top
# fg %1
top
Aborted (core dumped)
# ls /corefiles/core*
core.20123

Please note that the kill command uses the processes PID and the PID of the process will always be different

Create a Core File Using % Specifiers

Complete the following to take a core of the top program using % specifiers (logged in as root):

# ulimit -c unlimited
# echo 1 > /proc/sys/kernel/core_uses_pid
# echo /corefiles/core-%e-%p-%t > /proc/sys/kernel/core_pattern
# top &
[1] 24340
# kill -6 24340

[1]+ Stopped top
# fg %1
top
Aborted (core dumped)
# ls /corefiles/core*
core-top-24340-1129845522

In this example the core file is created in the /corefiles directory. Notice the core filename includes the executable name, PID, and the time of the core. Notice also that the PID wasn't appended to the core filename. The PID is not appended if the %p specifier is used in the filename.