1

I want to change naming of core dumps for a separate process and its childs or, if it is impossible, for all processes of a separate user.

NOTE: I know that it is possible to change the naming for all users overwriting /proc/sys/kernel/core_pattern file.

4

As you know, /proc/sys/kernel/core_pattern is system-global, and Linux-specific (not portable).

I don't think there's a facility to customize core dump filenames on a per-process or per-uid basis, but you might be able to to achieve what you want by sending core dumps to a handler program instead of directly to a file. By doing something like this:

echo "|usr/local/bin/my_core_dump_handler" >/proc/sys/kernel/core_pattern

my_core_dump_handler will be executed each time a core dump occurs. It can read the actual core dump on its standard input and write it to a customized filename of its choosing.

BTW: Your question talks about /proc/sys/kernel/core_name_format. I am assuming you mean /proc/sys/kernel/core_pattern because the former doesn't exist for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.