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 This file is part of systemd.
10 Copyright 2012 Zbigniew Jędrzejewski-Szmek
13 <refentry id=
"coredumpctl" conditional='ENABLE_COREDUMP'
14 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
17 <title>coredumpctl
</title>
18 <productname>systemd
</productname>
22 <contrib>Developer
</contrib>
23 <firstname>Zbigniew
</firstname>
24 <surname>Jędrzejewski-Szmek
</surname>
25 <email>zbyszek@in.waw.pl
</email>
31 <refentrytitle>coredumpctl
</refentrytitle>
32 <manvolnum>1</manvolnum>
36 <refname>coredumpctl
</refname>
37 <refpurpose>Retrieve and process saved core dumps and metadata
</refpurpose>
42 <command>coredumpctl
</command>
43 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
44 <arg choice=
"req">COMMAND
</arg>
45 <arg choice=
"opt" rep=
"repeat">PID|COMM|EXE|MATCH
</arg>
50 <title>Description
</title>
52 <para><command>coredumpctl
</command> is a tool that can be used to retrieve and process core
53 dumps and metadata which were saved by
54 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
59 <title>Options
</title>
61 <para>The following options are understood:
</para>
65 <xi:include href=
"standard-options.xml" xpointer=
"help" />
66 <xi:include href=
"standard-options.xml" xpointer=
"version" />
69 <term><option>--no-legend
</option></term>
71 <listitem><para>Do not print column headers.
</para></listitem>
74 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
77 <term><option>-
1</option></term>
79 <listitem><para>Show information of a single core dump only, instead of listing
80 all known core dumps.
</para></listitem>
84 <term><option>-S
</option></term>
85 <term><option>--since
</option></term>
87 <listitem><para>Only print entries which are since the specified date.
</para></listitem>
91 <term><option>-U
</option></term>
92 <term><option>--until
</option></term>
94 <listitem><para>Only print entries which are until the specified date.
</para></listitem>
98 <term><option>-r
</option></term>
99 <term><option>--reverse
</option></term>
101 <listitem><para>Reverse output so that the newest entries are displayed first.
106 <term><option>-F
</option> <replaceable>FIELD
</replaceable></term>
107 <term><option>--field=
</option><replaceable>FIELD
</replaceable></term>
109 <listitem><para>Print all possible data values the specified
110 field takes in matching core dump entries of the
111 journal.
</para></listitem>
115 <term><option>-o
</option> <replaceable>FILE
</replaceable></term>
116 <term><option>--output=
</option><replaceable>FILE
</replaceable></term>
118 <listitem><para>Write the core to
<option>FILE
</option>.
123 <term><option>--debugger=
</option><replaceable>DEBUGGER
</replaceable></term>
125 <listitem><para>Use the given debugger for the
<command>debug
</command>
126 command. If not given and
<varname>$SYSTEMD_DEBUGGER
</varname> is unset, then
127 <citerefentry><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
128 will be used.
</para></listitem>
132 <term><option>-D
</option> <replaceable>DIR
</replaceable></term>
133 <term><option>--directory=
</option><replaceable>DIR
</replaceable></term>
135 <listitem><para>Use the journal files in the specified
<option>DIR
</option>.
140 <term><option>-q
</option></term>
141 <term><option>--quiet
</option></term>
143 <listitem><para>Suppresses informational messages about lack
144 of access to journal files and possible in-flight coredumps.
151 <title>Commands
</title>
153 <para>The following commands are understood:
</para>
157 <term><command>list
</command></term>
159 <listitem><para>List core dumps captured in the journal
160 matching specified characteristics. If no command is
161 specified, this is the implied default.
</para>
163 <para>The output is designed to be human readable and contains list contains
164 a table with the following columns:
</para>
168 <listitem><para>The timestamp of the crash, as reported by the kernel.
</para>
174 <listitem><para>The identifier of the process that crashed.
</para>
181 <listitem><para>The user and group identifiers of the process that crashed.
</para>
187 <listitem><para>The signal that caused the process to crash, when applicable.
192 <term>COREFILE
</term>
193 <listitem><para>Information whether the coredump was stored, and whether
194 it is still accessible:
<literal>none
</literal> means the core was
195 not stored,
<literal>-
</literal> means that it was not available (for
196 example because the process was not terminated by a signal),
197 <literal>present
</literal> means that the core file is accessible by the
198 current user,
<literal>journal
</literal> means that the core was stored
199 in the
<literal>journal
</literal>,
<literal>truncated
</literal> is the
200 same as one of the previous two, but the core was too large and was not
201 stored in its entirety,
<literal>error
</literal> means that the core file
202 cannot be accessed, most likely because of insufficient permissions, and
203 <literal>missing
</literal> means that the core was stored in a file, but
204 this file has since been removed.
</para></listitem>
209 <listitem><para>The full path to the executable. For backtraces of scripts
210 this is the name of the interpreter.
</para></listitem>
214 <para>It's worth noting that different restrictions apply to
215 data saved in the journal and core dump files saved in
216 <filename>/var/lib/systemd/coredump
</filename>, see overview in
217 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
218 Thus it may very well happen that a particular core dump is still listed
219 in the journal while its corresponding core dump file has already been
220 removed.
</para></listitem>
224 <term><command>info
</command></term>
226 <listitem><para>Show detailed information about core dumps
227 captured in the journal.
</para></listitem>
231 <term><command>dump
</command></term>
233 <listitem><para>Extract the last core dump matching specified
234 characteristics. The core dump will be written on standard
235 output, unless an output file is specified with
236 <option>--output=
</option>.
</para></listitem>
240 <term><command>debug
</command></term>
242 <listitem><para>Invoke a debugger on the last core dump
243 matching specified characteristics. By default,
244 <citerefentry><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
245 will be used. This may be changed using the
<option>--debugger=
</option>
246 option or the
<varname>$SYSTEMD_DEBUGGER
</varname> environment
247 variable.
</para></listitem>
255 <title>Matching
</title>
257 <para>A match can be:
</para>
261 <term><replaceable>PID
</replaceable></term>
263 <listitem><para>Process ID of the
265 core. An integer.
</para></listitem>
269 <term><replaceable>COMM
</replaceable></term>
271 <listitem><para>Name of the executable (matches
272 <option>COREDUMP_COMM=
</option>). Must not contain slashes.
277 <term><replaceable>EXE
</replaceable></term>
279 <listitem><para>Path to the executable (matches
280 <option>COREDUMP_EXE=
</option>). Must contain at least one
281 slash.
</para></listitem>
285 <term><replaceable>MATCH
</replaceable></term>
287 <listitem><para>General journalctl predicate (see
288 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
289 Must contain an equals sign (
<literal>=
</literal>).
</para></listitem>
295 <title>Exit status
</title>
296 <para>On success,
0 is returned; otherwise, a non-zero failure
297 code is returned. Not finding any matching core dumps is treated as
303 <title>Examples
</title>
306 <title>List all the core dumps of a program named foo
</title>
308 <programlisting># coredumpctl list foo
</programlisting>
312 <title>Invoke gdb on the last core dump
</title>
314 <programlisting># coredumpctl debug
</programlisting>
318 <title>Show information about a process that dumped core,
319 matching by its PID
6654</title>
321 <programlisting># coredumpctl info
6654</programlisting>
325 <title>Extract the last core dump of /usr/bin/bar to a file named
326 <filename noindex=
"true">bar.coredump
</filename></title>
328 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar
</programlisting>
333 <title>See Also
</title>
335 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
336 <citerefentry><refentrytitle>coredump.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
337 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
338 <citerefentry project='man-pages'
><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>