1COREDUMP.CONF(5) coredump.conf COREDUMP.CONF(5)
2
3
4
6 coredump.conf, coredump.conf.d - Core dump storage configuration files
7
9 /etc/systemd/coredump.conf
10
11 /etc/systemd/coredump.conf.d/*.conf
12
13 /run/systemd/coredump.conf.d/*.conf
14
15 /usr/lib/systemd/coredump.conf.d/*.conf
16
18 These files configure the behavior of systemd-coredump(8), a handler
19 for core dumps invoked by the kernel. Whether systemd-coredump is used
20 is determined by the kernel's kernel.core_pattern sysctl(8) setting.
21 See systemd-coredump(8) and core(5) pages for the details.
22
24 The default configuration is set during compilation, so configuration
25 is only needed when it is necessary to deviate from those defaults.
26 Initially, the main configuration file in /etc/systemd/ contains
27 commented out entries showing the defaults as a guide to the
28 administrator. Local overrides can be created by editing this file or
29 by creating drop-ins, as described below. Using drop-ins for local
30 configuration is recommended over modifications to the main
31 configuration file.
32
33 In addition to the "main" configuration file, drop-in configuration
34 snippets are read from /usr/lib/systemd/*.conf.d/,
35 /usr/local/lib/systemd/*.conf.d/, and /etc/systemd/*.conf.d/. Those
36 drop-ins have higher precedence and override the main configuration
37 file. Files in the *.conf.d/ configuration subdirectories are sorted by
38 their filename in lexicographic order, regardless of in which of the
39 subdirectories they reside. When multiple files specify the same
40 option, for options which accept just a single value, the entry in the
41 file sorted last takes precedence, and for options which accept a list
42 of values, entries are collected as they occur in the sorted files.
43
44 When packages need to customize the configuration, they can install
45 drop-ins under /usr/. Files in /etc/ are reserved for the local
46 administrator, who may use this logic to override the configuration
47 files installed by vendor packages. Drop-ins have to be used to
48 override package drop-ins, since the main configuration file has lower
49 precedence. It is recommended to prefix all filenames in those
50 subdirectories with a two-digit number and a dash, to simplify the
51 ordering of the files.
52
53 To disable a configuration file supplied by the vendor, the recommended
54 way is to place a symlink to /dev/null in the configuration directory
55 in /etc/, with the same filename as the vendor configuration file.
56
58 All options are configured in the [Coredump] section:
59
60 Storage=
61 Controls where to store cores. One of "none", "external", and
62 "journal". When "none", the core dumps may be logged (including the
63 backtrace if possible), but not stored permanently. When "external"
64 (the default), cores will be stored in /var/lib/systemd/coredump/.
65 When "journal", cores will be stored in the journal and rotated
66 following normal journal rotation patterns.
67
68 When cores are stored in the journal, they might be compressed
69 following journal compression settings, see journald.conf(5). When
70 cores are stored externally, they will be compressed by default,
71 see below.
72
73 Note that in order to process a coredump (i.e. extract a stack
74 trace) the core must be written to disk first. Thus, unless
75 ProcessSizeMax= is set to 0 (see below), the core will be written
76 to /var/lib/systemd/coredump/ either way (under a temporary
77 filename, or even in an unlinked file), Storage= thus only controls
78 whether to leave it there even after it was processed.
79
80 Compress=
81 Controls compression for external storage. Takes a boolean
82 argument, which defaults to "yes".
83
84 ProcessSizeMax=
85 The maximum size in bytes of a core which will be processed. Core
86 dumps exceeding this size may be stored, but the stack trace will
87 not be generated. Like other sizes in this same config file, the
88 usual suffixes to the base of 1024 are allowed (B, K, M, G, T, P,
89 and E). Defaults to 1G on 32-bit systems, 32G on 64-bit systems.
90
91 Setting Storage=none and ProcessSizeMax=0 disables all coredump
92 handling except for a log entry.
93
94 ExternalSizeMax=, JournalSizeMax=
95 The maximum (compressed or uncompressed) size in bytes of a
96 coredump to be saved in separate files on disk (default: 1G on
97 32-bit systems, 32G on 64-bit systems) or in the journal (default:
98 767M). Note that the journal service enforces a hard limit on
99 journal log records of 767M, and will ignore larger submitted log
100 records. Hence, JournalSizeMax= may be lowered relative to the
101 default, but not increased. Unit suffixes are allowed just as in
102 ProcessSizeMax=.
103
104 ExternalSizeMax=infinity sets the core size to unlimited.
105
106 MaxUse=, KeepFree=
107 Enforce limits on the disk space, specified in bytes, taken up by
108 externally stored core dumps. Unit suffixes are allowed just as in
109 ProcessSizeMax=. MaxUse= makes sure that old core dumps are
110 removed as soon as the total disk space taken up by core dumps
111 grows beyond this limit (defaults to 10% of the total disk size).
112 KeepFree= controls how much disk space to keep free at least
113 (defaults to 15% of the total disk size). Note that the disk space
114 used by core dumps might temporarily exceed these limits while core
115 dumps are processed. Note that old core dumps are also removed
116 based on time via systemd-tmpfiles(8). Set either value to 0 to
117 turn off size-based cleanup.
118
119 The defaults for all values are listed as comments in the template
120 /etc/systemd/coredump.conf file that is installed by default.
121
123 systemd-journald.service(8), coredumpctl(1), systemd-tmpfiles(8)
124
125
126
127systemd 254 COREDUMP.CONF(5)