2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id=
"coredump.conf" conditional=
"ENABLE_COREDUMP"
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
9 <title>coredump.conf
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>coredump.conf
</refentrytitle>
15 <manvolnum>5</manvolnum>
19 <refname>coredump.conf
</refname>
20 <refname>coredump.conf.d
</refname>
21 <refpurpose>Core dump storage configuration files
</refpurpose>
25 <para><filename>/etc/systemd/coredump.conf
</filename></para>
26 <para><filename>/etc/systemd/coredump.conf.d/*.conf
</filename></para>
27 <para><filename>/run/systemd/coredump.conf.d/*.conf
</filename></para>
28 <para><filename>/usr/lib/systemd/coredump.conf.d/*.conf
</filename></para>
32 <title>Description
</title>
34 <para>These files configure the behavior of
35 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
36 a handler for core dumps invoked by the kernel. Whether
<command>systemd-coredump
</command> is used
37 is determined by the kernel's
38 <varname>kernel.core_pattern
</varname> <citerefentry project='man-pages'
><refentrytitle>sysctl
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
40 <citerefentry><refentrytitle>systemd-coredump
</refentrytitle><manvolnum>8</manvolnum></citerefentry>
42 <citerefentry project='man-pages'
><refentrytitle>core
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
43 pages for the details.
</para>
46 <xi:include href=
"standard-conf.xml" xpointer=
"main-conf" />
49 <title>Options
</title>
51 <para>All options are configured in the
52 [Coredump] section:
</para>
54 <variablelist class='config-directives'
>
57 <term><varname>Storage=
</varname></term>
59 <listitem><para>Controls where to store cores. One of
<literal>none
</literal>,
60 <literal>external
</literal>, and
<literal>journal
</literal>. When
61 <literal>none
</literal>, the core dumps may be logged (including the backtrace if
62 possible), but not stored permanently. When
<literal>external
</literal> (the
63 default), cores will be stored in
<filename>/var/lib/systemd/coredump/
</filename>.
64 When
<literal>journal
</literal>, cores will be stored in the journal and rotated
65 following normal journal rotation patterns.
</para>
67 <para>When cores are stored in the journal, they might be
68 compressed following journal compression settings, see
69 <citerefentry><refentrytitle>journald.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
70 When cores are stored externally, they will be compressed
71 by default, see below.
</para></listitem>
75 <term><varname>Compress=
</varname></term>
77 <listitem><para>Controls compression for external
78 storage. Takes a boolean argument, which defaults to
79 <literal>yes
</literal>.
</para>
84 <term><varname>ProcessSizeMax=
</varname></term>
86 <listitem><para>The maximum size in bytes of a core
87 which will be processed. Core dumps exceeding this size
88 may be stored, but the backtrace will not be generated.
89 Like other sizes in this same config file, the usual
90 suffixes to the base of
1024 are allowed (B, K, M,
91 G, T, P, and E.)
</para>
93 <para>Setting
<varname>Storage=none
</varname> and
<varname>ProcessSizeMax=
0</varname>
94 disables all coredump handling except for a log entry.
</para>
99 <term><varname>ExternalSizeMax=
</varname></term>
100 <term><varname>JournalSizeMax=
</varname></term>
102 <listitem><para>The maximum (compressed or uncompressed) size in bytes of a
103 core to be saved. Unit suffixes are allowed just as in
104 <option>ProcessSizeMax=
</option></para></listitem>.
108 <term><varname>MaxUse=
</varname></term>
109 <term><varname>KeepFree=
</varname></term>
111 <listitem><para>Enforce limits on the disk space, specified
112 in bytes, taken up by externally stored core dumps.
113 Unit suffixes are allowed just as in
<option>ProcessSizeMax=
</option>.
114 <option>MaxUse=
</option> makes
115 sure that old core dumps are removed as soon as the total disk
116 space taken up by core dumps grows beyond this limit (defaults
117 to
10% of the total disk size).
<option>KeepFree=
</option>
118 controls how much disk space to keep free at least (defaults
119 to
15% of the total disk size). Note that the disk space used
120 by core dumps might temporarily exceed these limits while
121 core dumps are processed. Note that old core dumps are also
122 removed based on time via
123 <citerefentry><refentrytitle>systemd-tmpfiles
</refentrytitle><manvolnum>8</manvolnum></citerefentry>. Set
124 either value to
0 to turn off size-based
125 clean-up.
</para></listitem>
129 <para>The defaults for all values are listed as comments in the
130 template
<filename>/etc/systemd/coredump.conf
</filename> file that
131 is installed by default.
</para>
135 <title>See Also
</title>
137 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
138 <citerefentry><refentrytitle>coredumpctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
139 <citerefentry><refentrytitle>systemd-tmpfiles
</refentrytitle><manvolnum>8</manvolnum></citerefentry>