Sponsored Content
Special Forums Cybersecurity How to set CoreDump in SuSE 10 Post 302255641 by kumarcbs on Thursday 6th of November 2008 09:47:27 PM
Old 11-06-2008
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.
 

5 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

SuSE 8.0...I can't get SaX2 to start on Hercules 128 and YaST2 won't set up X either.

I'm trying to set up a school Linux computer and use Samba to link it to Windows NT. Pentium-133 Hercules 8 meg Stingray 128/3D I'm not too familiar with SuSE's config tools (more used to Mandrake) and so am having some trouble configuring X. SaX2 just won't start, even when I use "sax2... (1 Reply)
Discussion started by: HumanBeanDip
1 Replies

2. Solaris

Set Up Coredump's

I am trying to set up coredumps on a server, I have enabled the coreadm, and have also set a path to whre the coredumps will go. I now need to set the ulimit , as this is set to 0. I made the change: ulimit -c 8192 but when I logged out and back in, it was set back to 0 again. I need to know... (1 Reply)
Discussion started by: mzyvn6
1 Replies

3. SuSE

PhPMyAdmin basic set up on SUSE linux 9.1

Hey, I was wondering if anybody could help me setup my PhpMyAdmin on my SUSE linux 9.1 machine. I want to use it to access MySQL server instead of the defualt MySQLCC-Console Manager. I have not tried yet but i have done a such and it's installed in one of the folders. I would like to point... (15 Replies)
Discussion started by: sybella1
15 Replies

4. UNIX for Dummies Questions & Answers

1st install Suse, network config set up

Hello, I'm a newbie to unix. I just about have the Suse 10.1 installed. During set up it automatically detected components to access the internet. But failed. I lost now. Any ideas? Thank You (2 Replies)
Discussion started by: Nick7269
2 Replies

5. Shell Programming and Scripting

How to set up Telnet on Suse?

I am trying to use telnet to access a linux box. I know I should be using SSH (which I use personally), but i have to use telnet. How do I configure the linux box to accept the telnet request. I am using Suse Thanks for any help (11 Replies)
Discussion started by: salil2012
11 Replies
CRASHINFO(8)						    BSD System Manager's Manual 					      CRASHINFO(8)

NAME
crashinfo -- analyze a core dump of the operating system SYNOPSIS
crashinfo [-d crashdir] [-n dumpnr] [-k kernel] [core] DESCRIPTION
The crashinfo utility analyzes a core dump saved by savecore(8). It generates a text file containing the analysis in the same directory as the core dump. For a given core dump file named vmcore.XX the generated text file will be named core.txt.XX. By default, crashinfo analyzes the most recent core dump in the core dump directory. A specific core dump may be specified via either the core or dumpnr arguments. Once crashinfo has located a core dump, it analyzes the core dump to determine the exact version of the kernel that generated the core. It then looks for a matching kernel file under each of the subdirectories in /boot. The location of the kernel file can also be explicitly provided via the kernel argument. Once crashinfo has located a core dump and kernel, it uses several utilities to analyze the core including dmesg(8), fstat(1), iostat(8), ipcs(1), kgdb(1), netstat(1), nfsstat(1), ps(1), pstat(8), and vmstat(8). The options are as follows: -d crashdir Specify an alternate core dump directory. The default crash dump directory is /var/crash. -n dumpnr Use the core dump saved in vmcore.dumpnr instead of the latest core in the core dump directory. -k kernel Specify an explicit kernel file. SEE ALSO
textdump(4), savecore(8) HISTORY
The crashinfo utility appeared in FreeBSD 6.4. BSD
June 28, 2008 BSD
All times are GMT -4. The time now is 10:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy