1JOURNALD.CONF(5)                 journald.conf                JOURNALD.CONF(5)
2
3
4

NAME

6       journald.conf, journald.conf.d, journald@.conf - Journal service
7       configuration files
8

SYNOPSIS

10       /etc/systemd/journald.conf
11
12       /etc/systemd/journald.conf.d/*.conf
13
14       /run/systemd/journald.conf.d/*.conf
15
16       /usr/lib/systemd/journald.conf.d/*.conf
17
18       /etc/systemd/journald@NAMESPACE.conf
19

DESCRIPTION

21       These files configure various parameters of the systemd journal
22       service, systemd-journald.service(8). See systemd.syntax(5) for a
23       general description of the syntax.
24
25       The systemd-journald instance managing the default namespace is
26       configured by /etc/systemd/journald.conf and associated drop-ins.
27       Instances managing other namespaces read
28       /etc/systemd/journald@NAMESPACE.conf with the namespace identifier
29       filled in. This allows each namespace to carry a distinct
30       configuration. See systemd-journald.service(8) for details about
31       journal namespaces.
32

CONFIGURATION DIRECTORIES AND PRECEDENCE

34       The default configuration is defined during compilation, so a
35       configuration file is only needed when it is necessary to deviate from
36       those defaults. By default, the configuration file in /etc/systemd/
37       contains commented out entries showing the defaults as a guide to the
38       administrator. This file can be edited to create local overrides.
39
40       When packages need to customize the configuration, they can install
41       configuration snippets in /usr/lib/systemd/*.conf.d/ or
42       /usr/local/lib/systemd/*.conf.d/. The main configuration file is read
43       before any of the configuration directories, and has the lowest
44       precedence; entries in a file in any configuration directory override
45       entries in the single configuration file. Files in the *.conf.d/
46       configuration subdirectories are sorted by their filename in
47       lexicographic order, regardless of in which of the subdirectories they
48       reside. When multiple files specify the same option, for options which
49       accept just a single value, the entry in the file with the
50       lexicographically latest name takes precedence. For options which
51       accept a list of values, entries are collected as they occur in files
52       sorted lexicographically.
53
54       Files in /etc/ are reserved for the local administrator, who may use
55       this logic to override the configuration files installed by vendor
56       packages. It is recommended to prefix all filenames in those
57       subdirectories with a two-digit number and a dash, to simplify the
58       ordering of the files.
59
60       To disable a configuration file supplied by the vendor, the recommended
61       way is to place a symlink to /dev/null in the configuration directory
62       in /etc/, with the same filename as the vendor configuration file.
63

OPTIONS

65       All options are configured in the "[Journal]" section:
66
67       Storage=
68           Controls where to store journal data. One of "volatile",
69           "persistent", "auto" and "none". If "volatile", journal log data
70           will be stored only in memory, i.e. below the /run/log/journal
71           hierarchy (which is created if needed). If "persistent", data will
72           be stored preferably on disk, i.e. below the /var/log/journal
73           hierarchy (which is created if needed), with a fallback to
74           /run/log/journal (which is created if needed), during early boot
75           and if the disk is not writable.  "auto" is similar to "persistent"
76           but the directory /var/log/journal is not created if needed, so
77           that its existence controls where log data goes.  "none" turns off
78           all storage, all log data received will be dropped. Forwarding to
79           other targets, such as the console, the kernel log buffer, or a
80           syslog socket will still work however. Defaults to "auto" in the
81           default journal namespace, and "persistent" in all others.
82
83       Compress=
84           Can take a boolean value. If enabled (the default), data objects
85           that shall be stored in the journal and are larger than the default
86           threshold of 512 bytes are compressed before they are written to
87           the file system. It can also be set to a number of bytes to specify
88           the compression threshold directly. Suffixes like K, M, and G can
89           be used to specify larger units.
90
91       Seal=
92           Takes a boolean value. If enabled (the default), and a sealing key
93           is available (as created by journalctl(1)'s --setup-keys command),
94           Forward Secure Sealing (FSS) for all persistent journal files is
95           enabled. FSS is based on Seekable Sequential Key Generators[1] by
96           G. A. Marson and B. Poettering (doi:10.1007/978-3-642-40203-6_7)
97           and may be used to protect journal files from unnoticed alteration.
98
99       SplitMode=
100           Controls whether to split up journal files per user, either "uid"
101           or "none". Split journal files are primarily useful for access
102           control: on UNIX/Linux access control is managed per file, and the
103           journal daemon will assign users read access to their journal
104           files. If "uid", all regular users (with UID outside the range of
105           system users, dynamic service users, and the nobody user) will each
106           get their own journal files, and system users will log to the
107           system journal. See Users, Groups, UIDs and GIDs on systemd
108           systems[2] for more details about UID ranges. If "none", journal
109           files are not split up by user and all messages are instead stored
110           in the single system journal. In this mode unprivileged users
111           generally do not have access to their own log data. Note that
112           splitting up journal files by user is only available for journals
113           stored persistently. If journals are stored on volatile storage
114           (see Storage= above), only a single journal file is used. Defaults
115           to "uid".
116
117       RateLimitIntervalSec=, RateLimitBurst=
118           Configures the rate limiting that is applied to all messages
119           generated on the system. If, in the time interval defined by
120           RateLimitIntervalSec=, more messages than specified in
121           RateLimitBurst= are logged by a service, all further messages
122           within the interval are dropped until the interval is over. A
123           message about the number of dropped messages is generated. This
124           rate limiting is applied per-service, so that two services which
125           log do not interfere with each other's limits. Defaults to 10000
126           messages in 30s. The time specification for RateLimitIntervalSec=
127           may be specified in the following units: "s", "min", "h", "ms",
128           "us". To turn off any kind of rate limiting, set either value to 0.
129
130           Note that the effective rate limit is multiplied with a factor
131           derived from the available free disk space for the journal.
132           Currently, this factor is calculated using the base 2 logarithm.
133
134           Table 1. Example RateLimitBurst= rate modifications by the
135           available disk space
136           ┌─────────────────────┬──────────────────┐
137Available Disk Space Burst Multiplier 
138           ├─────────────────────┼──────────────────┤
139           │<= 1MB               │ 1                │
140           ├─────────────────────┼──────────────────┤
141           │<= 16MB              │ 2                │
142           ├─────────────────────┼──────────────────┤
143           │<= 256MB             │ 3                │
144           ├─────────────────────┼──────────────────┤
145           │<= 4GB               │ 4                │
146           ├─────────────────────┼──────────────────┤
147           │<= 64GB              │ 5                │
148           ├─────────────────────┼──────────────────┤
149           │<= 1TB               │ 6                │
150           └─────────────────────┴──────────────────┘
151           If a service provides rate limits for itself through
152           LogRateLimitIntervalSec= and/or LogRateLimitBurst= in
153           systemd.exec(5), those values will override the settings specified
154           here.
155
156       SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, SystemMaxFiles=,
157       RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize=, RuntimeMaxFiles=
158           Enforce size limits on the journal files stored. The options
159           prefixed with "System" apply to the journal files when stored on a
160           persistent file system, more specifically /var/log/journal. The
161           options prefixed with "Runtime" apply to the journal files when
162           stored on a volatile in-memory file system, more specifically
163           /run/log/journal. The former is used only when /var is mounted,
164           writable, and the directory /var/log/journal exists. Otherwise,
165           only the latter applies. Note that this means that during early
166           boot and if the administrator disabled persistent logging, only the
167           latter options apply, while the former apply if persistent logging
168           is enabled and the system is fully booted up.  journalctl and
169           systemd-journald ignore all files with names not ending with
170           ".journal" or ".journal~", so only such files, located in the
171           appropriate directories, are taken into account when calculating
172           current disk usage.
173
174           SystemMaxUse= and RuntimeMaxUse= control how much disk space the
175           journal may use up at most.  SystemKeepFree= and RuntimeKeepFree=
176           control how much disk space systemd-journald shall leave free for
177           other uses.  systemd-journald will respect both limits and use the
178           smaller of the two values.
179
180           The first pair defaults to 10% and the second to 15% of the size of
181           the respective file system, but each value is capped to 4G. If the
182           file system is nearly full and either SystemKeepFree= or
183           RuntimeKeepFree= are violated when systemd-journald is started, the
184           limit will be raised to the percentage that is actually free. This
185           means that if there was enough free space before and journal files
186           were created, and subsequently something else causes the file
187           system to fill up, journald will stop using more space, but it will
188           not be removing existing files to reduce the footprint again,
189           either. Also note that only archived files are deleted to reduce
190           the space occupied by journal files. This means that, in effect,
191           there might still be more space used than SystemMaxUse= or
192           RuntimeMaxUse= limit after a vacuuming operation is complete.
193
194           SystemMaxFileSize= and RuntimeMaxFileSize= control how large
195           individual journal files may grow at most. This influences the
196           granularity in which disk space is made available through rotation,
197           i.e. deletion of historic data. Defaults to one eighth of the
198           values configured with SystemMaxUse= and RuntimeMaxUse=, so that
199           usually seven rotated journal files are kept as history.
200
201           Specify values in bytes or use K, M, G, T, P, E as units for the
202           specified sizes (equal to 1024, 1024², ... bytes). Note that size
203           limits are enforced synchronously when journal files are extended,
204           and no explicit rotation step triggered by time is needed.
205
206           SystemMaxFiles= and RuntimeMaxFiles= control how many individual
207           journal files to keep at most. Note that only archived files are
208           deleted to reduce the number of files until this limit is reached;
209           active files will stay around. This means that, in effect, there
210           might still be more journal files around in total than this limit
211           after a vacuuming operation is complete. This setting defaults to
212           100.
213
214       MaxFileSec=
215           The maximum time to store entries in a single journal file before
216           rotating to the next one. Normally, time-based rotation should not
217           be required as size-based rotation with options such as
218           SystemMaxFileSize= should be sufficient to ensure that journal
219           files do not grow without bounds. However, to ensure that not too
220           much data is lost at once when old journal files are deleted, it
221           might make sense to change this value from the default of one
222           month. Set to 0 to turn off this feature. This setting takes time
223           values which may be suffixed with the units "year", "month",
224           "week", "day", "h" or "m" to override the default time unit of
225           seconds.
226
227       MaxRetentionSec=
228           The maximum time to store journal entries. This controls whether
229           journal files containing entries older than the specified time span
230           are deleted. Normally, time-based deletion of old journal files
231           should not be required as size-based deletion with options such as
232           SystemMaxUse= should be sufficient to ensure that journal files do
233           not grow without bounds. However, to enforce data retention
234           policies, it might make sense to change this value from the default
235           of 0 (which turns off this feature). This setting also takes time
236           values which may be suffixed with the units "year", "month",
237           "week", "day", "h" or " m" to override the default time unit of
238           seconds.
239
240       SyncIntervalSec=
241           The timeout before synchronizing journal files to disk. After
242           syncing, journal files are placed in the OFFLINE state. Note that
243           syncing is unconditionally done immediately after a log message of
244           priority CRIT, ALERT or EMERG has been logged. This setting hence
245           applies only to messages of the levels ERR, WARNING, NOTICE, INFO,
246           DEBUG. The default timeout is 5 minutes.
247
248       ForwardToSyslog=, ForwardToKMsg=, ForwardToConsole=, ForwardToWall=
249           Control whether log messages received by the journal daemon shall
250           be forwarded to a traditional syslog daemon, to the kernel log
251           buffer (kmsg), to the system console, or sent as wall messages to
252           all logged-in users. These options take boolean arguments. If
253           forwarding to syslog is enabled but nothing reads messages from the
254           socket, forwarding to syslog has no effect. By default, only
255           forwarding to wall is enabled. These settings may be overridden at
256           boot time with the kernel command line options
257           "systemd.journald.forward_to_syslog",
258           "systemd.journald.forward_to_kmsg",
259           "systemd.journald.forward_to_console", and
260           "systemd.journald.forward_to_wall". If the option name is specified
261           without "=" and the following argument, true is assumed. Otherwise,
262           the argument is parsed as a boolean.
263
264           When forwarding to the console, the TTY to log to can be changed
265           with TTYPath=, described below.
266
267           When forwarding to the kernel log buffer (kmsg), make sure to
268           select a suitably large size for the log buffer, for example by
269           adding "log_buf_len=8M" to the kernel command line.  systemd will
270           automatically disable kernel's rate-limiting applied to userspace
271           processes (equivalent to setting "printk.devkmsg=on").
272
273       MaxLevelStore=, MaxLevelSyslog=, MaxLevelKMsg=, MaxLevelConsole=,
274       MaxLevelWall=
275           Controls the maximum log level of messages that are stored in the
276           journal, forwarded to syslog, kmsg, the console or wall (if that is
277           enabled, see above). As argument, takes one of "emerg", "alert",
278           "crit", "err", "warning", "notice", "info", "debug", or integer
279           values in the range of 0–7 (corresponding to the same levels).
280           Messages equal or below the log level specified are
281           stored/forwarded, messages above are dropped. Defaults to "debug"
282           for MaxLevelStore= and MaxLevelSyslog=, to ensure that the all
283           messages are stored in the journal and forwarded to syslog.
284           Defaults to "notice" for MaxLevelKMsg=, "info" for
285           MaxLevelConsole=, and "emerg" for MaxLevelWall=. These settings may
286           be overridden at boot time with the kernel command line options
287           "systemd.journald.max_level_store=",
288           "systemd.journald.max_level_syslog=",
289           "systemd.journald.max_level_kmsg=",
290           "systemd.journald.max_level_console=",
291           "systemd.journald.max_level_wall=".
292
293       ReadKMsg=
294           Takes a boolean value. If enabled systemd-journal processes
295           /dev/kmsg messages generated by the kernel. In the default journal
296           namespace this option is enabled by default, it is disabled in all
297           others.
298
299       TTYPath=
300           Change the console TTY to use if ForwardToConsole=yes is used.
301           Defaults to /dev/console.
302
303       LineMax=
304           The maximum line length to permit when converting stream logs into
305           record logs. When a systemd unit's standard output/error are
306           connected to the journal via a stream socket, the data read is
307           split into individual log records at newline ("\n", ASCII 10) and
308           NUL characters. If no such delimiter is read for the specified
309           number of bytes a hard log record boundary is artificially
310           inserted, breaking up overly long lines into multiple log records.
311           Selecting overly large values increases the possible memory usage
312           of the Journal daemon for each stream client, as in the worst case
313           the journal daemon needs to buffer the specified number of bytes in
314           memory before it can flush a new log record to disk. Also note that
315           permitting overly large line maximum line lengths affects
316           compatibility with traditional log protocols as log records might
317           not fit anymore into a single AF_UNIX or AF_INET datagram. Takes a
318           size in bytes. If the value is suffixed with K, M, G or T, the
319           specified size is parsed as Kilobytes, Megabytes, Gigabytes, or
320           Terabytes (with the base 1024), respectively. Defaults to 48K,
321           which is relatively large but still small enough so that log
322           records likely fit into network datagrams along with extra room for
323           metadata. Note that values below 79 are not accepted and will be
324           bumped to 79.
325

FORWARDING TO TRADITIONAL SYSLOG DAEMONS

327       Journal events can be transferred to a different logging daemon in two
328       different ways. With the first method, messages are immediately
329       forwarded to a socket (/run/systemd/journal/syslog), where the
330       traditional syslog daemon can read them. This method is controlled by
331       the ForwardToSyslog= option. With a second method, a syslog daemon
332       behaves like a normal journal client, and reads messages from the
333       journal files, similarly to journalctl(1). With this, messages do not
334       have to be read immediately, which allows a logging daemon which is
335       only started late in boot to access all messages since the start of the
336       system. In addition, full structured meta-data is available to it. This
337       method of course is available only if the messages are stored in a
338       journal file at all. So it will not work if Storage=none is set. It
339       should be noted that usually the second method is used by syslog
340       daemons, so the Storage= option, and not the ForwardToSyslog= option,
341       is relevant for them.
342

SEE ALSO

344       systemd(1), systemd-journald.service(8), journalctl(1),
345       systemd.journal-fields(7), systemd-system.conf(5)
346

NOTES

348        1. Seekable Sequential Key Generators
349           https://eprint.iacr.org/2013/397
350
351        2. Users, Groups, UIDs and GIDs on systemd systems
352           https://systemd.io/UIDS-GIDS
353
354
355
356systemd 245                                                   JOURNALD.CONF(5)
Impressum