]> git.proxmox.com Git - systemd.git/blob - man/coredump.conf.xml
New upstream version 249~rc1
[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
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>
66
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>
72 </varlistentry>
73
74 <varlistentry>
75 <term><varname>Compress=</varname></term>
76
77 <listitem><para>Controls compression for external
78 storage. Takes a boolean argument, which defaults to
79 <literal>yes</literal>.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><varname>ProcessSizeMax=</varname></term>
85
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>
92
93 <para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname>
94 disables all coredump handling except for a log entry.</para>
95 </listitem>
96 </varlistentry>
97
98 <varlistentry>
99 <term><varname>ExternalSizeMax=</varname></term>
100 <term><varname>JournalSizeMax=</varname></term>
101
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>.
105 </varlistentry>
106
107 <varlistentry>
108 <term><varname>MaxUse=</varname></term>
109 <term><varname>KeepFree=</varname></term>
110
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>
126 </varlistentry>
127 </variablelist>
128
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>
132 </refsect1>
133
134 <refsect1>
135 <title>See Also</title>
136 <para>
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>
140 </para>
141 </refsect1>
142
143 </refentry>