Force a core to dump from an active, normally running program on FreeBSD

纵饮孤独 提交于 2019-12-03 09:29:50

kill -QUIT process_id will cause a core dump from a running process (assuming that resource limits allow it).

Or see man 3 abort for causing a program to dump itself.

Added: From an interactive shell, a running program can be made to abort with the quit key, usually Ctrl+\, which sends a SIGQUIT just as the more common Ctrl+C sends a SIGINT. This is identical to the kill -QUIT… it's just easier to type if you are on the controlling terminal. See man 1 stty if your default quit key is different.

This helped me! kill -11 always works for me. 11 is SIGSEGV (invalid memory reference)

You might also want to take a look at gcore(1) (http://man.freebsd.org/gcore).

Marvin

On sles12.. Below code worked for me :

kill -11

The previous suggestions did not do anything.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!