0

How make linux core dumping for every process not only for deaemons?

Thanks!

2 Answers 2

2

There is no difference between daemons and normal programs in the core dumping behavior. You just need to change the core limit: ulimit -c unlimited Make sure it is set unlimited with ulimit -c. To check if you have the right to change the core limit, run: ulimit -Hc.

To keep the core dump configuration for an user either change /etc/security/limits.conf or add into .bash_profile of the user: ulimit -c unlimited.

/etc/security/limits.conf allows you to change the limits for all users. This file is read by pam library when the users login on services that uses pam (login, ssh, pop3, etc.). The format of the file is documented in man -S5 limits.conf.

# Users that are members of coredump group have the core dump limit removed.
@coredump               soft    core            unlimited
# user joe can dump a core of maximum 100MB
#joe                    soft    core            102400
6
  • Sorry this is not true based on my knowledge and stackoverflow.com/questions/8789214/…
    – Svisstack
    Jan 9, 2012 at 15:34
  • Which part is not true? Jan 9, 2012 at 16:27
  • core dump is generated only for daemon proceses
    – Svisstack
    Jan 10, 2012 at 14:17
  • Here is a core dump for sleep: ulimit -c unlimited;/bin/sleep 100&kill -SIGSEGV %%;file core Jan 10, 2012 at 23:21
  • It is correct. The only difference between a daemon and a normal process is that daemons detach themselves from the terminal when started.
    – hookenz
    Jan 18, 2012 at 2:17
1

default action for SIGQUIT is to generate core image. Thus just kill -3 the process of interest.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .