chiark / gitweb /
man: reindent journalctl(1)
[elogind.git] / man / journalctl.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2012 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24   <refentry id="journalctl"
25             xmlns:xi="http://www.w3.org/2001/XInclude">
26
27     <refentryinfo>
28       <title>journalctl</title>
29       <productname>systemd</productname>
30
31       <authorgroup>
32         <author>
33           <contrib>Developer</contrib>
34           <firstname>Lennart</firstname>
35           <surname>Poettering</surname>
36           <email>lennart@poettering.net</email>
37         </author>
38       </authorgroup>
39     </refentryinfo>
40
41     <refmeta>
42       <refentrytitle>journalctl</refentrytitle>
43       <manvolnum>1</manvolnum>
44     </refmeta>
45
46     <refnamediv>
47       <refname>journalctl</refname>
48       <refpurpose>Query the systemd journal</refpurpose>
49     </refnamediv>
50
51     <refsynopsisdiv>
52       <cmdsynopsis>
53         <command>journalctl</command>
54         <arg choice="opt" rep="repeat">OPTIONS</arg>
55         <arg choice="opt" rep="repeat">MATCHES</arg>
56       </cmdsynopsis>
57     </refsynopsisdiv>
58
59     <refsect1>
60       <title>Description</title>
61
62       <para><command>journalctl</command> may be used to query the
63       contents of the
64       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
65       journal as written by
66       <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
67
68       <para>If called without parameters, it will show the full
69       contents of the journal, starting with the oldest entry
70       collected.</para>
71
72       <para>If one or more match arguments are passed, the output is
73       filtered accordingly. A match is in the format
74       <literal>FIELD=VALUE</literal>,
75       e.g. <literal>_SYSTEMD_UNIT=httpd.service</literal>, referring
76       to the components of a structured journal entry. See
77       <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
78       for a list of well-known fields. If multiple matches are
79       specified matching different fields, the log entries are
80       filtered by both, i.e. the resulting output will show only
81       entries matching all the specified matches of this kind. If two
82       matches apply to the same field, then they are automatically
83       matched as alternatives, i.e. the resulting output will show
84       entries matching any of the specified matches for the same
85       field. Finally, the character <literal>+</literal> may appears
86       as a separate word between other terms on the command line. This
87       causes all matches before and after to be combined in a
88       disjunction (i.e. logical OR).</para>
89
90       <para>As shortcuts for a few types of field/value matches, file
91       paths may be specified. If a file path refers to an executable
92       file, this is equivalent to an <literal>_EXE=</literal> match
93       for the canonicalized binary path. Similarly, if a path refers
94       to a device node, this is equivalent to a
95       <literal>_KERNEL_DEVICE=</literal> match for the device.</para>
96
97       <para>Additional constraints may be added using options
98       <option>--boot</option>, <option>--unit=</option>, etc, to
99       further limit what entries will be shown (logical AND).</para>
100
101       <para>Output is interleaved from all accessible journal files,
102       whether they are rotated or currently being written, and
103       regardless of whether they belong to the system itself or are
104       accessible user journals.</para>
105
106       <para>The set of journal files which will be used can be
107       modified using the <option>--user</option>,
108       <option>--system</option>, <option>--directory</option>, and
109       <option>--file</option> options, see below.</para>
110
111       <para>All users are granted access to their private per-user
112       journals. However, by default, only root and users who are
113       members of the <literal>systemd-journal</literal> group get
114       access to the system journal and the journals of other
115       users.</para>
116
117       <para>The output is paged through <command>less</command> by
118       default, and long lines are "truncated" to screen width. The
119       hidden part can be viewed by using the left-arrow and
120       right-arrow keys. Paging can be disabled; see the
121       <option>--no-pager</option> option and the "Environment" section
122       below.</para>
123
124       <para>When outputting to a tty, lines are colored according to
125       priority: lines of level ERROR and higher are colored red; lines
126       of level NOTICE and higher are highlighted; other lines are
127       displayed normally.</para>
128     </refsect1>
129
130     <refsect1>
131       <title>Options</title>
132
133       <para>The following options are understood:</para>
134
135       <variablelist>
136         <varlistentry>
137           <term><option>--no-full</option></term>
138           <term><option>--full</option></term>
139           <term><option>-l</option></term>
140
141           <listitem><para>Ellipsize fields when they do not fit in
142           available columns.  The default is to show full fields,
143           allowing them to wrap or be truncated by the pager, if one
144           is used.</para>
145
146           <para>The old options
147           <option>-l</option>/<option>--full</option> are not useful
148           anymore, except to undo <option>--no-full</option>.</para>
149           </listitem>
150         </varlistentry>
151
152         <varlistentry>
153           <term><option>-a</option></term>
154           <term><option>--all</option></term>
155
156           <listitem><para>Show all fields in full, even if they
157           include unprintable characters or are very
158           long.</para></listitem>
159         </varlistentry>
160
161         <varlistentry>
162           <term><option>-f</option></term>
163           <term><option>--follow</option></term>
164
165           <listitem><para>Show only the most recent journal entries,
166           and continuously print new entries as they are appended to
167           the journal.</para></listitem>
168         </varlistentry>
169
170         <varlistentry>
171           <term><option>-e</option></term>
172           <term><option>--pager-end</option></term>
173
174           <listitem><para>Immediately jump to the end of the journal
175           inside the implied pager tool. This implies
176           <option>-n1000</option> to guarantee that the pager will not
177           buffer logs of unbounded size. This may be overridden with
178           an explicit <option>-n</option> with some other numeric
179           value while <option>-nall</option> will disable this cap.
180           Note that this option is only supported for the
181           <citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
182           pager.</para></listitem>
183         </varlistentry>
184
185         <varlistentry>
186           <term><option>-n</option></term>
187           <term><option>--lines=</option></term>
188
189           <listitem><para>Show the most recent journal events and
190           limit the number of events shown. If
191           <option>--follow</option> is used, this option is
192           implied. The argument is a positive integer or
193           <literal>all</literal> to disable line limiting. The default
194           value is 10 if no argument is given.</para></listitem>
195         </varlistentry>
196
197         <varlistentry>
198           <term><option>--no-tail</option></term>
199
200           <listitem><para>Show all stored output lines, even in follow
201           mode. Undoes the effect of <option>--lines=</option>.
202           </para></listitem>
203         </varlistentry>
204
205         <varlistentry>
206           <term><option>-r</option></term>
207           <term><option>--reverse</option></term>
208
209           <listitem><para>Reverse output so that the newest entries
210           are displayed first.</para></listitem>
211         </varlistentry>
212
213         <varlistentry>
214           <term><option>-o</option></term>
215           <term><option>--output=</option></term>
216
217           <listitem><para>Controls the formatting of the journal
218           entries that are shown. Takes one of the following
219           options:</para>
220           <variablelist>
221             <varlistentry>
222               <term>
223                 <option>short</option>
224               </term>
225               <listitem>
226                 <para>is the default and generates an output that is
227                 mostly identical to the formatting of classic syslog
228                 files, showing one line per journal entry.</para>
229               </listitem>
230             </varlistentry>
231
232             <varlistentry>
233               <term>
234                 <option>short-iso</option>
235               </term>
236               <listitem>
237                 <para>is very similar, but shows ISO 8601 wallclock
238                 timestamps.</para>
239               </listitem>
240             </varlistentry>
241
242             <varlistentry>
243               <term>
244                 <option>short-precise</option>
245               </term>
246               <listitem>
247                 <para>is very similar, but shows timestamps with full
248                 microsecond precision.</para>
249               </listitem>
250             </varlistentry>
251
252             <varlistentry>
253               <term>
254                 <option>short-monotonic</option>
255               </term>
256               <listitem>
257                 <para>is very similar, but shows monotonic timestamps
258                 instead of wallclock timestamps.</para>
259               </listitem>
260             </varlistentry>
261
262             <varlistentry>
263               <term>
264                 <option>verbose</option>
265               </term>
266               <listitem>
267                 <para>shows the full-structured entry items with all
268                 fields.</para>
269               </listitem>
270             </varlistentry>
271
272             <varlistentry>
273               <term>
274                 <option>export</option>
275               </term>
276               <listitem>
277                 <para>serializes the journal into a binary (but mostly
278                 text-based) stream suitable for backups and network
279                 transfer (see
280                 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format</ulink>
281                 for more information).</para>
282               </listitem>
283             </varlistentry>
284
285             <varlistentry>
286               <term>
287                 <option>json</option>
288               </term>
289               <listitem>
290                 <para>formats entries as JSON data structures, one per
291                 line (see
292                 <ulink url="http://www.freedesktop.org/wiki/Software/systemd/json">Journal JSON Format</ulink>
293                 for more information).</para>
294               </listitem>
295             </varlistentry>
296
297             <varlistentry>
298               <term>
299                 <option>json-pretty</option>
300               </term>
301               <listitem>
302                 <para>formats entries as JSON data structures, but
303                 formats them in multiple lines in order to make them
304                 more readable by humans.</para>
305               </listitem>
306             </varlistentry>
307
308             <varlistentry>
309               <term>
310                 <option>json-sse</option>
311               </term>
312               <listitem>
313                 <para>formats entries as JSON data structures, but wraps
314                 them in a format suitable for
315                 <ulink url="https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events">Server-Sent Events</ulink>.
316                 </para>
317               </listitem>
318             </varlistentry>
319
320             <varlistentry>
321               <term>
322                 <option>cat</option>
323               </term>
324               <listitem>
325                 <para>generates a very terse output, only showing the
326                 actual message of each journal entry with no metadata,
327                 not even a timestamp.</para>
328               </listitem>
329             </varlistentry>
330           </variablelist>
331         </listitem>
332       </varlistentry>
333
334       <varlistentry>
335         <term><option>--utc</option></term>
336
337         <listitem><para>Express time in Coordinated Universal Time
338         (UTC).</para></listitem>
339       </varlistentry>
340
341       <varlistentry>
342         <term><option>-x</option></term>
343         <term><option>--catalog</option></term>
344
345         <listitem><para>Augment log lines with explanation texts from
346         the message catalog. This will add explanatory help texts to
347         log messages in the output where this is available. These
348         short help texts will explain the context of an error or log
349         event, possible solutions, as well as pointers to support
350         forums, developer documentation, and any other relevant
351         manuals. Note that help texts are not available for all
352         messages, but only for selected ones. For more information on
353         the message catalog, please refer to the
354         <ulink url="http://www.freedesktop.org/wiki/Software/systemd/catalog">Message Catalog Developer Documentation</ulink>.</para>
355
356         <para>Note: when attaching <command>journalctl</command>
357         output to bug reports, please do <emphasis>not</emphasis> use
358         <option>-x</option>.</para>
359         </listitem>
360       </varlistentry>
361
362       <varlistentry>
363         <term><option>-q</option></term>
364         <term><option>--quiet</option></term>
365
366         <listitem><para>Suppresses any warning messages regarding
367         inaccessible system journals when run as a normal
368         user.</para></listitem>
369       </varlistentry>
370
371       <varlistentry>
372         <term><option>-m</option></term>
373         <term><option>--merge</option></term>
374
375         <listitem><para>Show entries interleaved from all available
376         journals, including remote ones.</para></listitem>
377       </varlistentry>
378
379       <varlistentry>
380         <term><option>-b <optional><replaceable>ID</replaceable></optional><optional><replaceable>±offset</replaceable></optional></option></term>
381         <term><option>--boot=<optional><replaceable>ID</replaceable></optional><optional><replaceable>±offset</replaceable></optional></option></term>
382
383         <listitem><para>Show messages from a specific boot. This will
384         add a match for <literal>_BOOT_ID=</literal>.</para>
385
386         <para>The argument may be empty, in which case logs for the
387         current boot will be shown.</para>
388
389         <para>If the boot ID is omitted, a positive
390         <replaceable>offset</replaceable> will look up the boots
391         starting from the beginning of the journal, and a
392         equal-or-less-than zero <replaceable>offset</replaceable> will
393         look up boots starting from the end of the journal. Thus,
394         <constant>1</constant> means the first boot found in the
395         journal in chronological order, <constant>2</constant> the
396         second and so on; while <constant>-0</constant> is the last
397         boot, <constant>-1</constant> the boot before last, and so
398         on. An empty <replaceable>offset</replaceable> is equivalent
399         to specifying <constant>-0</constant>, except when the current
400         boot is not the last boot (e.g. because
401         <option>--directory</option> was specified to look at logs
402         from a different machine).</para>
403
404         <para>If the 32-character <replaceable>ID</replaceable> is
405         specified, it may optionally be followed by
406         <replaceable>offset</replaceable> which identifies the boot
407         relative to the one given by boot
408         <replaceable>ID</replaceable>. Negative values mean earlier
409         boots and a positive values mean later boots. If
410         <replaceable>offset</replaceable> is not specified, a value of
411         zero is assumed, and the logs for the boot given by
412         <replaceable>ID</replaceable> are shown.</para>
413         </listitem>
414       </varlistentry>
415
416       <varlistentry>
417         <term><option>--list-boots</option></term>
418
419         <listitem><para>Show a tabular list of boot numbers (relative to
420         the current boot), their IDs, and the timestamps of the first
421         and last message pertaining to the boot.</para></listitem>
422       </varlistentry>
423
424       <varlistentry>
425         <term><option>-k</option></term>
426         <term><option>--dmesg</option></term>
427
428         <listitem><para>Show only kernel messages. This implies
429         <option>-b</option> and adds the match
430         <literal>_TRANSPORT=kernel</literal>.</para></listitem>
431       </varlistentry>
432
433       <varlistentry>
434         <term><option>-t</option></term>
435         <term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable>|<replaceable>PATTERN</replaceable></option></term>
436
437         <listitem><para>Show messages for the specified syslog
438         identifier <replaceable>SYSLOG_IDENTIFIER</replaceable>, or
439         for any of the messages with a
440         <literal>SYSLOG_IDENTIFIER</literal> matched by
441         <replaceable>PATTERN</replaceable>.</para>
442
443         <para>This parameter can be specified multiple
444         times.</para></listitem>
445       </varlistentry>
446
447       <varlistentry>
448         <term><option>-u</option></term>
449         <term><option>--unit=<replaceable>UNIT</replaceable>|<replaceable>PATTERN</replaceable></option></term>
450
451         <listitem><para>Show messages for the specified systemd unit
452         <replaceable>UNIT</replaceable> (such as a service unit), or
453         for any of the units matched by
454         <replaceable>PATTERN</replaceable>.  If a pattern is
455         specified, a list of unit names found in the journal is
456         compared with the specified pattern and all that match are
457         used. For each unit name, a match is added for messages from
458         the unit
459         (<literal>_SYSTEMD_UNIT=<replaceable>UNIT</replaceable></literal>),
460         along with additional matches for messages from systemd and
461         messages about coredumps for the specified unit.</para>
462
463         <para>This parameter can be specified multiple times.</para>
464         </listitem>
465       </varlistentry>
466
467       <varlistentry>
468         <term><option>--user-unit=</option></term>
469
470         <listitem><para>Show messages for the specified user session
471         unit. This will add a match for messages from the unit
472         (<literal>_SYSTEMD_USER_UNIT=</literal> and
473         <literal>_UID=</literal>) and additional matches for messages
474         from session systemd and messages about coredumps for the
475         specified unit.</para>
476
477         <para>This parameter can be specified multiple times.</para>
478         </listitem>
479       </varlistentry>
480
481       <varlistentry>
482         <term><option>-p</option></term>
483         <term><option>--priority=</option></term>
484
485         <listitem><para>Filter output by message priorities or
486         priority ranges. Takes either a single numeric or textual log
487         level (i.e. between 0/<literal>emerg</literal> and
488         7/<literal>debug</literal>), or a range of numeric/text log
489         levels in the form FROM..TO. The log levels are the usual
490         syslog log levels as documented in
491         <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
492         i.e. <literal>emerg</literal> (0),
493         <literal>alert</literal> (1), <literal>crit</literal> (2),
494         <literal>err</literal> (3), <literal>warning</literal> (4),
495         <literal>notice</literal> (5), <literal>info</literal> (6),
496         <literal>debug</literal> (7). If a single log level is
497         specified, all messages with this log level or a lower (hence
498         more important) log level are shown. If a range is specified,
499         all messages within the range are shown, including both the
500         start and the end value of the range. This will add
501         <literal>PRIORITY=</literal> matches for the specified
502         priorities.</para></listitem>
503       </varlistentry>
504
505       <varlistentry>
506         <term><option>-c</option></term>
507         <term><option>--cursor=</option></term>
508
509         <listitem><para>Start showing entries from the location in the
510         journal specified by the passed cursor.</para></listitem>
511       </varlistentry>
512
513       <varlistentry>
514         <term><option>--after-cursor=</option></term>
515
516         <listitem><para>Start showing entries from the location in the
517         journal <emphasis>after</emphasis> the location specified by
518         the this cursor.  The cursor is shown when the
519         <option>--show-cursor</option> option is used.</para>
520         </listitem>
521       </varlistentry>
522
523       <varlistentry>
524         <term><option>--show-cursor</option></term>
525
526         <listitem><para>The cursor is shown after the last entry after
527         two dashes:</para>
528         <programlisting>-- cursor: s=0639...</programlisting>
529         <para>The format of the cursor is private
530         and subject to change.</para></listitem>
531       </varlistentry>
532
533       <varlistentry>
534         <term><option>--since=</option></term>
535         <term><option>--until=</option></term>
536
537         <listitem><para>Start showing entries on or newer than the
538         specified date, or on or older than the specified date,
539         respectively. Date specifications should be of the format
540         <literal>2012-10-30 18:17:16</literal>.  If the time part is
541         omitted, <literal>00:00:00</literal> is assumed.  If only the
542         seconds component is omitted, <literal>:00</literal> is
543         assumed. If the date component is omitted, the current day is
544         assumed. Alternatively the strings
545         <literal>yesterday</literal>, <literal>today</literal>,
546         <literal>tomorrow</literal> are understood, which refer to
547         00:00:00 of the day before the current day, the current day,
548         or the day after the current day,
549         respectively. <literal>now</literal> refers to the current
550         time. Finally, relative times may be specified, prefixed with
551         <literal>-</literal> or <literal>+</literal>, referring to
552         times before or after the current time, respectively.</para>
553         </listitem>
554       </varlistentry>
555
556       <varlistentry>
557         <term><option>-F</option></term>
558         <term><option>--field=</option></term>
559
560         <listitem><para>Print all possible data values the specified
561         field can take in all entries of the journal.</para></listitem>
562       </varlistentry>
563
564       <varlistentry>
565         <term><option>--system</option></term>
566         <term><option>--user</option></term>
567
568         <listitem><para>Show messages from system services and the
569         kernel (with <option>--system</option>). Show messages from
570         service of current user (with <option>--user</option>).  If
571         neither is specified, show all messages that the user can see.
572         </para></listitem>
573       </varlistentry>
574
575       <varlistentry>
576         <term><option>-M</option></term>
577         <term><option>--machine=</option></term>
578
579         <listitem><para>Show messages from a running, local
580         container. Specify a container name to connect to.</para>
581         </listitem>
582       </varlistentry>
583
584       <varlistentry>
585         <term><option>-D <replaceable>DIR</replaceable></option></term>
586         <term><option>--directory=<replaceable>DIR</replaceable></option></term>
587
588         <listitem><para>Takes a directory path as argument. If
589         specified, journalctl will operate on the specified journal
590         directory <replaceable>DIR</replaceable> instead of the
591         default runtime and system journal paths.</para></listitem>
592       </varlistentry>
593
594       <varlistentry>
595         <term><option>--file=<replaceable>GLOB</replaceable></option></term>
596
597         <listitem><para>Takes a file glob as an argument. If
598         specified, journalctl will operate on the specified journal
599         files matching <replaceable>GLOB</replaceable> instead of the
600         default runtime and system journal paths. May be specified
601         multiple times, in which case files will be suitably
602         interleaved.</para></listitem>
603       </varlistentry>
604
605       <varlistentry>
606         <term><option>--root=<replaceable>ROOT</replaceable></option></term>
607
608         <listitem><para>Takes a directory path as an argument. If
609         specified, journalctl will operate on catalog file hierarchy
610         underneath the specified directory instead of the root
611         directory (e.g. <option>--update-catalog</option> will create
612         <filename><replaceable>ROOT</replaceable>/var/lib/systemd/catalog/database</filename>).
613         </para></listitem>
614       </varlistentry>
615
616       <varlistentry>
617         <term><option>--new-id128</option></term>
618
619         <listitem><para>Instead of showing journal contents, generate
620         a new 128-bit ID suitable for identifying messages. This is
621         intended for usage by developers who need a new identifier for
622         a new message they introduce and want to make
623         recognizable. This will print the new ID in three different
624         formats which can be copied into source code or similar.
625         </para></listitem>
626       </varlistentry>
627
628       <varlistentry>
629         <term><option>--header</option></term>
630
631         <listitem><para>Instead of showing journal contents, show
632         internal header information of the journal fields
633         accessed.</para></listitem>
634       </varlistentry>
635
636       <varlistentry>
637         <term><option>--disk-usage</option></term>
638
639         <listitem><para>Shows the current disk usage of all journal
640         files. This shows the sum of the disk usage of all archived
641         and active journal files.</para></listitem>
642       </varlistentry>
643
644       <varlistentry>
645         <term><option>--vacuum-size=</option></term>
646         <term><option>--vacuum-time=</option></term>
647
648         <listitem><para>Removes archived journal files until the disk
649         space they use falls below the specified size (specified with
650         the usual <literal>K</literal>, <literal>M</literal>,
651         <literal>G</literal>, <literal>T</literal> suffixes), or all
652         journal files contain no data older than the specified
653         timespan (specified with the usual <literal>s</literal>,
654         <literal>min</literal>, <literal>h</literal>,
655         <literal>days</literal>, <literal>months</literal>,
656         <literal>weeks</literal>, <literal>years</literal>
657         suffixes). Note that running <option>--vacuum-size=</option>
658         has only indirect effect on the output shown by
659         <option>--disk-usage</option> as the latter includes active
660         journal files, while the former only operates on archived
661         journal files. <option>--vacuum-size=</option> and
662         <option>--vacuum-time=</option> may be combined in a single
663         invocation to enforce both a size and time limit on the
664         archived journal files.</para></listitem>
665       </varlistentry>
666
667       <varlistentry>
668         <term><option>--list-catalog
669         <optional><replaceable>128-bit-ID...</replaceable></optional>
670         </option></term>
671
672         <listitem><para>List the contents of the message catalog as a
673         table of message IDs, plus their short description strings.
674         </para>
675
676         <para>If any <replaceable>128-bit-ID</replaceable>s are
677         specified, only those entries are shown.</para>
678         </listitem>
679       </varlistentry>
680
681       <varlistentry>
682         <term><option>--dump-catalog
683         <optional><replaceable>128-bit-ID...</replaceable></optional>
684         </option></term>
685
686         <listitem><para>Show the contents of the message catalog, with
687         entries separated by a line consisting of two dashes and the
688         ID (the format is the same as <filename>.catalog</filename>
689         files).</para>
690
691         <para>If any <replaceable>128-bit-ID</replaceable>s are
692         specified, only those entries are shown.</para>
693         </listitem>
694       </varlistentry>
695
696       <varlistentry>
697         <term><option>--update-catalog</option></term>
698
699         <listitem><para>Update the message catalog index. This command
700         needs to be executed each time new catalog files are
701         installed, removed, or updated to rebuild the binary catalog
702         index.</para></listitem>
703       </varlistentry>
704
705       <varlistentry>
706         <term><option>--setup-keys</option></term>
707
708         <listitem><para>Instead of showing journal contents, generate
709         a new key pair for Forward Secure Sealing (FSS). This will
710         generate a sealing key and a verification key. The sealing key
711         is stored in the journal data directory and shall remain on
712         the host. The verification key should be stored
713         externally. Refer to the <option>Seal=</option> option in
714         <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
715         for information on Forward Secure Sealing and for a link to a
716         refereed scholarly paper detailing the cryptographic theory it
717         is based on.</para></listitem>
718       </varlistentry>
719
720       <varlistentry>
721         <term><option>--force</option></term>
722
723         <listitem><para>When <option>--setup-keys</option> is passed
724         and Forward Secure Sealing (FSS) has already been configured,
725         recreate FSS keys.</para></listitem>
726       </varlistentry>
727
728       <varlistentry>
729         <term><option>--interval=</option></term>
730
731         <listitem><para>Specifies the change interval for the sealing
732         key when generating an FSS key pair with
733         <option>--setup-keys</option>. Shorter intervals increase CPU
734         consumption but shorten the time range of undetectable journal
735         alterations. Defaults to 15min.</para></listitem>
736       </varlistentry>
737
738       <varlistentry>
739         <term><option>--verify</option></term>
740
741         <listitem><para>Check the journal file for internal
742         consistency. If the file has been generated with FSS enabled and
743         the FSS verification key has been specified with
744         <option>--verify-key=</option>, authenticity of the journal file
745         is verified.</para></listitem>
746       </varlistentry>
747
748       <varlistentry>
749         <term><option>--verify-key=</option></term>
750
751         <listitem><para>Specifies the FSS verification key to use for
752         the <option>--verify</option> operation.</para></listitem>
753       </varlistentry>
754
755       <varlistentry>
756         <term><option>--flush</option></term>
757
758         <listitem><para>Asks the Journal daemon to flush any log data
759         stored in <filename>/run/log/journal</filename> into
760         <filename>/var/log/journal</filename>, if persistent storage is
761         enabled. This call does not return until the operation is
762         complete.</para></listitem>
763       </varlistentry>
764
765       <xi:include href="standard-options.xml" xpointer="help" />
766       <xi:include href="standard-options.xml" xpointer="version" />
767       <xi:include href="standard-options.xml" xpointer="no-pager" />
768     </variablelist>
769   </refsect1>
770
771   <refsect1>
772     <title>Exit status</title>
773
774     <para>On success, 0 is returned; otherwise, a non-zero failure
775     code is returned.</para>
776   </refsect1>
777
778   <xi:include href="less-variables.xml" />
779
780   <refsect1>
781     <title>Examples</title>
782
783     <para>Without arguments, all collected logs are shown
784     unfiltered:</para>
785
786     <programlisting>journalctl</programlisting>
787
788     <para>With one match specified, all entries with a field matching
789     the expression are shown:</para>
790
791     <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service</programlisting>
792
793     <para>If two different fields are matched, only entries matching
794     both expressions at the same time are shown:</para>
795
796     <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097</programlisting>
797
798     <para>If two matches refer to the same field, all entries matching
799     either expression are shown:</para>
800
801     <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service</programlisting>
802
803     <para>If the separator <literal>+</literal> is used, two
804     expressions may be combined in a logical OR. The following will
805     show all messages from the Avahi service process with the PID
806     28097 plus all messages from the D-Bus service (from any of its
807     processes):</para>
808
809     <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</programlisting>
810
811     <para>Show all logs generated by the D-Bus executable:</para>
812
813     <programlisting>journalctl /usr/bin/dbus-daemon</programlisting>
814
815     <para>Show all logs of the kernel device node
816     <filename noindex='true'>/dev/sda</filename>:</para>
817
818     <programlisting>journalctl /dev/sda</programlisting>
819
820     <para>Show all kernel logs from previous boot:</para>
821
822     <programlisting>journalctl -k -b -1</programlisting>
823
824     <para>Show a live log display from a system service
825     <filename>apache.service</filename>:</para>
826
827     <programlisting>journalctl -f -u apache</programlisting>
828
829   </refsect1>
830
831   <refsect1>
832     <title>See Also</title>
833     <para>
834       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
835       <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
836       <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
837       <citerefentry><refentrytitle>coredumpctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
838       <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
839       <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
840     </para>
841   </refsect1>
842 </refentry>