Setting minidump file name

14 views
Skip to first unread message

Manav Soneja

unread,
Jul 6, 2023, 12:34:28 AM7/6/23
to Google Breakpad Discuss
Hi Team,
How can we set the minidump file name based on the process id, timestamp, signal of the crashed process ?

Thanks,
Manav Soneja

Marc Gonzalez

unread,
Jul 6, 2023, 9:57:43 AM7/6/23
to Manav Soneja, google-brea...@googlegroups.com
On 06/07/2023 06:30, Manav Soneja wrote:

> How can we set the minidump file name based on the
> process id, timestamp, signal of the crashed process ?

On Linux, relevant documentation is:

https://man7.org/linux/man-pages/man5/core.5.html

Have a look at %P %t %s

Naming of core dump files

By default, a core dump file is named core, but the
/proc/sys/kernel/core_pattern file (since Linux 2.6 and 2.4.21)
can be set to define a template that is used to name core dump
files. The template can contain % specifiers which are
substituted by the following values when a core file is created:

%% A single % character.
%c Core file size soft resource limit of crashing process
(since Linux 2.6.24).
%d Dump mode—same as value returned by prctl(2)
PR_GET_DUMPABLE (since Linux 3.7).
%e The process or thread's comm value, which typically is
the same as the executable filename (without path prefix,
and truncated to a maximum of 15 characters), but may
have been modified to be something different; see the
discussion of /proc/pid/comm and /proc/pid/task/tid/comm
in proc(5).
%E Pathname of executable, with slashes ('/') replaced by
exclamation marks ('!') (since Linux 3.0).
%g Numeric real GID of dumped process.
%h Hostname (same as nodename returned by uname(2)).
%i TID of thread that triggered core dump, as seen in the
PID namespace in which the thread resides (since Linux
3.18).
%I TID of thread that triggered core dump, as seen in the
initial PID namespace (since Linux 3.18).
%p PID of dumped process, as seen in the PID namespace in
which the process resides.
%P PID of dumped process, as seen in the initial PID
namespace (since Linux 3.12).
%s Number of signal causing dump.
%t Time of dump, expressed as seconds since the Epoch,
1970-01-01 00:00:00 +0000 (UTC).
%u Numeric real UID of dumped process.


Regards.


Marc Gonzalez

unread,
Jul 6, 2023, 9:57:43 AM7/6/23
to google-brea...@googlegroups.com, Manav Soneja
On 06/07/2023 06:30, Manav Soneja wrote:

> How can we set the minidump file name based on the process id, timestamp, signal of the crashed process ?

What OS are you using?

Which tool are you using to produce the minidump?

Regards.


Reply all
Reply to author
Forward
0 new messages