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">
6 SPDX-License-Identifier: LGPL-2.1+
8 This file is part of systemd.
10 Copyright 2012 Lennart Poettering
12 systemd is free software; you can redistribute it and/or modify it
13 under the terms of the GNU Lesser General Public License as published by
14 the Free Software Foundation; either version 2.1 of the License, or
15 (at your option) any later version.
17 systemd is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with systemd; If not, see <http://www.gnu.org/licenses/>.
26 <refentry id=
"journalctl"
27 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
30 <title>journalctl
</title>
31 <productname>systemd
</productname>
35 <contrib>Developer
</contrib>
36 <firstname>Lennart
</firstname>
37 <surname>Poettering
</surname>
38 <email>lennart@poettering.net
</email>
44 <refentrytitle>journalctl
</refentrytitle>
45 <manvolnum>1</manvolnum>
49 <refname>journalctl
</refname>
50 <refpurpose>Query the systemd journal
</refpurpose>
55 <command>journalctl
</command>
56 <arg choice=
"opt" rep=
"repeat">OPTIONS
</arg>
57 <arg choice=
"opt" rep=
"repeat">MATCHES
</arg>
62 <title>Description
</title>
64 <para><command>journalctl
</command> may be used to query the
66 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
68 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
70 <para>If called without parameters, it will show the full
71 contents of the journal, starting with the oldest entry
74 <para>If one or more match arguments are passed, the output is
75 filtered accordingly. A match is in the format
76 <literal>FIELD=VALUE
</literal>,
77 e.g.
<literal>_SYSTEMD_UNIT=httpd.service
</literal>, referring
78 to the components of a structured journal entry. See
79 <citerefentry><refentrytitle>systemd.journal-fields
</refentrytitle><manvolnum>7</manvolnum></citerefentry>
80 for a list of well-known fields. If multiple matches are
81 specified matching different fields, the log entries are
82 filtered by both, i.e. the resulting output will show only
83 entries matching all the specified matches of this kind. If two
84 matches apply to the same field, then they are automatically
85 matched as alternatives, i.e. the resulting output will show
86 entries matching any of the specified matches for the same
87 field. Finally, the character
<literal>+
</literal> may appear
88 as a separate word between other terms on the command line. This
89 causes all matches before and after to be combined in a
90 disjunction (i.e. logical OR).
</para>
92 <para>It is also possible to filter the entries by specifying an
93 absolute file path as an argument. The file path may be a file or
94 a symbolic link and the file must exist at the time of the query. If a
95 file path refers to an executable binary, an
<literal>_EXE=
</literal>
96 match for the canonicalized binary path is added to the query. If a
97 file path refers to an executable script, a
<literal>_COMM=
</literal>
98 match for the script name is added to the query. If a file path
99 refers to a device node,
<literal>_KERNEL_DEVICE=
</literal> matches for
100 the kernel name of the device and for each of its ancestor devices is
101 added to the query. Symbolic links are dereferenced, kernel names are
102 synthesized, and parent devices are identified from the environment at
103 the time of the query. In general, a device node is the best proxy for
104 an actual device, as log entries do not usually contain fields that
105 identify an actual device. For the resulting log entries to be correct
106 for the actual device, the relevant parts of the environment at the time
107 the entry was logged, in particular the actual device corresponding to
108 the device node, must have been the same as those at the time of the
109 query. Because device nodes generally change their corresponding devices
110 across reboots, specifying a device node path causes the resulting
111 entries to be restricted to those from the current boot.
</para>
113 <para>Additional constraints may be added using options
114 <option>--boot
</option>,
<option>--unit=
</option>, etc., to
115 further limit what entries will be shown (logical AND).
</para>
117 <para>Output is interleaved from all accessible journal files,
118 whether they are rotated or currently being written, and
119 regardless of whether they belong to the system itself or are
120 accessible user journals.
</para>
122 <para>The set of journal files which will be used can be
123 modified using the
<option>--user
</option>,
124 <option>--system
</option>,
<option>--directory
</option>, and
125 <option>--file
</option> options, see below.
</para>
127 <para>All users are granted access to their private per-user
128 journals. However, by default, only root and users who are
129 members of a few special groups are granted access to the system
130 journal and the journals of other users. Members of the groups
131 <literal>systemd-journal
</literal>,
<literal>adm
</literal>, and
132 <literal>wheel
</literal> can read all journal files. Note
133 that the two latter groups traditionally have additional
134 privileges specified by the distribution. Members of the
135 <literal>wheel
</literal> group can often perform administrative
138 <para>The output is paged through
<command>less
</command> by
139 default, and long lines are
"truncated" to screen width. The
140 hidden part can be viewed by using the left-arrow and
141 right-arrow keys. Paging can be disabled; see the
142 <option>--no-pager
</option> option and the
"Environment" section
145 <para>When outputting to a tty, lines are colored according to
146 priority: lines of level ERROR and higher are colored red; lines
147 of level NOTICE and higher are highlighted; other lines are
148 displayed normally.
</para>
152 <title>Options
</title>
154 <para>The following options are understood:
</para>
158 <term><option>--no-full
</option></term>
159 <term><option>--full
</option></term>
160 <term><option>-l
</option></term>
162 <listitem><para>Ellipsize fields when they do not fit in
163 available columns. The default is to show full fields,
164 allowing them to wrap or be truncated by the pager, if one
167 <para>The old options
168 <option>-l
</option>/
<option>--full
</option> are not useful
169 anymore, except to undo
<option>--no-full
</option>.
</para>
174 <term><option>-a
</option></term>
175 <term><option>--all
</option></term>
177 <listitem><para>Show all fields in full, even if they
178 include unprintable characters or are very
179 long.
</para></listitem>
183 <term><option>-f
</option></term>
184 <term><option>--follow
</option></term>
186 <listitem><para>Show only the most recent journal entries,
187 and continuously print new entries as they are appended to
188 the journal.
</para></listitem>
192 <term><option>-e
</option></term>
193 <term><option>--pager-end
</option></term>
195 <listitem><para>Immediately jump to the end of the journal
196 inside the implied pager tool. This implies
197 <option>-n1000
</option> to guarantee that the pager will not
198 buffer logs of unbounded size. This may be overridden with
199 an explicit
<option>-n
</option> with some other numeric
200 value, while
<option>-nall
</option> will disable this cap.
201 Note that this option is only supported for the
202 <citerefentry project='man-pages'
><refentrytitle>less
</refentrytitle><manvolnum>1</manvolnum></citerefentry>
203 pager.
</para></listitem>
207 <term><option>-n
</option></term>
208 <term><option>--lines=
</option></term>
210 <listitem><para>Show the most recent journal events and
211 limit the number of events shown. If
212 <option>--follow
</option> is used, this option is
213 implied. The argument is a positive integer or
214 <literal>all
</literal> to disable line limiting. The default
215 value is
10 if no argument is given.
</para></listitem>
219 <term><option>--no-tail
</option></term>
221 <listitem><para>Show all stored output lines, even in follow
222 mode. Undoes the effect of
<option>--lines=
</option>.
227 <term><option>-r
</option></term>
228 <term><option>--reverse
</option></term>
230 <listitem><para>Reverse output so that the newest entries
231 are displayed first.
</para></listitem>
235 <term><option>-o
</option></term>
236 <term><option>--output=
</option></term>
238 <listitem><para>Controls the formatting of the journal
239 entries that are shown. Takes one of the following
244 <option>short
</option>
247 <para>is the default and generates an output that is
248 mostly identical to the formatting of classic syslog
249 files, showing one line per journal entry.
</para>
255 <option>short-full
</option>
258 <para>is very similar, but shows timestamps in the format the
<option>--since=
</option> and
259 <option>--until=
</option> options accept. Unlike the timestamp information shown in
260 <option>short
</option> output mode this mode includes weekday, year and timezone information in the
261 output, and is locale-independent.
</para>
267 <option>short-iso
</option>
270 <para>is very similar, but shows ISO
8601 wallclock
277 <option>short-iso-precise
</option>
280 <para>as for
<option>short-iso
</option> but includes full
281 microsecond precision.
</para>
287 <option>short-precise
</option>
290 <para>is very similar, but shows classic syslog timestamps
291 with full microsecond precision.
</para>
297 <option>short-monotonic
</option>
300 <para>is very similar, but shows monotonic timestamps
301 instead of wallclock timestamps.
</para>
307 <option>short-unix
</option>
310 <para>is very similar, but shows seconds passed since January
1st
1970 UTC instead of wallclock
311 timestamps (
"UNIX time"). The time is shown with microsecond accuracy.
</para>
317 <option>verbose
</option>
320 <para>shows the full-structured entry items with all
327 <option>export
</option>
330 <para>serializes the journal into a binary (but mostly
331 text-based) stream suitable for backups and network
333 <ulink url=
"https://www.freedesktop.org/wiki/Software/systemd/export">Journal Export Format
</ulink>
334 for more information). To import the binary stream back
335 into native journald format use
336 <citerefentry><refentrytitle>systemd-journal-remote
</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
</para>
342 <option>json
</option>
345 <para>formats entries as JSON data structures, one per
347 <ulink url=
"https://www.freedesktop.org/wiki/Software/systemd/json">Journal JSON Format
</ulink>
348 for more information).
</para>
354 <option>json-pretty
</option>
357 <para>formats entries as JSON data structures, but
358 formats them in multiple lines in order to make them
359 more readable by humans.
</para>
365 <option>json-sse
</option>
368 <para>formats entries as JSON data structures, but wraps
369 them in a format suitable for
370 <ulink url=
"https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events">Server-Sent Events
</ulink>.
380 <para>generates a very terse output, only showing the
381 actual message of each journal entry with no metadata,
382 not even a timestamp.
</para>
390 <term><option>--output-fields=
</option></term>
392 <listitem><para>A comma separated list of the fields which should
393 be included in the output. This only has an effect for the output modes
394 which would normally show all fields (
<option>verbose
</option>,
395 <option>export
</option>,
<option>json
</option>,
396 <option>json-pretty
</option>, and
<option>json-sse
</option>). The
397 <literal>__CURSOR
</literal>,
<literal>__REALTIME_TIMESTAMP
</literal>,
398 <literal>__MONOTONIC_TIMESTAMP
</literal>, and
399 <literal>_BOOT_ID
</literal> fields are always
400 printed.
</para></listitem>
404 <term><option>--utc
</option></term>
406 <listitem><para>Express time in Coordinated Universal Time
407 (UTC).
</para></listitem>
411 <term><option>--no-hostname
</option></term>
413 <listitem><para>Don't show the hostname field of log messages originating from the local host. This switch only
414 has an effect on the
<option>short
</option> family of output modes (see above).
</para></listitem>
418 <term><option>-x
</option></term>
419 <term><option>--catalog
</option></term>
421 <listitem><para>Augment log lines with explanation texts from
422 the message catalog. This will add explanatory help texts to
423 log messages in the output where this is available. These
424 short help texts will explain the context of an error or log
425 event, possible solutions, as well as pointers to support
426 forums, developer documentation, and any other relevant
427 manuals. Note that help texts are not available for all
428 messages, but only for selected ones. For more information on
429 the message catalog, please refer to the
430 <ulink url=
"https://www.freedesktop.org/wiki/Software/systemd/catalog">Message Catalog Developer Documentation
</ulink>.
</para>
432 <para>Note: when attaching
<command>journalctl
</command>
433 output to bug reports, please do
<emphasis>not
</emphasis> use
434 <option>-x
</option>.
</para>
439 <term><option>-q
</option></term>
440 <term><option>--quiet
</option></term>
442 <listitem><para>Suppresses all informational messages
443 (i.e.
"-- Logs begin at …",
"-- Reboot --"),
444 any warning messages regarding
445 inaccessible system journals when run as a normal
446 user.
</para></listitem>
450 <term><option>-m
</option></term>
451 <term><option>--merge
</option></term>
453 <listitem><para>Show entries interleaved from all available
454 journals, including remote ones.
</para></listitem>
458 <term><option>-b
<optional><replaceable>ID
</replaceable></optional><optional><replaceable>±offset
</replaceable></optional></option></term>
459 <term><option>--boot=
<optional><replaceable>ID
</replaceable></optional><optional><replaceable>±offset
</replaceable></optional></option></term>
461 <listitem><para>Show messages from a specific boot. This will
462 add a match for
<literal>_BOOT_ID=
</literal>.
</para>
464 <para>The argument may be empty, in which case logs for the
465 current boot will be shown.
</para>
467 <para>If the boot ID is omitted, a positive
468 <replaceable>offset
</replaceable> will look up the boots
469 starting from the beginning of the journal, and an
470 equal-or-less-than zero
<replaceable>offset
</replaceable> will
471 look up boots starting from the end of the journal. Thus,
472 <constant>1</constant> means the first boot found in the
473 journal in chronological order,
<constant>2</constant> the
474 second and so on; while
<constant>-
0</constant> is the last
475 boot,
<constant>-
1</constant> the boot before last, and so
476 on. An empty
<replaceable>offset
</replaceable> is equivalent
477 to specifying
<constant>-
0</constant>, except when the current
478 boot is not the last boot (e.g. because
479 <option>--directory
</option> was specified to look at logs
480 from a different machine).
</para>
482 <para>If the
32-character
<replaceable>ID
</replaceable> is
483 specified, it may optionally be followed by
484 <replaceable>offset
</replaceable> which identifies the boot
485 relative to the one given by boot
486 <replaceable>ID
</replaceable>. Negative values mean earlier
487 boots and positive values mean later boots. If
488 <replaceable>offset
</replaceable> is not specified, a value of
489 zero is assumed, and the logs for the boot given by
490 <replaceable>ID
</replaceable> are shown.
</para>
495 <term><option>--list-boots
</option></term>
497 <listitem><para>Show a tabular list of boot numbers (relative to
498 the current boot), their IDs, and the timestamps of the first
499 and last message pertaining to the boot.
</para></listitem>
503 <term><option>-k
</option></term>
504 <term><option>--dmesg
</option></term>
506 <listitem><para>Show only kernel messages. This implies
507 <option>-b
</option> and adds the match
508 <literal>_TRANSPORT=kernel
</literal>.
</para></listitem>
512 <term><option>-t
</option></term>
513 <term><option>--identifier=
<replaceable>SYSLOG_IDENTIFIER
</replaceable></option></term>
515 <listitem><para>Show messages for the specified syslog
517 <replaceable>SYSLOG_IDENTIFIER
</replaceable>.
</para>
519 <para>This parameter can be specified multiple
520 times.
</para></listitem>
524 <term><option>-u
</option></term>
525 <term><option>--unit=
<replaceable>UNIT
</replaceable>|
<replaceable>PATTERN
</replaceable></option></term>
527 <listitem><para>Show messages for the specified systemd unit
528 <replaceable>UNIT
</replaceable> (such as a service unit), or
529 for any of the units matched by
530 <replaceable>PATTERN
</replaceable>. If a pattern is
531 specified, a list of unit names found in the journal is
532 compared with the specified pattern and all that match are
533 used. For each unit name, a match is added for messages from
535 (
<literal>_SYSTEMD_UNIT=
<replaceable>UNIT
</replaceable></literal>),
536 along with additional matches for messages from systemd and
537 messages about coredumps for the specified unit.
</para>
539 <para>This parameter can be specified multiple times.
</para>
544 <term><option>--user-unit=
</option></term>
546 <listitem><para>Show messages for the specified user session
547 unit. This will add a match for messages from the unit
548 (
<literal>_SYSTEMD_USER_UNIT=
</literal> and
549 <literal>_UID=
</literal>) and additional matches for messages
550 from session systemd and messages about coredumps for the
551 specified unit.
</para>
553 <para>This parameter can be specified multiple times.
</para>
558 <term><option>-p
</option></term>
559 <term><option>--priority=
</option></term>
561 <listitem><para>Filter output by message priorities or
562 priority ranges. Takes either a single numeric or textual log
563 level (i.e. between
0/
<literal>emerg
</literal> and
564 7/
<literal>debug
</literal>), or a range of numeric/text log
565 levels in the form FROM..TO. The log levels are the usual
566 syslog log levels as documented in
567 <citerefentry project='man-pages'
><refentrytitle>syslog
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
568 i.e.
<literal>emerg
</literal> (
0),
569 <literal>alert
</literal> (
1),
<literal>crit
</literal> (
2),
570 <literal>err
</literal> (
3),
<literal>warning
</literal> (
4),
571 <literal>notice
</literal> (
5),
<literal>info
</literal> (
6),
572 <literal>debug
</literal> (
7). If a single log level is
573 specified, all messages with this log level or a lower (hence
574 more important) log level are shown. If a range is specified,
575 all messages within the range are shown, including both the
576 start and the end value of the range. This will add
577 <literal>PRIORITY=
</literal> matches for the specified
578 priorities.
</para></listitem>
582 <term><option>-g
</option></term>
583 <term><option>--grep=
</option></term>
585 <listitem><para>Filter output to entries where the
<varname>MESSAGE=
</varname>
586 field matches the specified regular expression. PERL-compatible regular expressions
588 <citerefentry><refentrytitle>pcre2pattern
</refentrytitle><manvolnum>3</manvolnum></citerefentry>
589 for a detailed description of the syntax.
</para>
591 <para>If the pattern is all lowercase, matching is case insensitive.
592 Otherwise, matching is case sensitive. This can be overridden with the
593 <option>--case-sensitive
</option> option, see below.
</para>
598 <term><option>--case-sensitive
<optional>=BOOLEAN
</optional></option></term>
600 <listitem><para>Make pattern matching case sensitive or case insenstive.
</para>
605 <term><option>-c
</option></term>
606 <term><option>--cursor=
</option></term>
608 <listitem><para>Start showing entries from the location in the
609 journal specified by the passed cursor.
</para></listitem>
613 <term><option>--after-cursor=
</option></term>
615 <listitem><para>Start showing entries from the location in the
616 journal
<emphasis>after
</emphasis> the location specified by
617 the passed cursor. The cursor is shown when the
618 <option>--show-cursor
</option> option is used.
</para>
623 <term><option>--show-cursor
</option></term>
625 <listitem><para>The cursor is shown after the last entry after
627 <programlisting>-- cursor: s=
0639…
</programlisting>
628 <para>The format of the cursor is private
629 and subject to change.
</para></listitem>
633 <term><option>-S
</option></term>
634 <term><option>--since=
</option></term>
635 <term><option>-U
</option></term>
636 <term><option>--until=
</option></term>
638 <listitem><para>Start showing entries on or newer than the specified date, or on or older than the specified
639 date, respectively. Date specifications should be of the format
<literal>2012-
10-
30 18:
17:
16</literal>. If the
640 time part is omitted,
<literal>00:
00:
00</literal> is assumed. If only the seconds component is omitted,
641 <literal>:
00</literal> is assumed. If the date component is omitted, the current day is assumed. Alternatively
642 the strings
<literal>yesterday
</literal>,
<literal>today
</literal>,
<literal>tomorrow
</literal> are understood,
643 which refer to
00:
00:
00 of the day before the current day, the current day, or the day after the current day,
644 respectively.
<literal>now
</literal> refers to the current time. Finally, relative times may be specified,
645 prefixed with
<literal>-
</literal> or
<literal>+
</literal>, referring to times before or after the current
646 time, respectively. For complete time and date specification, see
647 <citerefentry><refentrytitle>systemd.time
</refentrytitle><manvolnum>7</manvolnum></citerefentry>. Note that
648 <option>--output=short-full
</option> prints timestamps that follow precisely this format.
654 <term><option>-F
</option></term>
655 <term><option>--field=
</option></term>
657 <listitem><para>Print all possible data values the specified
658 field can take in all entries of the journal.
</para></listitem>
662 <term><option>-N
</option></term>
663 <term><option>--fields
</option></term>
665 <listitem><para>Print all field names currently used in all entries of the journal.
</para></listitem>
669 <term><option>--system
</option></term>
670 <term><option>--user
</option></term>
672 <listitem><para>Show messages from system services and the
673 kernel (with
<option>--system
</option>). Show messages from
674 service of current user (with
<option>--user
</option>). If
675 neither is specified, show all messages that the user can see.
680 <term><option>-M
</option></term>
681 <term><option>--machine=
</option></term>
683 <listitem><para>Show messages from a running, local
684 container. Specify a container name to connect to.
</para>
689 <term><option>-D
<replaceable>DIR
</replaceable></option></term>
690 <term><option>--directory=
<replaceable>DIR
</replaceable></option></term>
692 <listitem><para>Takes a directory path as argument. If
693 specified, journalctl will operate on the specified journal
694 directory
<replaceable>DIR
</replaceable> instead of the
695 default runtime and system journal paths.
</para></listitem>
699 <term><option>--file=
<replaceable>GLOB
</replaceable></option></term>
701 <listitem><para>Takes a file glob as an argument. If
702 specified, journalctl will operate on the specified journal
703 files matching
<replaceable>GLOB
</replaceable> instead of the
704 default runtime and system journal paths. May be specified
705 multiple times, in which case files will be suitably
706 interleaved.
</para></listitem>
710 <term><option>--root=
<replaceable>ROOT
</replaceable></option></term>
712 <listitem><para>Takes a directory path as an argument. If
713 specified, journalctl will operate on journal directories and catalog file hierarchy
714 underneath the specified directory instead of the root
715 directory (e.g.
<option>--update-catalog
</option> will create
716 <filename><replaceable>ROOT
</replaceable>/var/lib/systemd/catalog/database
</filename>,
717 and journal files under
<filename><replaceable>ROOT
</replaceable>/run/journal
</filename>
718 or
<filename><replaceable>ROOT
</replaceable>/var/log/journal
</filename> will be displayed).
723 <term><option>--new-id128
</option></term>
725 <listitem><para>Instead of showing journal contents, generate
726 a new
128-bit ID suitable for identifying messages. This is
727 intended for usage by developers who need a new identifier for
728 a new message they introduce and want to make
729 recognizable. This will print the new ID in four different
730 formats which can be copied into source code or similar.
735 <term><option>--header
</option></term>
737 <listitem><para>Instead of showing journal contents, show
738 internal header information of the journal fields
739 accessed.
</para></listitem>
743 <term><option>--disk-usage
</option></term>
745 <listitem><para>Shows the current disk usage of all journal
746 files. This shows the sum of the disk usage of all archived
747 and active journal files.
</para></listitem>
751 <term><option>--vacuum-size=
</option></term>
752 <term><option>--vacuum-time=
</option></term>
753 <term><option>--vacuum-files=
</option></term>
755 <listitem><para>Removes archived journal files until the disk
756 space they use falls below the specified size (specified with
757 the usual
<literal>K
</literal>,
<literal>M
</literal>,
758 <literal>G
</literal> and
<literal>T
</literal> suffixes), or all
759 archived journal files contain no data older than the specified
760 timespan (specified with the usual
<literal>s
</literal>,
761 <literal>m
</literal>,
<literal>h
</literal>,
762 <literal>days
</literal>,
<literal>months
</literal>,
763 <literal>weeks
</literal> and
<literal>years
</literal> suffixes),
764 or no more than the specified number of separate journal files
765 remain. Note that running
<option>--vacuum-size=
</option> has
766 only an indirect effect on the output shown by
767 <option>--disk-usage
</option>, as the latter includes active
768 journal files, while the vacuuming operation only operates
769 on archived journal files. Similarly,
770 <option>--vacuum-files=
</option> might not actually reduce the
771 number of journal files to below the specified number, as it
772 will not remove active journal
773 files.
<option>--vacuum-size=
</option>,
774 <option>--vacuum-time=
</option> and
775 <option>--vacuum-files=
</option> may be combined in a single
776 invocation to enforce any combination of a size, a time and a
777 number of files limit on the archived journal
778 files. Specifying any of these three parameters as zero is
779 equivalent to not enforcing the specific limit, and is thus
780 redundant.
</para></listitem>
784 <term><option>--list-catalog
785 <optional><replaceable>128-bit-ID…
</replaceable></optional>
788 <listitem><para>List the contents of the message catalog as a
789 table of message IDs, plus their short description strings.
792 <para>If any
<replaceable>128-bit-ID
</replaceable>s are
793 specified, only those entries are shown.
</para>
798 <term><option>--dump-catalog
799 <optional><replaceable>128-bit-ID…
</replaceable></optional>
802 <listitem><para>Show the contents of the message catalog, with
803 entries separated by a line consisting of two dashes and the
804 ID (the format is the same as
<filename>.catalog
</filename>
807 <para>If any
<replaceable>128-bit-ID
</replaceable>s are
808 specified, only those entries are shown.
</para>
813 <term><option>--update-catalog
</option></term>
815 <listitem><para>Update the message catalog index. This command
816 needs to be executed each time new catalog files are
817 installed, removed, or updated to rebuild the binary catalog
818 index.
</para></listitem>
822 <term><option>--setup-keys
</option></term>
824 <listitem><para>Instead of showing journal contents, generate
825 a new key pair for Forward Secure Sealing (FSS). This will
826 generate a sealing key and a verification key. The sealing key
827 is stored in the journal data directory and shall remain on
828 the host. The verification key should be stored
829 externally. Refer to the
<option>Seal=
</option> option in
830 <citerefentry><refentrytitle>journald.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>
831 for information on Forward Secure Sealing and for a link to a
832 refereed scholarly paper detailing the cryptographic theory it
833 is based on.
</para></listitem>
837 <term><option>--force
</option></term>
839 <listitem><para>When
<option>--setup-keys
</option> is passed
840 and Forward Secure Sealing (FSS) has already been configured,
841 recreate FSS keys.
</para></listitem>
845 <term><option>--interval=
</option></term>
847 <listitem><para>Specifies the change interval for the sealing
848 key when generating an FSS key pair with
849 <option>--setup-keys
</option>. Shorter intervals increase CPU
850 consumption but shorten the time range of undetectable journal
851 alterations. Defaults to
15min.
</para></listitem>
855 <term><option>--verify
</option></term>
857 <listitem><para>Check the journal file for internal
858 consistency. If the file has been generated with FSS enabled and
859 the FSS verification key has been specified with
860 <option>--verify-key=
</option>, authenticity of the journal file
861 is verified.
</para></listitem>
865 <term><option>--verify-key=
</option></term>
867 <listitem><para>Specifies the FSS verification key to use for
868 the
<option>--verify
</option> operation.
</para></listitem>
872 <term><option>--sync
</option></term>
874 <listitem><para>Asks the journal daemon to write all yet
875 unwritten journal data to the backing file system and
876 synchronize all journals. This call does not return until the
877 synchronization operation is complete. This command guarantees
878 that any log messages written before its invocation are safely
879 stored on disk at the time it returns.
</para></listitem>
883 <term><option>--flush
</option></term>
885 <listitem><para>Asks the journal daemon to flush any log data
886 stored in
<filename>/run/log/journal
</filename> into
887 <filename>/var/log/journal
</filename>, if persistent storage
888 is enabled. This call does not return until the operation is
889 complete. Note that this call is idempotent: the data is only
890 flushed from
<filename>/run/log/journal
</filename> into
891 <filename>/var/log/journal
</filename> once during system
892 runtime, and this command exits cleanly without executing any
893 operation if this has already happened. This command
894 effectively guarantees that all data is flushed to
895 <filename>/var/log/journal
</filename> at the time it
896 returns.
</para></listitem>
900 <term><option>--rotate
</option></term>
902 <listitem><para>Asks the journal daemon to rotate journal
903 files. This call does not return until the rotation operation
904 is complete.
</para></listitem>
907 <xi:include href=
"standard-options.xml" xpointer=
"help" />
908 <xi:include href=
"standard-options.xml" xpointer=
"version" />
909 <xi:include href=
"standard-options.xml" xpointer=
"no-pager" />
914 <title>Exit status
</title>
916 <para>On success,
0 is returned; otherwise, a non-zero failure
917 code is returned.
</para>
920 <xi:include href=
"less-variables.xml" />
923 <title>Examples
</title>
925 <para>Without arguments, all collected logs are shown
928 <programlisting>journalctl
</programlisting>
930 <para>With one match specified, all entries with a field matching
931 the expression are shown:
</para>
933 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service
</programlisting>
935 <para>If two different fields are matched, only entries matching
936 both expressions at the same time are shown:
</para>
938 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=
28097</programlisting>
940 <para>If two matches refer to the same field, all entries matching
941 either expression are shown:
</para>
943 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service
</programlisting>
945 <para>If the separator
<literal>+
</literal> is used, two
946 expressions may be combined in a logical OR. The following will
947 show all messages from the Avahi service process with the PID
948 28097 plus all messages from the D-Bus service (from any of its
951 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=
28097 + _SYSTEMD_UNIT=dbus.service
</programlisting>
953 <para>Show all logs generated by the D-Bus executable:
</para>
955 <programlisting>journalctl /usr/bin/dbus-daemon
</programlisting>
957 <para>Show all kernel logs from previous boot:
</para>
959 <programlisting>journalctl -k -b -
1</programlisting>
961 <para>Show a live log display from a system service
962 <filename>apache.service
</filename>:
</para>
964 <programlisting>journalctl -f -u apache
</programlisting>
969 <title>See Also
</title>
971 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
972 <citerefentry><refentrytitle>systemd-journald.service
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
973 <citerefentry><refentrytitle>systemctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
974 <citerefentry><refentrytitle>coredumpctl
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
975 <citerefentry><refentrytitle>systemd.journal-fields
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
976 <citerefentry><refentrytitle>journald.conf
</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
977 <citerefentry><refentrytitle>systemd.time
</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
978 <citerefentry><refentrytitle>systemd-journal-remote
</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
979 <citerefentry><refentrytitle>systemd-journal-upload
</refentrytitle><manvolnum>8</manvolnum></citerefentry>