Friday 7 September 2007

Changing the format of the coredump file name

When any program crashes, it dumps core. File name format of the core that gets created can be controlled using sysctl.
One way is: sysctl -w "kernel.core_name_format=/coredumps/%H-%N-%P.core"
%P The Process ID (current->pid)
%U The UID of the process (current->uid)
%N The command name of the process (current->comm)
%H The nodename of the system (system_utsname.nodename)
%% A "%"
Got this from the link.

1 comment: