Best of Technical Support

Our experts answer your technical questions.
Making Sense of Core Dumps

How does one read a core dump file? Occasionally, a machine will crash and a core dump file is output. When I try to read them (using the more command) they are full of meaningless characters. I have yet to find anything on how to read these files except for a debugger for debugging the programs that caused the dump—I never know which program caused the core dump. Any ideas on other avenues of determining what happened? —G. Hendricks

Using gcc and gdb

Core dump files are process states for the process that died. When a process terminates with one of various signals (such as SIGSEGV, the segment violation, typically indicating a memory-related bug in the program) and the process owner's ulimit (see your shell's man page) allows for core files, a core dump will be created. It contains information such as the entire set of memory allocated to the program, where the program was when it died and what it was doing.

A core dump is an invaluable tool to Unix programmers. By using it in conjunction with a debugger, a programmer can see what went wrong with his or her program.

To examine one of these files, you typically need two things. First, the program must be compiled and linked using gcc with the -g switch set, which instructs the compiler to place debugging information in the executable. Although any program can produce a core file, the core file can only tell a programmer the location in the program where the fault occurred and the values of certain variables if this debugging information is available.

The second tool that is required is the debugger. If you have installed the development kit, chances are you already have this. The standard Linux debugger is gdb (the GNU Debugger) and is part of the gcc development kit. A programmer might then use this command to look at a core file:

gdb programname core

Core files are typically useful only to programmers, and a debugger is not a very friendly program (gdb is certainly no exception). If you have no programming experience, you will probably not increase your knowledge of what went wrong by examining a core file in this way. —Chad Robinson, BRT Technical Services Corporation

Can't Receive Mail

I have loaded Linux and have all the settings for a full Internet connection. I can telnet to and from my computer and can send mail out. I have not been able to configure the system to receive mail. Any suggestions? —Jay Melton

Adding Sendmail to Startup Scripts

Most likely you just don't have sendmail running as a daemon. You can start up sendmail as a daemon with a command like:

sendmail -bd -q15m

If that doesn't cause any odd errors, you'll want to add that command to your startup scripts. Check to make sure /etc/rc.d/init.d/sendmail.init exists. If it does, use the run level editor to make it start in run levels 2, 3 and 5 and stop in run levels 0, 1 and 6. —Steven Pritchard, President Southern Illinois Linux Users Group

Mirroring Sites

With what package and how can you mirror your favorite software site? —Andreas J. Bathe

Perl Script Mirror

There is a Perl script appropriately called mirror that works great for mirroring ftp sites. It is available from and comes with excellent documentation. —Steven Pritchard, President Southern Illinois Linux Users Group


One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix