I am working on embedded Linux with busybox version. For generating linux core dumps, I use
ulimit -c unlimited
Then I see that I am getting a huge core file (~1GB). Because my application is huge and allocates that much amount of memory.
Now, I am looking for solutions to optimize this large core file. I found out that (http://man7.org/linux/man-pages/man5/core.5.html) I can pipe core dumps to a program. I am trying to zip the core dump while it is getting generated.
cat /proc/sys/kernel/core_pattern | /tmp/shellscript.sh /tmp/core.%p.gz cat /tmp/shellscript.sh #!/bin/sh /bin/gzip > "$1"
Now, I realize that 'piping core dump to a program' works only on normal desktop ubuntu system.
But our target is embedded linux system which use busybox version. I am wondering when I do exactly the same steps 'piping core dump to a program (in this case zipping) ' on busybox then it doesn't produce a core dump at all.
But if I remove the piping option on busybox, then I see a core dump. i.e
root@(none):~ cat /proc/sys/kernel/core_pattern /tmp/core_top
Do you guys here have any inputs why piping core dump to a program doesn't work on embedded linux with busybox version ?