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" [
4 <!ENTITY % entities SYSTEM
"custom-entities.ent" >
9 This file is part of systemd.
11 Copyright 2012 Zbigniew Jędrzejewski-Szmek
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
27 <refentry id=
"coredumpctl" conditional='ENABLE_COREDUMP'
28 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
31 <title>coredumpctl
</title>
32 <productname>systemd
</productname>
36 <contrib>Developer
</contrib>
37 <firstname>Zbigniew
</firstname>
38 <surname>Jędrzejewski-Szmek
</surname>
39 <email>zbyszek@in.waw.pl
</email>
45 <refentrytitle>coredumpctl
</refentrytitle>
46 <manvolnum>1</manvolnum>
50 <refname>coredumpctl
</refname>
51 <refpurpose>Retrieve coredumps from the journal
</refpurpose>
56 <command>coredumpctl
</command>
57 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
58 <arg choice=
"req">COMMAND
</arg>
59 <arg choice=
"opt" rep=
"repeat">PID|COMM|EXE|MATCH
</arg>
64 <title>Description
</title>
66 <para><command>coredumpctl
</command> may be used to
67 retrieve coredumps from
68 <citerefentry><refentrytitle>systemd-journald
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
72 <title>Options
</title>
74 <para>The following options are understood:
</para>
78 <term><option>--no-legend
</option></term>
80 <listitem><para>Do not print column headers.
85 <term><option>-
1</option></term>
87 <listitem><para>Show information of a single coredump only,
88 instead of listing all known coredumps.
</para></listitem>
92 <term><option>-F
</option></term>
93 <term><option>--field=
</option></term>
95 <listitem><para>Print all possible data values the specified
96 field takes in matching coredump entries of the
97 journal.
</para></listitem>
101 <term><option>-o
</option></term>
102 <term><option>--output=FILE
</option></term>
104 <listitem><para>Write the core to
<option>FILE
</option>.
108 <xi:include href=
"standard-options.xml" xpointer=
"help" />
109 <xi:include href=
"standard-options.xml" xpointer=
"version" />
110 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
114 <para>The following commands are understood:
</para>
118 <term><command>list
</command></term>
120 <listitem><para>List coredumps captured in the journal
121 matching specified characteristics. If no command is
122 specified, this is the implied default.
</para></listitem>
126 <term><command>info
</command></term>
128 <listitem><para>Show detailed information about coredumps
129 captured in the journal.
</para></listitem>
133 <term><command>dump
</command></term>
135 <listitem><para>Extract the last coredump matching specified
136 characteristics. The coredump will be written on standard
137 output, unless an output file is specified with
138 <option>-o/--output
</option>.
</para></listitem>
142 <term><command>gdb
</command></term>
144 <listitem><para>Invoke the GNU debugger on the last coredump
145 matching specified characteristics.
</para></listitem>
153 <title>Matching
</title>
155 <para>A match can be:
</para>
159 <term><replaceable>PID
</replaceable></term>
161 <listitem><para>Process ID of the
163 core. An integer.
</para></listitem>
167 <term><replaceable>COMM
</replaceable></term>
169 <listitem><para>Name of the executable (matches
170 <option>COREDUMP_COMM=
</option>). Must not contain slashes.
175 <term><replaceable>EXE
</replaceable></term>
177 <listitem><para>Path to the executable (matches
178 <option>COREDUMP_EXE=
</option>). Must contain at least one
179 slash.
</para></listitem>
183 <term><replaceable>MATCH
</replaceable></term>
185 <listitem><para>General journalctl predicates (see
186 <citerefentry><refentrytitle>journalctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
187 Must contain an equal sign.
</para></listitem>
193 <title>Exit status
</title>
194 <para>On success,
0 is returned; otherwise, a non-zero failure
195 code is returned. Not finding any matching coredumps is treated as
201 <title>Examples
</title>
204 <title>List all the coredumps of a program named foo
</title>
206 <programlisting># coredumpctl list foo
</programlisting>
210 <title>Invoke gdb on the last coredump
</title>
212 <programlisting># coredumpctl gdb
</programlisting>
216 <title>Show information about a process that dumped core,
217 matching by its PID
6654</title>
219 <programlisting># coredumpctl info
6654</programlisting>
223 <title>Extract the last coredump of /usr/bin/bar to a file named
224 <filename noindex=
"true">bar.coredump
</filename></title>
226 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar
</programlisting>
231 <title>See Also
</title>
233 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
234 <citerefentry><refentrytitle>coredump.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
235 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
236 <citerefentry project='man-pages'
><refentrytitle>gdb
</refentrytitle><manvolnum>1</manvolnum></citerefentry>