chiark / gitweb /
coredump: log coredump even if core dumping fails
[elogind.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                 <refname>systemd-coredumpctl</refname>
49
50                 <refpurpose>Retrieve coredumps from the journal</refpurpose>
51         </refnamediv>
52
53         <refsynopsisdiv>
54                 <cmdsynopsis>
55                         <command>coredumpctl</command>
56                         <arg choice="opt" rep="repeat">OPTIONS</arg>
57                         <arg choice="req">COMMAND</arg>
58                         <arg choice="opt" rep="repeat">PID|COMM|EXE|MATCH</arg>
59                 </cmdsynopsis>
60         </refsynopsisdiv>
61
62         <refsect1>
63                 <title>Description</title>
64
65                 <para><command>coredumpctl</command> may be used to
66                 retrieve coredumps from
67                 <citerefentry><refentrytitle>systemd-journald</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
68
69                 <para><command>systemd-coredumpctl</command> is a
70                 depracated alias for
71                 <command>coredumpctl</command>.</para>
72         </refsect1>
73
74         <refsect1>
75                 <title>Options</title>
76
77                 <para>The following options are understood:</para>
78
79                 <variablelist>
80                         <varlistentry>
81                                 <term><option>--no-legend</option></term>
82
83                                 <listitem><para>Do not print the column headers.
84                                 </para></listitem>
85                         </varlistentry>
86
87                         <varlistentry>
88                                 <term><option>-1</option></term>
89
90                                 <listitem><para>Show information of a
91                                 single coredump only, instead of
92                                 listing all known coredumps.
93                                 </para></listitem>
94                         </varlistentry>
95
96                         <varlistentry>
97                                 <term><option>-F</option></term>
98                                 <term><option>--field=</option></term>
99
100                                 <listitem><para>Print all possible
101                                 data values the specified field
102                                 takes in matching coredump entries of the
103                                 journal.</para></listitem>
104                         </varlistentry>
105
106                         <varlistentry>
107                                 <term><option>-o</option></term>
108                                 <term><option>--output=FILE</option></term>
109
110                                 <listitem><para>Write the core to
111                                 <option>FILE</option>.</para></listitem>
112                         </varlistentry>
113
114                         <xi:include href="standard-options.xml" xpointer="help" />
115                         <xi:include href="standard-options.xml" xpointer="version" />
116                         <xi:include href="standard-options.xml" xpointer="no-pager" />
117
118                 </variablelist>
119
120                 <para>The following commands are understood:</para>
121
122                 <variablelist>
123                         <varlistentry>
124                                 <term><command>list</command></term>
125
126                                 <listitem><para>List coredumps
127                                 captured in the journal matching
128                                 specified characteristics. If no
129                                 command is specified this is the
130                                 implied default.</para></listitem>
131                         </varlistentry>
132
133                         <varlistentry>
134                                 <term><command>info</command></term>
135
136                                 <listitem><para>Show detailed
137                                 information about coredumps captured
138                                 in the journal.</para></listitem>
139                         </varlistentry>
140
141                         <varlistentry>
142                                 <term><command>dump</command></term>
143
144                                 <listitem><para>Extract the last coredump
145                                 matching specified characteristics.
146                                 The coredump will be written on standard output,
147                                 unless an output file is specified with
148                                 <option>-o/--output</option>.
149                                 </para></listitem>
150                         </varlistentry>
151
152                         <varlistentry>
153                                 <term><command>gdb</command></term>
154
155                                 <listitem><para>Invoke the GNU
156                                 debugger on the last coredump matching
157                                 specified characteristics.
158                                 </para></listitem>
159                         </varlistentry>
160
161                 </variablelist>
162
163         </refsect1>
164
165         <refsect1>
166                 <title>Matching</title>
167
168                 <para>A match can be:</para>
169
170                 <variablelist>
171                         <varlistentry>
172                                 <term><replaceable>PID</replaceable></term>
173
174                                 <listitem><para>Process ID of the
175                                 process that dumped
176                                 core. An integer.</para></listitem>
177                         </varlistentry>
178
179                         <varlistentry>
180                                 <term><replaceable>COMM</replaceable></term>
181
182                                 <listitem><para>Name of the executable
183                                 (matches <option>COREDUMP_COMM=</option>).
184                                 Must not contain slashes.
185                                 </para></listitem>
186                         </varlistentry>
187
188                         <varlistentry>
189                                 <term><replaceable>EXE</replaceable></term>
190
191                                 <listitem><para>Path to the executable
192                                 (matches <option>COREDUMP_EXE=</option>).
193                                 Must contain at least one slash.
194                                 </para></listitem>
195                         </varlistentry>
196
197                         <varlistentry>
198                                 <term><replaceable>MATCH</replaceable></term>
199
200                                 <listitem><para>General journalctl predicates
201                                 (see <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
202                                 Must contain an equal sign.
203                                 </para></listitem>
204                         </varlistentry>
205                 </variablelist>
206         </refsect1>
207
208         <refsect1>
209                 <title>Exit status</title>
210                 <para>On success, 0 is returned; otherwise, a non-zero failure
211                 code is returned. Not finding any matching coredumps is treated
212                 as failure.
213                 </para>
214         </refsect1>
215
216         <refsect1>
217                 <title>See Also</title>
218                 <para>
219                         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
220                         <citerefentry><refentrytitle>gdb</refentrytitle><manvolnum>1</manvolnum></citerefentry>
221                 </para>
222         </refsect1>
223
224 </refentry>