]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/coredump.conf.xml
man/systemd.mount: tmpfs automatically gains After=swap.target dep
[thirdparty/systemd.git] / man / coredump.conf.xml
1 <?xml version='1.0'?>
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 -->
5
6 <refentry id="coredump.conf" conditional="ENABLE_COREDUMP"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>coredump.conf</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>coredump.conf</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>coredump.conf</refname>
20 <refname>coredump.conf.d</refname>
21 <refpurpose>Core dump storage configuration files</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
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>
29 </refsynopsisdiv>
30
31 <refsect1>
32 <title>Description</title>
33
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>
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>
44 </refsect1>
45
46 <xi:include href="standard-conf.xml" xpointer="main-conf" />
47
48 <refsect1>
49 <title>Options</title>
50
51 <para>All options are configured in the
52 [Coredump] section:</para>
53
54 <variablelist class='config-directives'>
55
56 <varlistentry>
57 <term><varname>Storage=</varname></term>
58
59 <listitem><para>Controls where to store cores. One of <literal>none</literal>,
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
68 <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
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
75 there even after it was processed.</para>
76
77 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
78 </varlistentry>
79
80 <varlistentry>
81 <term><varname>Compress=</varname></term>
82
83 <listitem><para>Controls compression for external
84 storage. Takes a boolean argument, which defaults to
85 <literal>yes</literal>.</para>
86
87 <xi:include href="version-info.xml" xpointer="v215"/>
88 </listitem>
89 </varlistentry>
90
91 <varlistentry>
92 <term><varname>ProcessSizeMax=</varname></term>
93
94 <listitem><para>The maximum size in bytes of a core which will be processed. Core dumps exceeding
95 this size may be stored, but the stack trace will not be generated. Like other sizes in this same
96 config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults
97 to 1G on 32-bit systems, 32G on 64-bit systems.</para>
98
99 <para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname>
100 disables all coredump handling except for a log entry.</para>
101
102 <xi:include href="version-info.xml" xpointer="v215"/>
103 </listitem>
104 </varlistentry>
105
106 <varlistentry>
107 <term><varname>ExternalSizeMax=</varname></term>
108 <term><varname>JournalSizeMax=</varname></term>
109
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
117 <para><varname>ExternalSizeMax=infinity</varname> sets the core size to unlimited.</para>
118
119 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><varname>MaxUse=</varname></term>
124 <term><varname>KeepFree=</varname></term>
125
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
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
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
135 by core dumps might temporarily exceed these limits while
136 core dumps are processed. Note that old core dumps are also
137 removed based on time via
138 <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
139 Set either value to 0 to turn off size-based cleanup.</para>
140
141 <xi:include href="version-info.xml" xpointer="v215"/></listitem>
142 </varlistentry>
143 </variablelist>
144
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>
148 </refsect1>
149
150 <refsect1>
151 <title>See Also</title>
152 <para>
153 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
154 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
155 <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry>
156 </para>
157 </refsect1>
158
159 </refentry>