]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/coredumpctl.xml
man: don't place nginx socket in /tmp (#8757)
[thirdparty/systemd.git] / man / coredumpctl.xml
CommitLineData
5de0409e
ZJS
1<?xml version='1.0'?> <!--*-nxml-*-->
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76 3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5de0409e
ZJS
4
5<!--
572eb058
ZJS
6 SPDX-License-Identifier: LGPL-2.1+
7
5de0409e
ZJS
8 This file is part of systemd.
9
10 Copyright 2012 Zbigniew Jędrzejewski-Szmek
5de0409e
ZJS
11-->
12
f4bab169 13<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
798d3a52
ZJS
14 xmlns:xi="http://www.w3.org/2001/XInclude">
15
16 <refentryinfo>
17 <title>coredumpctl</title>
18 <productname>systemd</productname>
19
20 <authorgroup>
21 <author>
22 <contrib>Developer</contrib>
23 <firstname>Zbigniew</firstname>
24 <surname>Jędrzejewski-Szmek</surname>
25 <email>zbyszek@in.waw.pl</email>
26 </author>
27 </authorgroup>
28 </refentryinfo>
29
30 <refmeta>
31 <refentrytitle>coredumpctl</refentrytitle>
32 <manvolnum>1</manvolnum>
33 </refmeta>
34
35 <refnamediv>
36 <refname>coredumpctl</refname>
246ba4aa 37 <refpurpose>Retrieve and process saved core dumps and metadata</refpurpose>
798d3a52
ZJS
38 </refnamediv>
39
40 <refsynopsisdiv>
41 <cmdsynopsis>
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>
46 </cmdsynopsis>
47 </refsynopsisdiv>
48
49 <refsect1>
50 <title>Description</title>
51
246ba4aa
PM
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>.
55 </para>
798d3a52
ZJS
56 </refsect1>
57
58 <refsect1>
59 <title>Options</title>
60
61 <para>The following options are understood:</para>
62
63 <variablelist>
246ba4aa
PM
64
65 <xi:include href="standard-options.xml" xpointer="help" />
66 <xi:include href="standard-options.xml" xpointer="version" />
67
798d3a52
ZJS
68 <varlistentry>
69 <term><option>--no-legend</option></term>
70
246ba4aa 71 <listitem><para>Do not print column headers.</para></listitem>
798d3a52
ZJS
72 </varlistentry>
73
246ba4aa
PM
74 <xi:include href="standard-options.xml" xpointer="no-pager" />
75
798d3a52
ZJS
76 <varlistentry>
77 <term><option>-1</option></term>
78
246ba4aa
PM
79 <listitem><para>Show information of a single core dump only, instead of listing
80 all known core dumps.</para></listitem>
798d3a52
ZJS
81 </varlistentry>
82
4ab2753e
GS
83 <varlistentry>
84 <term><option>-S</option></term>
85 <term><option>--since</option></term>
86
87 <listitem><para>Only print entries which are since the specified date.</para></listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><option>-U</option></term>
92 <term><option>--until</option></term>
93
94 <listitem><para>Only print entries which are until the specified date.</para></listitem>
95 </varlistentry>
96
c1143c93
NK
97 <varlistentry>
98 <term><option>-r</option></term>
99 <term><option>--reverse</option></term>
100
101 <listitem><para>Reverse output so that the newest entries are displayed first.
102 </para></listitem>
103 </varlistentry>
104
798d3a52 105 <varlistentry>
f6a4dae6
LP
106 <term><option>-F</option> <replaceable>FIELD</replaceable></term>
107 <term><option>--field=</option><replaceable>FIELD</replaceable></term>
798d3a52
ZJS
108
109 <listitem><para>Print all possible data values the specified
246ba4aa 110 field takes in matching core dump entries of the
798d3a52
ZJS
111 journal.</para></listitem>
112 </varlistentry>
113
114 <varlistentry>
f6a4dae6
LP
115 <term><option>-o</option> <replaceable>FILE</replaceable></term>
116 <term><option>--output=</option><replaceable>FILE</replaceable></term>
798d3a52
ZJS
117
118 <listitem><para>Write the core to <option>FILE</option>.
119 </para></listitem>
120 </varlistentry>
121
b73e9a02
SW
122 <varlistentry>
123 <term><option>-D</option> <replaceable>DIR</replaceable></term>
124 <term><option>--directory=</option><replaceable>DIR</replaceable></term>
125
126 <listitem><para>Use the journal files in the specified <option>DIR</option>.
127 </para></listitem>
128 </varlistentry>
129
b9aaa7f4
ZJS
130 <varlistentry>
131 <term><option>-q</option></term>
132 <term><option>--quiet</option></term>
133
db9b9fb9 134 <listitem><para>Suppresses informational messages about lack
b9aaa7f4
ZJS
135 of access to journal files and possible in-flight coredumps.
136 </para></listitem>
137 </varlistentry>
798d3a52 138 </variablelist>
246ba4aa
PM
139 </refsect1>
140
141 <refsect1>
142 <title>Commands</title>
798d3a52
ZJS
143
144 <para>The following commands are understood:</para>
145
146 <variablelist>
147 <varlistentry>
148 <term><command>list</command></term>
149
246ba4aa 150 <listitem><para>List core dumps captured in the journal
798d3a52 151 matching specified characteristics. If no command is
246ba4aa
PM
152 specified, this is the implied default.</para>
153
cc4419ed
ZJS
154 <para>The output is designed to be human readable and contains list contains
155 a table with the following columns:</para>
156 <variablelist>
157 <varlistentry>
158 <term>TIME</term>
159 <listitem><para>The timestamp of the crash, as reported by the kernel.</para>
160 </listitem>
161 </varlistentry>
162
163 <varlistentry>
164 <term>PID</term>
165 <listitem><para>The identifier of the process that crashed.</para>
166 </listitem>
167 </varlistentry>
168
169 <varlistentry>
170 <term>UID</term>
171 <term>GID</term>
172 <listitem><para>The user and group identifiers of the process that crashed.</para>
173 </listitem>
174 </varlistentry>
175
176 <varlistentry>
177 <term>SIGNAL</term>
178 <listitem><para>The signal that caused the process to crash, when applicable.
179 </para></listitem>
180 </varlistentry>
181
182 <varlistentry>
183 <term>COREFILE</term>
184 <listitem><para>Information whether the coredump was stored, and whether
785889e5 185 it is still accessible: <literal>none</literal> means the core was
cc4419ed
ZJS
186 not stored, <literal>-</literal> means that it was not available (for
187 example because the process was not terminated by a signal),
188 <literal>present</literal> means that the core file is accessible by the
189 current user, <literal>journal</literal> means that the core was stored
190 in the <literal>journal</literal>, <literal>truncated</literal> is the
191 same as one of the previous two, but the core was too large and was not
192 stored in its entirety, <literal>error</literal> means that the core file
193 cannot be accessed, most likely because of insufficient permissions, and
194 <literal>missing</literal> means that the core was stored in a file, but
195 this file has since been removed.</para></listitem>
196 </varlistentry>
197
198 <varlistentry>
199 <term>EXE</term>
200 <listitem><para>The full path to the executable. For backtraces of scripts
201 this is the name of the interpreter.</para></listitem>
202 </varlistentry>
203 </variablelist>
204
246ba4aa
PM
205 <para>It's worth noting that different restrictions apply to
206 data saved in the journal and core dump files saved in
207 <filename>/var/lib/systemd/coredump</filename>, see overview in
208 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
209 Thus it may very well happen that a particular core dump is still listed
210 in the journal while its corresponding core dump file has already been
211 removed.</para></listitem>
798d3a52
ZJS
212 </varlistentry>
213
214 <varlistentry>
215 <term><command>info</command></term>
216
246ba4aa 217 <listitem><para>Show detailed information about core dumps
798d3a52
ZJS
218 captured in the journal.</para></listitem>
219 </varlistentry>
220
221 <varlistentry>
222 <term><command>dump</command></term>
223
246ba4aa
PM
224 <listitem><para>Extract the last core dump matching specified
225 characteristics. The core dump will be written on standard
798d3a52 226 output, unless an output file is specified with
f6a4dae6 227 <option>--output=</option>. </para></listitem>
798d3a52
ZJS
228 </varlistentry>
229
230 <varlistentry>
231 <term><command>gdb</command></term>
232
246ba4aa 233 <listitem><para>Invoke the GNU debugger on the last core dump
798d3a52
ZJS
234 matching specified characteristics. </para></listitem>
235 </varlistentry>
236
237 </variablelist>
238
239 </refsect1>
240
241 <refsect1>
242 <title>Matching</title>
243
244 <para>A match can be:</para>
245
246 <variablelist>
247 <varlistentry>
248 <term><replaceable>PID</replaceable></term>
249
250 <listitem><para>Process ID of the
251 process that dumped
252 core. An integer.</para></listitem>
253 </varlistentry>
254
255 <varlistentry>
256 <term><replaceable>COMM</replaceable></term>
257
258 <listitem><para>Name of the executable (matches
259 <option>COREDUMP_COMM=</option>). Must not contain slashes.
260 </para></listitem>
261 </varlistentry>
262
263 <varlistentry>
264 <term><replaceable>EXE</replaceable></term>
265
266 <listitem><para>Path to the executable (matches
267 <option>COREDUMP_EXE=</option>). Must contain at least one
268 slash. </para></listitem>
269 </varlistentry>
270
271 <varlistentry>
272 <term><replaceable>MATCH</replaceable></term>
273
cc4419ed 274 <listitem><para>General journalctl predicate (see
798d3a52 275 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
cc4419ed 276 Must contain an equals sign (<literal>=</literal>).</para></listitem>
798d3a52
ZJS
277 </varlistentry>
278 </variablelist>
279 </refsect1>
280
281 <refsect1>
282 <title>Exit status</title>
283 <para>On success, 0 is returned; otherwise, a non-zero failure
246ba4aa 284 code is returned. Not finding any matching core dumps is treated as
798d3a52
ZJS
285 failure.
286 </para>
287 </refsect1>
288
289 <refsect1>
290 <title>Examples</title>
291
292 <example>
246ba4aa 293 <title>List all the core dumps of a program named foo</title>
798d3a52
ZJS
294
295 <programlisting># coredumpctl list foo</programlisting>
296 </example>
297
298 <example>
246ba4aa 299 <title>Invoke gdb on the last core dump</title>
798d3a52
ZJS
300
301 <programlisting># coredumpctl gdb</programlisting>
302 </example>
303
304 <example>
305 <title>Show information about a process that dumped core,
306 matching by its PID 6654</title>
307
308 <programlisting># coredumpctl info 6654</programlisting>
309 </example>
310
311 <example>
246ba4aa 312 <title>Extract the last core dump of /usr/bin/bar to a file named
798d3a52
ZJS
313 <filename noindex="true">bar.coredump</filename></title>
314
315 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
316 </example>
317 </refsect1>
318
319 <refsect1>
320 <title>See Also</title>
321 <para>
322 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
323 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
324 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
325 <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
326 </para>
327 </refsect1>
5de0409e
ZJS
328
329</refentry>