Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dumping only stack trace in linux core dumps

Is there a way to create minidumps for process crash [like in windows] in linux. The usual core dumps are large in size but I wish to get only the stack trace dumped. Is it possible to dump only the stack trace?

I'm guessing setting the ulimit value to the maximum size wouldn't help me since I don't care about the size, I just don't need a full memory dump.

Also, I read about Google Breakpad but Breakpad would make me have to delve into the code to set it up. I don't wish to modify the code.

like image 411
user2779853 Avatar asked Aug 17 '26 00:08

user2779853


1 Answers

You can set /proc/$PID/coredump_filter to 0x10.

See http://man7.org/linux/man-pages/man5/core.5.html

like image 139
kursancew Avatar answered Aug 18 '26 16:08

kursancew