]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/coredump.conf.xml
man: add version info
[thirdparty/systemd.git] / man / coredump.conf.xml
CommitLineData
514094f9 1<?xml version='1.0'?>
3a54a157
ZJS
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
db9ecf05 4<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
3cc765d2 5
301af7e4
JT
6<refentry id="coredump.conf" conditional="ENABLE_COREDUMP"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
3cc765d2
ZJS
8 <refentryinfo>
9 <title>coredump.conf</title>
10 <productname>systemd</productname>
3cc765d2
ZJS
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>coredump.conf</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>coredump.conf</refname>
301af7e4 20 <refname>coredump.conf.d</refname>
246ba4aa 21 <refpurpose>Core dump storage configuration files</refpurpose>
3cc765d2
ZJS
22 </refnamediv>
23
24 <refsynopsisdiv>
12b42c76
TG
25 <para><filename>/etc/systemd/coredump.conf</filename></para>
26 <para><filename>/etc/systemd/coredump.conf.d/*.conf</filename></para>
301af7e4 27 <para><filename>/run/systemd/coredump.conf.d/*.conf</filename></para>
12b42c76 28 <para><filename>/usr/lib/systemd/coredump.conf.d/*.conf</filename></para>
3cc765d2
ZJS
29 </refsynopsisdiv>
30
31 <refsect1>
32 <title>Description</title>
33
dd2b607b 34 <para>These files configure the behavior of
18ead1b0 35 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
f3962329
ZJS
36 a handler for core dumps invoked by the kernel. Whether <command>systemd-coredump</command> is used
37 is determined by the kernel's
88c2c8a0 38 <varname>kernel.core_pattern</varname> <citerefentry project='man-pages'><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>
f3962329
ZJS
39 setting. See
40 <citerefentry><refentrytitle>systemd-coredump</refentrytitle><manvolnum>8</manvolnum></citerefentry>
41 and
42 <citerefentry project='man-pages'><refentrytitle>core</refentrytitle><manvolnum>5</manvolnum></citerefentry>
43 pages for the details.</para>
3cc765d2
ZJS
44 </refsect1>
45
e93549ef 46 <xi:include href="standard-conf.xml" xpointer="main-conf" />
301af7e4 47
3cc765d2
ZJS
48 <refsect1>
49 <title>Options</title>
50
51 <para>All options are configured in the
bdac5608 52 [Coredump] section:</para>
3cc765d2 53
d2acdcc6 54 <variablelist class='config-directives'>
3cc765d2
ZJS
55
56 <varlistentry>
57 <term><varname>Storage=</varname></term>
58
fc6cec86 59 <listitem><para>Controls where to store cores. One of <literal>none</literal>,
85ec1b6e
LP
60 <literal>external</literal>, and <literal>journal</literal>. When <literal>none</literal>, the core
61 dumps may be logged (including the backtrace if possible), but not stored permanently. When
62 <literal>external</literal> (the default), cores will be stored in
63 <filename>/var/lib/systemd/coredump/</filename>. When <literal>journal</literal>, cores will be
64 stored in the journal and rotated following normal journal rotation patterns.</para>
65
66 <para>When cores are stored in the journal, they might be compressed following journal compression
67 settings, see
3cc765d2 68 <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
85ec1b6e
LP
69 When cores are stored externally, they will be compressed by default, see below.</para>
70
71 <para>Note that in order to process a coredump (i.e. extract a stack trace) the core must be written
72 to disk first. Thus, unless <varname>ProcessSizeMax=</varname> is set to 0 (see below), the core will
73 be written to <filename>/var/lib/systemd/coredump/</filename> either way (under a temporary filename,
74 or even in an unlinked file), <varname>Storage=</varname> thus only controls whether to leave it
ec07c3c8
AK
75 there even after it was processed.</para>
76
77 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
3cc765d2
ZJS
78 </varlistentry>
79
80 <varlistentry>
8c9571d0 81 <term><varname>Compress=</varname></term>
3cc765d2 82
442f7f15 83 <listitem><para>Controls compression for external
a8eaaee7 84 storage. Takes a boolean argument, which defaults to
8c9571d0 85 <literal>yes</literal>.</para>
ec07c3c8
AK
86
87 <xi:include href="version-info.xml" xpointer="v215"/>
3cc765d2
ZJS
88 </listitem>
89 </varlistentry>
90
3cc765d2
ZJS
91 <varlistentry>
92 <term><varname>ProcessSizeMax=</varname></term>
93
be0d27ee 94 <listitem><para>The maximum size in bytes of a core which will be processed. Core dumps exceeding
85ec1b6e 95 this size may be stored, but the stack trace will not be generated. Like other sizes in this same
56c29bab 96 config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults
da890466 97 to 1G on 32-bit systems, 32G on 64-bit systems.</para>
c8e053fb
ZJS
98
99 <para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname>
100 disables all coredump handling except for a log entry.</para>
ec07c3c8
AK
101
102 <xi:include href="version-info.xml" xpointer="v215"/>
c8e053fb 103 </listitem>
3cc765d2
ZJS
104 </varlistentry>
105
106 <varlistentry>
107 <term><varname>ExternalSizeMax=</varname></term>
108 <term><varname>JournalSizeMax=</varname></term>
109
e6421b6c
LP
110 <listitem><para>The maximum (compressed or uncompressed) size in bytes of a coredump to be saved in
111 separate files on disk (default: 1G on 32-bit systems, 32G on 64-bit systems) or in the journal
112 (default: 767M). Note that the journal service enforces a hard limit on journal log records of 767M,
113 and will ignore larger submitted log records. Hence, <varname>JournalSizeMax=</varname> may be
114 lowered relative to the default, but not increased. Unit suffixes are allowed just as in
115 <option>ProcessSizeMax=</option>.</para>
116
ec07c3c8
AK
117 <para><varname>ExternalSizeMax=infinity</varname> sets the core size to unlimited.</para>
118
119 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
3cc765d2 120 </varlistentry>
0dc5d23c
LP
121
122 <varlistentry>
123 <term><varname>MaxUse=</varname></term>
124 <term><varname>KeepFree=</varname></term>
125
88c2c8a0
SB
126 <listitem><para>Enforce limits on the disk space, specified
127 in bytes, taken up by externally stored core dumps.
128 Unit suffixes are allowed just as in <option>ProcessSizeMax=</option>.
129 <option>MaxUse=</option> makes
246ba4aa
PM
130 sure that old core dumps are removed as soon as the total disk
131 space taken up by core dumps grows beyond this limit (defaults
0dc5d23c
LP
132 to 10% of the total disk size). <option>KeepFree=</option>
133 controls how much disk space to keep free at least (defaults
134 to 15% of the total disk size). Note that the disk space used
246ba4aa
PM
135 by core dumps might temporarily exceed these limits while
136 core dumps are processed. Note that old core dumps are also
cbfaff65 137 removed based on time via
be0d27ee 138 <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
ec07c3c8
AK
139 Set either value to 0 to turn off size-based cleanup.</para>
140
141 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
0dc5d23c 142 </varlistentry>
3cc765d2
ZJS
143 </variablelist>
144
8eeaf79c
ZJS
145 <para>The defaults for all values are listed as comments in the
146 template <filename>/etc/systemd/coredump.conf</filename> file that
147 is installed by default.</para>
3cc765d2
ZJS
148 </refsect1>
149
150 <refsect1>
151 <title>See Also</title>
152 <para>
153 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
0dc5d23c
LP
154 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>
3cc765d2
ZJS
156 </para>
157 </refsect1>
158
159</refentry>