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 This file is part of systemd.
8 Copyright 2012 Zbigniew Jędrzejewski-Szmek
10 systemd is free software; you can redistribute it and/or modify it
11 under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 2.1 of the License, or
13 (at your option) any later version.
15 systemd is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public License
21 along with systemd; If not, see <http://www.gnu.org/licenses/>.
24 <refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
25 xmlns:xi="http://www.w3.org/2001/XInclude">
28 <title>coredumpctl</title>
29 <productname>systemd</productname>
33 <contrib>Developer</contrib>
34 <firstname>Zbigniew</firstname>
35 <surname>Jędrzejewski-Szmek</surname>
36 <email>zbyszek@in.waw.pl</email>
42 <refentrytitle>coredumpctl</refentrytitle>
43 <manvolnum>1</manvolnum>
47 <refname>coredumpctl</refname>
48 <refpurpose>Retrieve coredumps from the journal</refpurpose>
53 <command>coredumpctl</command>
54 <arg choice="opt" rep="repeat">OPTIONS</arg>
55 <arg choice="req">COMMAND</arg>
56 <arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
61 <title>Description</title>
63 <para><command>coredumpctl</command> may be used to
64 retrieve coredumps from
65 <citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
69 <title>Options</title>
71 <para>The following options are understood:</para>
75 <term><option>--no-legend</option></term>
77 <listitem><para>Do not print column headers.
82 <term><option>-1</option></term>
84 <listitem><para>Show information of a single coredump only,
85 instead of listing all known coredumps. </para></listitem>
89 <term><option>-F</option></term>
90 <term><option>--field=</option></term>
92 <listitem><para>Print all possible data values the specified
93 field takes in matching coredump entries of the
94 journal.</para></listitem>
98 <term><option>-o</option></term>
99 <term><option>--output=FILE</option></term>
101 <listitem><para>Write the core to <option>FILE</option>.
105 <xi:include href="standard-options.xml" xpointer="help" />
106 <xi:include href="standard-options.xml" xpointer="version" />
107 <xi:include href="standard-options.xml" xpointer="no-pager" />
111 <para>The following commands are understood:</para>
115 <term><command>list</command></term>
117 <listitem><para>List coredumps captured in the journal
118 matching specified characteristics. If no command is
119 specified, this is the implied default.</para></listitem>
123 <term><command>info</command></term>
125 <listitem><para>Show detailed information about coredumps
126 captured in the journal.</para></listitem>
130 <term><command>dump</command></term>
132 <listitem><para>Extract the last coredump matching specified
133 characteristics. The coredump will be written on standard
134 output, unless an output file is specified with
135 <option>-o/--output</option>. </para></listitem>
139 <term><command>gdb</command></term>
141 <listitem><para>Invoke the GNU debugger on the last coredump
142 matching specified characteristics. </para></listitem>
150 <title>Matching</title>
152 <para>A match can be:</para>
156 <term><replaceable>PID</replaceable></term>
158 <listitem><para>Process ID of the
160 core. An integer.</para></listitem>
164 <term><replaceable>COMM</replaceable></term>
166 <listitem><para>Name of the executable (matches
167 <option>COREDUMP_COMM=</option>). Must not contain slashes.
172 <term><replaceable>EXE</replaceable></term>
174 <listitem><para>Path to the executable (matches
175 <option>COREDUMP_EXE=</option>). Must contain at least one
176 slash. </para></listitem>
180 <term><replaceable>MATCH</replaceable></term>
182 <listitem><para>General journalctl predicates (see
183 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
184 Must contain an equal sign. </para></listitem>
190 <title>Exit status</title>
191 <para>On success, 0 is returned; otherwise, a non-zero failure
192 code is returned. Not finding any matching coredumps is treated as
198 <title>Examples</title>
201 <title>List all the coredumps of a program named foo</title>
203 <programlisting># coredumpctl list foo</programlisting>
207 <title>Invoke gdb on the last coredump</title>
209 <programlisting># coredumpctl gdb</programlisting>
213 <title>Show information about a process that dumped core,
214 matching by its PID 6654</title>
216 <programlisting># coredumpctl info 6654</programlisting>
220 <title>Extract the last coredump of /usr/bin/bar to a file named
221 <filename noindex="true">bar.coredump</filename></title>
223 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
228 <title>See Also</title>
230 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
231 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
232 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
233 <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>