]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/coredumpctl.xml
test-execute: Add tests for new PassEnvironment= directive
[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<!--
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
f4bab169 24<refentry id="coredumpctl" conditional='ENABLE_COREDUMP'
798d3a52
ZJS
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 coredumps from the journal</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> may be used to
64 retrieve coredumps from
65 <citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
66 </refsect1>
67
68 <refsect1>
69 <title>Options</title>
70
71 <para>The following options are understood:</para>
72
73 <variablelist>
74 <varlistentry>
75 <term><option>--no-legend</option></term>
76
77 <listitem><para>Do not print column headers.
78 </para></listitem>
79 </varlistentry>
80
81 <varlistentry>
82 <term><option>-1</option></term>
83
84 <listitem><para>Show information of a single coredump only,
85 instead of listing all known coredumps. </para></listitem>
86 </varlistentry>
87
88 <varlistentry>
f6a4dae6
LP
89 <term><option>-F</option> <replaceable>FIELD</replaceable></term>
90 <term><option>--field=</option><replaceable>FIELD</replaceable></term>
798d3a52
ZJS
91
92 <listitem><para>Print all possible data values the specified
93 field takes in matching coredump entries of the
94 journal.</para></listitem>
95 </varlistentry>
96
97 <varlistentry>
f6a4dae6
LP
98 <term><option>-o</option> <replaceable>FILE</replaceable></term>
99 <term><option>--output=</option><replaceable>FILE</replaceable></term>
798d3a52
ZJS
100
101 <listitem><para>Write the core to <option>FILE</option>.
102 </para></listitem>
103 </varlistentry>
104
b73e9a02
SW
105 <varlistentry>
106 <term><option>-D</option> <replaceable>DIR</replaceable></term>
107 <term><option>--directory=</option><replaceable>DIR</replaceable></term>
108
109 <listitem><para>Use the journal files in the specified <option>DIR</option>.
110 </para></listitem>
111 </varlistentry>
112
798d3a52
ZJS
113 <xi:include href="standard-options.xml" xpointer="help" />
114 <xi:include href="standard-options.xml" xpointer="version" />
115 <xi:include href="standard-options.xml" xpointer="no-pager" />
116
117 </variablelist>
118
119 <para>The following commands are understood:</para>
120
121 <variablelist>
122 <varlistentry>
123 <term><command>list</command></term>
124
125 <listitem><para>List coredumps captured in the journal
126 matching specified characteristics. If no command is
127 specified, this is the implied default.</para></listitem>
128 </varlistentry>
129
130 <varlistentry>
131 <term><command>info</command></term>
132
133 <listitem><para>Show detailed information about coredumps
134 captured in the journal.</para></listitem>
135 </varlistentry>
136
137 <varlistentry>
138 <term><command>dump</command></term>
139
140 <listitem><para>Extract the last coredump matching specified
141 characteristics. The coredump will be written on standard
142 output, unless an output file is specified with
f6a4dae6 143 <option>--output=</option>. </para></listitem>
798d3a52
ZJS
144 </varlistentry>
145
146 <varlistentry>
147 <term><command>gdb</command></term>
148
149 <listitem><para>Invoke the GNU debugger on the last coredump
150 matching specified characteristics. </para></listitem>
151 </varlistentry>
152
153 </variablelist>
154
155 </refsect1>
156
157 <refsect1>
158 <title>Matching</title>
159
160 <para>A match can be:</para>
161
162 <variablelist>
163 <varlistentry>
164 <term><replaceable>PID</replaceable></term>
165
166 <listitem><para>Process ID of the
167 process that dumped
168 core. An integer.</para></listitem>
169 </varlistentry>
170
171 <varlistentry>
172 <term><replaceable>COMM</replaceable></term>
173
174 <listitem><para>Name of the executable (matches
175 <option>COREDUMP_COMM=</option>). Must not contain slashes.
176 </para></listitem>
177 </varlistentry>
178
179 <varlistentry>
180 <term><replaceable>EXE</replaceable></term>
181
182 <listitem><para>Path to the executable (matches
183 <option>COREDUMP_EXE=</option>). Must contain at least one
184 slash. </para></listitem>
185 </varlistentry>
186
187 <varlistentry>
188 <term><replaceable>MATCH</replaceable></term>
189
190 <listitem><para>General journalctl predicates (see
191 <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
192 Must contain an equal sign. </para></listitem>
193 </varlistentry>
194 </variablelist>
195 </refsect1>
196
197 <refsect1>
198 <title>Exit status</title>
199 <para>On success, 0 is returned; otherwise, a non-zero failure
200 code is returned. Not finding any matching coredumps is treated as
201 failure.
202 </para>
203 </refsect1>
204
205 <refsect1>
206 <title>Examples</title>
207
208 <example>
209 <title>List all the coredumps of a program named foo</title>
210
211 <programlisting># coredumpctl list foo</programlisting>
212 </example>
213
214 <example>
215 <title>Invoke gdb on the last coredump</title>
216
217 <programlisting># coredumpctl gdb</programlisting>
218 </example>
219
220 <example>
221 <title>Show information about a process that dumped core,
222 matching by its PID 6654</title>
223
224 <programlisting># coredumpctl info 6654</programlisting>
225 </example>
226
227 <example>
228 <title>Extract the last coredump of /usr/bin/bar to a file named
229 <filename noindex="true">bar.coredump</filename></title>
230
231 <programlisting># coredumpctl -o bar.coredump dump /usr/bin/bar</programlisting>
232 </example>
233 </refsect1>
234
235 <refsect1>
236 <title>See Also</title>
237 <para>
238 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
239 <citerefentry><refentrytitle>coredump.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
240 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
241 <citerefentry project='man-pages'><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
242 </para>
243 </refsect1>
5de0409e
ZJS
244
245</refentry>