]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/coredumpctl.xml
Merge pull request #5346 from namhyung/coredump-reverse
[thirdparty/systemd.git] / man / coredumpctl.xml
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
5 <!--
6 This file is part of systemd.
7
8 Copyright 2012 Zbigniew Jędrzejewski-Szmek
9
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.
14
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.
19
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/>.
22 -->
23
24 <refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
25 xmlns:xi="http://www.w3.org/2001/XInclude">
26
27 <refentryinfo>
28 <title>coredumpctl</title>
29 <productname>systemd</productname>
30
31 <authorgroup>
32 <author>
33 <contrib>Developer</contrib>
34 <firstname>Zbigniew</firstname>
35 <surname>Jędrzejewski-Szmek</surname>
36 <email>zbyszek@in.waw.pl</email>
37 </author>
38 </authorgroup>
39 </refentryinfo>
40
41 <refmeta>
42 <refentrytitle>coredumpctl</refentrytitle>
43 <manvolnum>1</manvolnum>
44 </refmeta>
45
46 <refnamediv>
47 <refname>coredumpctl</refname>
48 <refpurpose>Retrieve and process saved core dumps and metadata</refpurpose>
49 </refnamediv>
50
51 <refsynopsisdiv>
52 <cmdsynopsis>
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>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59
60 <refsect1>
61 <title>Description</title>
62
63 <para><command>coredumpctl</command> is a tool that can be used to retrieve and process core
64 dumps and metadata which were saved by
65 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
66 </para>
67 </refsect1>
68
69 <refsect1>
70 <title>Options</title>
71
72 <para>The following options are understood:</para>
73
74 <variablelist>
75
76 <xi:include href="standard-options.xml" xpointer="help" />
77 <xi:include href="standard-options.xml" xpointer="version" />
78
79 <varlistentry>
80 <term><option>--no-legend</option></term>
81
82 <listitem><para>Do not print column headers.</para></listitem>
83 </varlistentry>
84
85 <xi:include href="standard-options.xml" xpointer="no-pager" />
86
87 <varlistentry>
88 <term><option>-1</option></term>
89
90 <listitem><para>Show information of a single core dump only, instead of listing
91 all known core dumps.</para></listitem>
92 </varlistentry>
93
94 <varlistentry>
95 <term><option>-r</option></term>
96 <term><option>--reverse</option></term>
97
98 <listitem><para>Reverse output so that the newest entries are displayed first.
99 </para></listitem>
100 </varlistentry>
101
102 <varlistentry>
103 <term><option>-F</option> <replaceable>FIELD</replaceable></term>
104 <term><option>--field=</option><replaceable>FIELD</replaceable></term>
105
106 <listitem><para>Print all possible data values the specified
107 field takes in matching core dump entries of the
108 journal.</para></listitem>
109 </varlistentry>
110
111 <varlistentry>
112 <term><option>-o</option> <replaceable>FILE</replaceable></term>
113 <term><option>--output=</option><replaceable>FILE</replaceable></term>
114
115 <listitem><para>Write the core to <option>FILE</option>.
116 </para></listitem>
117 </varlistentry>
118
119 <varlistentry>
120 <term><option>-D</option> <replaceable>DIR</replaceable></term>
121 <term><option>--directory=</option><replaceable>DIR</replaceable></term>
122
123 <listitem><para>Use the journal files in the specified <option>DIR</option>.
124 </para></listitem>
125 </varlistentry>
126
127 </variablelist>
128 </refsect1>
129
130 <refsect1>
131 <title>Commands</title>
132
133 <para>The following commands are understood:</para>
134
135 <variablelist>
136 <varlistentry>
137 <term><command>list</command></term>
138
139 <listitem><para>List core dumps captured in the journal
140 matching specified characteristics. If no command is
141 specified, this is the implied default.</para>
142
143 <para>It's worth noting that different restrictions apply to
144 data saved in the journal and core dump files saved in
145 <filename>/var/lib/systemd/coredump</filename>, see overview in
146 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
147 Thus it may very well happen that a particular core dump is still listed
148 in the journal while its corresponding core dump file has already been
149 removed.</para></listitem>
150 </varlistentry>
151
152 <varlistentry>
153 <term><command>info</command></term>
154
155 <listitem><para>Show detailed information about core dumps
156 captured in the journal.</para></listitem>
157 </varlistentry>
158
159 <varlistentry>
160 <term><command>dump</command></term>
161
162 <listitem><para>Extract the last core dump matching specified
163 characteristics. The core dump will be written on standard
164 output, unless an output file is specified with
165 <option>--output=</option>. </para></listitem>
166 </varlistentry>
167
168 <varlistentry>
169 <term><command>gdb</command></term>
170
171 <listitem><para>Invoke the GNU debugger on the last core dump
172 matching specified characteristics. </para></listitem>
173 </varlistentry>
174
175 </variablelist>
176
177 </refsect1>
178
179 <refsect1>
180 <title>Matching</title>
181
182 <para>A match can be:</para>
183
184 <variablelist>
185 <varlistentry>
186 <term><replaceable>PID</replaceable></term>
187
188 <listitem><para>Process ID of the
189 process that dumped
190 core. An integer.</para></listitem>
191 </varlistentry>
192
193 <varlistentry>
194 <term><replaceable>COMM</replaceable></term>
195
196 <listitem><para>Name of the executable (matches
197 <option>COREDUMP_COMM=</option>). Must not contain slashes.
198 </para></listitem>
199 </varlistentry>
200
201 <varlistentry>
202 <term><replaceable>EXE</replaceable></term>
203
204 <listitem><para>Path to the executable (matches
205 <option>COREDUMP_EXE=</option>). Must contain at least one
206 slash. </para></listitem>
207 </varlistentry>
208
209 <varlistentry>
210 <term><replaceable>MATCH</replaceable></term>
211
212 <listitem><para>General journalctl predicates (see
213 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
214 Must contain an equal sign. </para></listitem>
215 </varlistentry>
216 </variablelist>
217 </refsect1>
218
219 <refsect1>
220 <title>Exit status</title>
221 <para>On success, 0 is returned; otherwise, a non-zero failure
222 code is returned. Not finding any matching core dumps is treated as
223 failure.
224 </para>
225 </refsect1>
226
227 <refsect1>
228 <title>Examples</title>
229
230 <example>
231 <title>List all the core dumps of a program named foo</title>
232
233 <programlisting># coredumpctl list foo</programlisting>
234 </example>
235
236 <example>
237 <title>Invoke gdb on the last core dump</title>
238
239 <programlisting># coredumpctl gdb</programlisting>
240 </example>
241
242 <example>
243 <title>Show information about a process that dumped core,
244 matching by its PID 6654</title>
245
246 <programlisting># coredumpctl info 6654</programlisting>
247 </example>
248
249 <example>
250 <title>Extract the last core dump of /usr/bin/bar to a file named
251 <filename noindex="true">bar.coredump</filename></title>
252
253 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
254 </example>
255 </refsect1>
256
257 <refsect1>
258 <title>See Also</title>
259 <para>
260 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
261 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
262 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
263 <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
264 </para>
265 </refsect1>
266
267 </refentry>