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 which will be processed. Core dumps exceeding 87 this size may be stored, but the backtrace will not be generated. Like other sizes in this same 88 config file, the usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P, and E). Defaults 89 to 1G on 32bit systems, 32G on 64bit systems.</para> 90 91 <para>Setting <varname>Storage=none</varname> and <varname>ProcessSizeMax=0</varname> 92 disables all coredump handling except for a log entry.</para> 93 </listitem> 94 </varlistentry> 95 96 <varlistentry> 97 <term><varname>ExternalSizeMax=</varname></term> 98 <term><varname>JournalSizeMax=</varname></term> 99 100 <listitem><para>The maximum (compressed or uncompressed) size in bytes of a core to be saved in 101 separate files on disk (default: 1G on 32bit, 32G on 64bit systems) or in the journal (default: 102 10M). Unit suffixes are allowed just as in <option>ProcessSizeMax=</option>.</para></listitem> 103 104 <para><varname>ExternalSizeMax=infinity</varname> sets the core size to unlimited.</para> 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>. 124 Set either value to 0 to turn off size-based cleanup.</para></listitem> 125 </varlistentry> 126 </variablelist> 127 128 <para>The defaults for all values are listed as comments in the 129 template <filename>/etc/systemd/coredump.conf</filename> file that 130 is installed by default.</para> 131 </refsect1> 132 133 <refsect1> 134 <title>See Also</title> 135 <para> 136 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>, 137 <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 138 <citerefentry><refentrytitle>systemd-tmpfiles</refentrytitle><manvolnum>8</manvolnum></citerefentry> 139 </para> 140 </refsect1> 141 142</refentry> 143