myapp is an application that crashes eventually. I would like to get the core dump of those crashes...
This is the upstart script I have written to achieve this. It doesn't work yet.
description "myupstart" start on runlevel  stop on runlevel [!2534] script ulimit -c 10000 echo "/var/crash/core.%e.%s.%u.%g.%p.%t" > /proc/sys/kernel/core_pattern cd /path/to/app ./myapp end script respawn
myapp works with drop of permissions. It starts as root [of course] and then switches to another username/group. Is this a problem?
The following commands work on command line if I start the application manually, but they don't work in the upstart script:
ulimit -c 10000 echo "/var/crash/core.%e.%s.%u.%g.%p.%t" > /proc/sys/kernel/core_pattern
Why this difference?