1 <?xml version='
1.0'
?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
6 SPDX-License-Identifier: LGPL-2.1+
8 Copyright 2012 Zbigniew Jędrzejewski-Szmek
11 <refentry id=
"coredumpctl" conditional='ENABLE_COREDUMP'
12 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
15 <title>coredumpctl
</title>
16 <productname>systemd
</productname>
20 <contrib>Developer
</contrib>
21 <firstname>Zbigniew
</firstname>
22 <surname>Jędrzejewski-Szmek
</surname>
23 <email>zbyszek@in.waw.pl
</email>
29 <refentrytitle>coredumpctl
</refentrytitle>
30 <manvolnum>1</manvolnum>
34 <refname>coredumpctl
</refname>
35 <refpurpose>Retrieve and process saved core dumps and metadata
</refpurpose>
40 <command>coredumpctl
</command>
41 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
42 <arg choice=
"req">COMMAND
</arg>
43 <arg choice=
"opt" rep=
"repeat">PID|COMM|EXE|MATCH
</arg>
48 <title>Description
</title>
50 <para><command>coredumpctl
</command> is a tool that can be used to retrieve and process core
51 dumps and metadata which were saved by
52 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
57 <title>Options
</title>
59 <para>The following options are understood:
</para>
63 <xi:include href=
"standard-options.xml" xpointer=
"help" />
64 <xi:include href=
"standard-options.xml" xpointer=
"version" />
67 <term><option>--no-legend
</option></term>
69 <listitem><para>Do not print column headers.
</para></listitem>
72 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
75 <term><option>-
1</option></term>
77 <listitem><para>Show information of a single core dump only, instead of listing
78 all known core dumps.
</para></listitem>
82 <term><option>-S
</option></term>
83 <term><option>--since
</option></term>
85 <listitem><para>Only print entries which are since the specified date.
</para></listitem>
89 <term><option>-U
</option></term>
90 <term><option>--until
</option></term>
92 <listitem><para>Only print entries which are until the specified date.
</para></listitem>
96 <term><option>-r
</option></term>
97 <term><option>--reverse
</option></term>
99 <listitem><para>Reverse output so that the newest entries are displayed first.
104 <term><option>-F
</option> <replaceable>FIELD
</replaceable></term>
105 <term><option>--field=
</option><replaceable>FIELD
</replaceable></term>
107 <listitem><para>Print all possible data values the specified
108 field takes in matching core dump entries of the
109 journal.
</para></listitem>
113 <term><option>-o
</option> <replaceable>FILE
</replaceable></term>
114 <term><option>--output=
</option><replaceable>FILE
</replaceable></term>
116 <listitem><para>Write the core to
<option>FILE
</option>.
121 <term><option>--debugger=
</option><replaceable>DEBUGGER
</replaceable></term>
123 <listitem><para>Use the given debugger for the
<command>debug
</command>
124 command. If not given and
<varname>$SYSTEMD_DEBUGGER
</varname> is unset, then
125 <citerefentry><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
126 will be used.
</para></listitem>
130 <term><option>-D
</option> <replaceable>DIR
</replaceable></term>
131 <term><option>--directory=
</option><replaceable>DIR
</replaceable></term>
133 <listitem><para>Use the journal files in the specified
<option>DIR
</option>.
138 <term><option>-q
</option></term>
139 <term><option>--quiet
</option></term>
141 <listitem><para>Suppresses informational messages about lack
142 of access to journal files and possible in-flight coredumps.
149 <title>Commands
</title>
151 <para>The following commands are understood:
</para>
155 <term><command>list
</command></term>
157 <listitem><para>List core dumps captured in the journal
158 matching specified characteristics. If no command is
159 specified, this is the implied default.
</para>
161 <para>The output is designed to be human readable and contains list contains
162 a table with the following columns:
</para>
166 <listitem><para>The timestamp of the crash, as reported by the kernel.
</para>
172 <listitem><para>The identifier of the process that crashed.
</para>
179 <listitem><para>The user and group identifiers of the process that crashed.
</para>
185 <listitem><para>The signal that caused the process to crash, when applicable.
190 <term>COREFILE
</term>
191 <listitem><para>Information whether the coredump was stored, and whether
192 it is still accessible:
<literal>none
</literal> means the core was
193 not stored,
<literal>-
</literal> means that it was not available (for
194 example because the process was not terminated by a signal),
195 <literal>present
</literal> means that the core file is accessible by the
196 current user,
<literal>journal
</literal> means that the core was stored
197 in the
<literal>journal
</literal>,
<literal>truncated
</literal> is the
198 same as one of the previous two, but the core was too large and was not
199 stored in its entirety,
<literal>error
</literal> means that the core file
200 cannot be accessed, most likely because of insufficient permissions, and
201 <literal>missing
</literal> means that the core was stored in a file, but
202 this file has since been removed.
</para></listitem>
207 <listitem><para>The full path to the executable. For backtraces of scripts
208 this is the name of the interpreter.
</para></listitem>
212 <para>It's worth noting that different restrictions apply to
213 data saved in the journal and core dump files saved in
214 <filename>/var/lib/systemd/coredump
</filename>, see overview in
215 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
216 Thus it may very well happen that a particular core dump is still listed
217 in the journal while its corresponding core dump file has already been
218 removed.
</para></listitem>
222 <term><command>info
</command></term>
224 <listitem><para>Show detailed information about core dumps
225 captured in the journal.
</para></listitem>
229 <term><command>dump
</command></term>
231 <listitem><para>Extract the last core dump matching specified
232 characteristics. The core dump will be written on standard
233 output, unless an output file is specified with
234 <option>--output=
</option>.
</para></listitem>
238 <term><command>debug
</command></term>
240 <listitem><para>Invoke a debugger on the last core dump
241 matching specified characteristics. By default,
242 <citerefentry><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
243 will be used. This may be changed using the
<option>--debugger=
</option>
244 option or the
<varname>$SYSTEMD_DEBUGGER
</varname> environment
245 variable.
</para></listitem>
253 <title>Matching
</title>
255 <para>A match can be:
</para>
259 <term><replaceable>PID
</replaceable></term>
261 <listitem><para>Process ID of the
263 core. An integer.
</para></listitem>
267 <term><replaceable>COMM
</replaceable></term>
269 <listitem><para>Name of the executable (matches
270 <option>COREDUMP_COMM=
</option>). Must not contain slashes.
275 <term><replaceable>EXE
</replaceable></term>
277 <listitem><para>Path to the executable (matches
278 <option>COREDUMP_EXE=
</option>). Must contain at least one
279 slash.
</para></listitem>
283 <term><replaceable>MATCH
</replaceable></term>
285 <listitem><para>General journalctl predicate (see
286 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
287 Must contain an equals sign (
<literal>=
</literal>).
</para></listitem>
293 <title>Exit status
</title>
294 <para>On success,
0 is returned; otherwise, a non-zero failure
295 code is returned. Not finding any matching core dumps is treated as
301 <title>Environment
</title>
303 <variablelist class='environment-variables'
>
305 <term><varname>$SYSTEMD_DEBUGGER
</varname></term>
306 <listitem><para>Use the given debugger for the
<command>debug
</command>
307 command. See the
<option>--debugger=
</option> option.
</para></listitem>
313 <title>Examples
</title>
316 <title>List all the core dumps of a program named foo
</title>
318 <programlisting># coredumpctl list foo
</programlisting>
322 <title>Invoke gdb on the last core dump
</title>
324 <programlisting># coredumpctl debug
</programlisting>
328 <title>Show information about a process that dumped core,
329 matching by its PID
6654</title>
331 <programlisting># coredumpctl info
6654</programlisting>
335 <title>Extract the last core dump of /usr/bin/bar to a file named
336 <filename noindex=
"true">bar.coredump
</filename></title>
338 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar
</programlisting>
343 <title>See Also
</title>
345 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
346 <citerefentry><refentrytitle>coredump.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
347 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
348 <citerefentry project='man-pages'
><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>