when I Quit a running command with Cntrl + \  it shows \Quit (core dumped) and it may create a core file containing the memory image of the program. But where do I find that file?
            Asked
            
        
        
            Active
            
        
            Viewed 1,154 times
        
    -2
            
            
         
    
    
        mohammed wazeem
        
- 1,310
- 1
- 10
- 26
- 
                    1I'm voting to close this question as off-topic because questions about Unix and Linux operating systems should, instead be asked on https://unix.stackexchange.com/ – Rob Sep 01 '19 at 18:05
1 Answers
1
            When a process dumps core, the process configured in /proc/sys/kernel/core_pattern is executed, from this stackoverflow question.
If your init process is systemd, you should find such content of /proc/sys/kernel/core_pattern file:
|/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e
From systemd-coredump we can read that:
By default, systemd-coredump will log the core dump including a backtrace if possible to the journal and store the core dump itself in an external file in /var/lib/systemd/coredump.
The core dump should be accessible in your system journal and in the /var/lib/systemd/coredump directory by default.
Example of coredump after sending SIGQUIT signal to sleep infinity on my system:
$ journalctl COREDUMP_SIGNAL_NAME=SIGQUIT
-- Logs begin at Sun 2019-05-19 10:51:52 CEST, end at Sun 2019-09-01 18:14:43 CEST. --
wrz 01 18:03:32 chors systemd-coredump[24169]: Process 24167 (sleep) of user 1000 dumped core.
                                               Stack trace of thread 24167:
                                               #0  0x00007fd96c53c338 __nanosleep (libc.so.6)
                                               #1  0x000055fb279394a5 n/a (sleep)
                                               #2  0x000055fb279392a1 n/a (sleep)
                                               #3  0x000055fb27936221 n/a (sleep)
                                               #4  0x00007fd96c499ee3 __libc_start_main (libc.so.6)
                                               #5  0x000055fb279362fe n/a (sleep)
More output is available when using different output options with journalctl.
 
    
    
        KamilCuk
        
- 120,984
- 8
- 59
- 111