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