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

FORWARDING TO TRADITIONAL SYSLOG DAEMONS

342       Journal events can be transferred to a different logging daemon in two
343       different ways. With the first method, messages are immediately
344       forwarded to a socket (/run/systemd/journal/syslog), where the
345       traditional syslog daemon can read them. This method is controlled by
346       the ForwardToSyslog= option. With a second method, a syslog daemon
347       behaves like a normal journal client, and reads messages from the
348       journal files, similarly to journalctl(1). With this, messages do not
349       have to be read immediately, which allows a logging daemon which is
350       only started late in boot to access all messages since the start of the
351       system. In addition, full structured meta-data is available to it. This
352       method of course is available only if the messages are stored in a
353       journal file at all. So it will not work if Storage=none is set. It
354       should be noted that usually the second method is used by syslog
355       daemons, so the Storage= option, and not the ForwardToSyslog= option,
356       is relevant for them.
357

SEE ALSO

359       systemd(1), systemd-journald.service(8), journalctl(1),
360       systemd.journal-fields(7), systemd-system.conf(5)
361

NOTES

363        1. Seekable Sequential Key Generators
364           https://eprint.iacr.org/2013/397
365
366        2. Users, Groups, UIDs and GIDs on systemd systems
367           https://systemd.io/UIDS-GIDS
368
369
370
371systemd 246                                                   JOURNALD.CONF(5)
Impressum