Debugging a core dump
If a program crashes with a core dump then, it is easy to debug and find the last internal state of the program. When we run multiple programs or threads, then it is difficult to find which core was generated by which process. To resolve this, there are a few settings available in /proc, which will help us to add more detail in the core file name.
Support available from Kernel v2.4. Setting '1' to this file, will generate a core file with PID. For example: core.1234
Support available from Kernel v2.5. This file provides more control to form the core file name.
This is very similar to setting the core_uses_pid option.
echo "core.%p" > /proc/sys/kernel/core_pattern
By setting this value, core file will be generated with the following details: executable filename, PID of the dumped process and number of the signal causing the dump.
echo "core.%e.%p.%s" > /proc/sys/kernel/core_pattern
More useful options are explained in the proc man page.
This Tech Tip was brought to us by Bharathi in Chennai, India. Thanks, Bharathi!
Instant fame is easy at Linux Journal. Just send us your useful Tech Tips to share with the Linux Community, and we'll send you a cool t-shirt for your efforts!
Please note: Tech Tips featured in this specific section of LinuxJournal.com are kindly brought to us by readers and are not necessarily tested by LinuxJournal.com editors.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Sony Settles in Linux Battle
- Libarchive Security Flaw Discovered
- Profiles and RC Files
- Peppermint 7 Released
- Maru OS Brings Debian to Your Phone
- The Giant Zero, Part 0.x
- Snappy Moves to New Platforms
- Astronomy for KDE
- Git 2.9 Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide