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