On Wed, 15 Dec 2004, David Harel wrote:

> Greetings,
>
> A long time ago, On BSD SunOS I could debug core files.
> On Linux I don't even get core files.
>
>  1. Can I get core files on Linux and how?
>  2. Can I debug core files and how?

A. there is no "BSD SunOS". there is "BSD", and there is "SunOS". i assume
you're refering to SunOS

B. you can do that on linux (as well as on any kind of Unix-derivative i
am aware of).

C. because code files can become very large (with applicatoins taking
several 10s of MB of virtual memory), and litter the file-system, most
login shells are configured to avoid creating core files.

D. assuming you are using 'bash', use the following command in the shell
in which you are launching the process, for which you wish to have a core
dump in case of a crash:  ulimit -c unlimited (check with 'ulimit -a' to
see the list of limits before and after the change).

E. if you want this to take effect in general, you should alter your
system's bash startup files, such as /etc/profile, look for the line that
sets the core-file limit to 0 (something _similar_ to ulimit -S -c 0) and
disable it (or change the '0' to 'unlimited').

F. various system service startup scripts explicitly disable core-file
generation before running the process they manage. to have _them_ generate
core-files, you'll need to change the way they are launched. this is
sometimes (e.g. on redhat 7.X systems) burried deep inside shell functions
stored in files which get sourced by the service's script.

-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to