C
C
caution2016-04-14 18:54:40
linux
caution, 2016-04-14 18:54:40

How to properly catch a core dump?

In ubuntu, the application periodically falls off on the deploy server, it was advised to do the following to catch the core dump:

ulimit -c unlimited
echo 'core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern

and restart the desired application.
But I can't understand if I go to the server through ssh and do all these actions and log out:
1) will it be - ulimit -c unlimited active for the next session, and will it work at all?
2) where should I look for this core. file

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DuD, 2016-04-14
@DuD

ulimit will be for your session only.

J
jcmvbkbc, 2016-04-14
@jcmvbkbc

1) will this - ulimit -c unlimited be active for the next session, and will it work at all?

No. To set the default ulimit -- see man limits.conf
Depends on /proc/sys/kernel/core_pattern, for your example, in the current directory of the crashed process. In general, core_pattern is just a path to a file with the possibility of substituting some process parameters through %*.
See man core .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question