chiark / gitweb /
bus: fix bus_print_property() to use "int" for booleans
[elogind.git] / man / journalctl.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of systemd.
7
8   Copyright 2012 Lennart Poettering
9
10   systemd is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   systemd is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with systemd; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="journalctl"
25           xmlns:xi="http://www.w3.org/2001/XInclude">
26
27         <refentryinfo>
28                 <title>journalctl</title>
29                 <productname>systemd</productname>
30
31                 <authorgroup>
32                         <author>
33                                 <contrib>Developer</contrib>
34                                 <firstname>Lennart</firstname>
35                                 <surname>Poettering</surname>
36                                 <email>lennart@poettering.net</email>
37                         </author>
38                 </authorgroup>
39         </refentryinfo>
40
41         <refmeta>
42                 <refentrytitle>journalctl</refentrytitle>
43                 <manvolnum>1</manvolnum>
44         </refmeta>
45
46         <refnamediv>
47                 <refname>journalctl</refname>
48                 <refpurpose>Query the systemd journal</refpurpose>
49         </refnamediv>
50
51         <refsynopsisdiv>
52                 <cmdsynopsis>
53                         <command>journalctl</command>
54                         <arg choice="opt" rep="repeat">OPTIONS</arg>
55                         <arg choice="opt" rep="repeat">MATCHES</arg>
56                 </cmdsynopsis>
57         </refsynopsisdiv>
58
59         <refsect1>
60                 <title>Description</title>
61
62                 <para><command>journalctl</command> may be used to
63                 query the contents of the
64                 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
65                 journal as written by
66                 <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
67
68                 <para>If called without parameters, it will show the full
69                 contents of the journal, starting with the oldest
70                 entry collected.</para>
71
72                 <para>If one or more match arguments are passed, the
73                 output is filtered accordingly. A match is in the
74                 format <literal>FIELD=VALUE</literal>,
75                 e.g. <literal>_SYSTEMD_UNIT=httpd.service</literal>,
76                 referring to the components of a structured journal
77                 entry. See
78                 <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
79                 for a list of well-known fields. If multiple matches
80                 are specified matching different fields, the log
81                 entries are filtered by both, i.e. the resulting output
82                 will show only entries matching all the specified
83                 matches of this kind. If two matches apply to the same
84                 field, then they are automatically matched as
85                 alternatives, i.e. the resulting output will show
86                 entries matching any of the specified matches for the
87                 same field. Finally, the character
88                 <literal>+</literal> may appears as a separate word
89                 between other terms on the command line. This causes
90                 all matches before and after to be combined in a
91                 disjunction (i.e. logical OR).</para>
92
93                 <para>As shortcuts for a few types of field/value
94                 matches, file paths may be specified. If a file path
95                 refers to an executable file, this is equivalent to an
96                 <literal>_EXE=</literal> match for the canonicalized
97                 binary path. Similarly, if a path refers to a device
98                 node, this is equivalent to a
99                 <literal>_KERNEL_DEVICE=</literal> match for the
100                 device.</para>
101
102                 <para>Additional constraints may be added using options
103                 <option>--boot</option>, <option>--unit=</option>,
104                 etc, to further limit what entries will be shown
105                 (logical AND).</para>
106
107                 <para>Output is interleaved from all accessible
108                 journal files, whether they are rotated or currently
109                 being written, and regardless of whether they belong to the
110                 system itself or are accessible user journals.</para>
111
112                 <para>The set of journal files which will be used
113                 can be modified using the <option>--user</option>,
114                 <option>--system</option>, <option>--directory</option>,
115                 and <option>--file</option> options, see below.</para>
116
117                 <para>All users are granted access to their private
118                 per-user journals. However, by default, only root and
119                 users who are members of the <literal>systemd-journal</literal>
120                 group get access to the system journal and the
121                 journals of other users.</para>
122
123                 <para>The output is paged through
124                 <command>less</command> by default, and long lines are
125                 "truncated" to screen width. The hidden part can be
126                 viewed by using the left-arrow and right-arrow
127                 keys. Paging can be disabled; see the
128                 <option>--no-pager</option> option and the "Environment"
129                 section below.</para>
130
131                 <para>When outputting to a tty, lines are colored
132                 according to priority: lines of level ERROR and higher
133                 are colored red; lines of level NOTICE and higher are
134                 highlighted; other lines are displayed normally.
135                 </para>
136         </refsect1>
137
138         <refsect1>
139                 <title>Options</title>
140
141                 <para>The following options are understood:</para>
142
143                 <variablelist>
144                         <varlistentry>
145                                 <term><option>--no-full</option></term>
146                                 <term><option>--full</option></term>
147                                 <term><option>-l</option></term>
148
149                                 <listitem><para>Ellipsize fields when
150                                 they do not fit in available columns.
151                                 The default is to show full fields,
152                                 allowing them to wrap or be truncated
153                                 by the pager, if one is used.</para>
154
155                                 <para>The old options
156                                 <option>-l</option>/<option>--full</option>
157                                 are not useful anymore, except to undo
158                                 <option>--no-full</option>.</para></listitem>
159                         </varlistentry>
160
161                         <varlistentry>
162                                 <term><option>-a</option></term>
163                                 <term><option>--all</option></term>
164
165                                 <listitem><para>Show all fields in
166                                 full, even if they include unprintable
167                                 characters or are very
168                                 long.</para></listitem>
169                         </varlistentry>
170
171                         <varlistentry>
172                                 <term><option>-f</option></term>
173                                 <term><option>--follow</option></term>
174
175                                 <listitem><para>Show only the most recent
176                                 journal entries, and continuously print
177                                 new entries as they are appended to
178                                 the journal.</para></listitem>
179                         </varlistentry>
180
181                         <varlistentry>
182                                 <term><option>-e</option></term>
183                                 <term><option>--pager-end</option></term>
184
185                                 <listitem><para>Immediately jump to
186                                 the end of the journal inside the
187                                 implied pager tool. This implies
188                                 <option>-n1000</option> to guarantee
189                                 that the pager will not buffer logs of
190                                 unbounded size. This may be overridden
191                                 with an explicit <option>-n</option>
192                                 with some other numeric value while
193                                 <option>-nall</option> will disable this cap.
194                                 Note that this option is only supported for the
195                                 <citerefentry project='man-pages'><refentrytitle>less</refentrytitle><manvolnum>1</manvolnum></citerefentry>
196                                 pager.</para></listitem>
197                         </varlistentry>
198
199                         <varlistentry>
200                                 <term><option>-n</option></term>
201                                 <term><option>--lines=</option></term>
202
203                                 <listitem><para>Show the most recent
204                                 journal events and limit the number of
205                                 events shown. If
206                                 <option>--follow</option> is used,
207                                 this option is implied. The argument is
208                                 a positive integer or <literal>all</literal>
209                                 to disable line limiting. The default value is
210                                 10 if no argument is given.</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 that 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 by 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 metadata,
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                                 messages regarding inaccessible system
419                                 journals when run as a 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
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 last, 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>--list-boots</option></term>
482
483                                 <listitem><para>Show a tabular list of
484                                 boot numbers (relative to the current
485                                 boot), their IDs, and the timestamps
486                                 of the first and last message
487                                 pertaining to the boot.
488                                 </para></listitem>
489                         </varlistentry>
490
491                         <varlistentry>
492                                 <term><option>-k</option></term>
493                                 <term><option>--dmesg</option></term>
494
495                                 <listitem><para>Show only kernel messages. This
496                                 implies <option>-b</option> and adds the match
497                                 <literal>_TRANSPORT=kernel</literal>.
498                                 </para></listitem>
499                         </varlistentry>
500
501                         <varlistentry>
502                                 <term><option>-t</option></term>
503                                 <term><option>--identifier=<replaceable>SYSLOG_IDENTIFIER</replaceable>|<replaceable>PATTERN</replaceable></option></term>
504
505                                 <listitem><para>Show messages for the
506                                 specified syslog identifier
507                                 <replaceable>SYSLOG_IDENTIFIER</replaceable>, or
508                                 for any of the messages with a <literal>SYSLOG_IDENTIFIER</literal>
509                                 matched by <replaceable>PATTERN</replaceable>.</para>
510
511                                 <para>This parameter can be specified
512                                 multiple times.</para></listitem>
513                         </varlistentry>
514
515                         <varlistentry>
516                                 <term><option>-u</option></term>
517                                 <term><option>--unit=<replaceable>UNIT</replaceable>|<replaceable>PATTERN</replaceable></option></term>
518
519                                 <listitem><para>Show messages for the
520                                 specified systemd unit
521                                 <replaceable>UNIT</replaceable> (such
522                                 as a service unit), or for any of the
523                                 units matched by
524                                 <replaceable>PATTERN</replaceable>.
525                                 If a pattern is specified, a list of
526                                 unit names found in the journal is
527                                 compared with the specified pattern
528                                 and all that match are used. For each
529                                 unit name, a match is added for
530                                 messages from the unit
531                                 (<literal>_SYSTEMD_UNIT=<replaceable>UNIT</replaceable></literal>),
532                                 along with additional matches for
533                                 messages from systemd and messages
534                                 about coredumps for the specified
535                                 unit.</para>
536
537                                 <para>This parameter can be specified
538                                 multiple times.</para></listitem>
539                         </varlistentry>
540
541                         <varlistentry>
542                                 <term><option>--user-unit=</option></term>
543
544                                 <listitem><para>Show messages for the
545                                 specified user session unit. This will
546                                 add a match for messages from the unit
547                                 (<literal>_SYSTEMD_USER_UNIT=</literal>
548                                 and <literal>_UID=</literal>) and
549                                 additional matches for messages from
550                                 session systemd and messages about
551                                 coredumps for the specified unit.</para>
552                                 <para>This parameter can be specified multiple times.
553                                 </para></listitem>
554                         </varlistentry>
555
556                         <varlistentry>
557                                 <term><option>-p</option></term>
558                                 <term><option>--priority=</option></term>
559
560                                 <listitem><para>Filter output by
561                                 message priorities or priority
562                                 ranges. Takes either a single numeric
563                                 or textual log level (i.e. between
564                                 0/<literal>emerg</literal> and
565                                 7/<literal>debug</literal>), or a
566                                 range of numeric/text log levels in
567                                 the form FROM..TO. The log levels are
568                                 the usual syslog log levels as
569                                 documented in
570                                 <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
571                                 i.e. <literal>emerg</literal> (0),
572                                 <literal>alert</literal> (1),
573                                 <literal>crit</literal> (2),
574                                 <literal>err</literal> (3),
575                                 <literal>warning</literal> (4),
576                                 <literal>notice</literal> (5),
577                                 <literal>info</literal> (6),
578                                 <literal>debug</literal> (7). If a
579                                 single log level is specified, all
580                                 messages with this log level or a
581                                 lower (hence more important) log level
582                                 are shown. If a range is specified, all
583                                 messages within the range are shown,
584                                 including both the start and the end
585                                 value of the range. This will add
586                                 <literal>PRIORITY=</literal> matches
587                                 for the specified
588                                 priorities.</para></listitem>
589                         </varlistentry>
590
591                         <varlistentry>
592                                 <term><option>-c</option></term>
593                                 <term><option>--cursor=</option></term>
594
595                                 <listitem><para>Start showing entries
596                                 from the location in the journal
597                                 specified by the passed
598                                 cursor.</para></listitem>
599                         </varlistentry>
600
601                         <varlistentry>
602                                 <term><option>--after-cursor=</option></term>
603
604                                 <listitem><para>Start showing entries
605                                 from the location in the journal
606                                 <emphasis>after</emphasis> the
607                                 location specified by the this cursor.
608                                 The cursor is shown when the
609                                 <option>--show-cursor</option> option
610                                 is used.</para></listitem>
611                         </varlistentry>
612
613                         <varlistentry>
614                                 <term><option>--show-cursor</option></term>
615
616                                 <listitem><para>The cursor is shown after the last
617                                 entry after two dashes:</para>
618                                 <programlisting>-- cursor: s=0639...</programlisting>
619                                 <para>The format of the cursor is private
620                                 and subject to change.</para></listitem>
621                         </varlistentry>
622
623                         <varlistentry>
624                                 <term><option>--since=</option></term>
625                                 <term><option>--until=</option></term>
626
627                                 <listitem><para>Start showing entries
628                                 on or newer than the specified date,
629                                 or on or older than the specified
630                                 date, respectively. Date specifications
631                                 should be of the format
632                                 <literal>2012-10-30 18:17:16</literal>.
633                                 If the time part is omitted,
634                                 <literal>00:00:00</literal> is assumed.
635                                 If only the seconds component is omitted,
636                                 <literal>:00</literal> is assumed. If the
637                                 date component is omitted, the current
638                                 day is assumed. Alternatively the strings
639                                 <literal>yesterday</literal>,
640                                 <literal>today</literal>,
641                                 <literal>tomorrow</literal> are
642                                 understood, which refer to 00:00:00 of
643                                 the day before the current day, the
644                                 current day, or the day after the
645                                 current day, respectively. <literal>now</literal>
646                                 refers to the current time. Finally,
647                                 relative times may be specified,
648                                 prefixed with <literal>-</literal> or
649                                 <literal>+</literal>, referring to
650                                 times before or after the current
651                                 time, respectively.</para></listitem>
652                         </varlistentry>
653
654                         <varlistentry>
655                                 <term><option>-F</option></term>
656                                 <term><option>--field=</option></term>
657
658                                 <listitem><para>Print all possible
659                                 data values the specified field can
660                                 take in all entries of the
661                                 journal.</para></listitem>
662                         </varlistentry>
663
664                         <varlistentry>
665                                 <term><option>--system</option></term>
666                                 <term><option>--user</option></term>
667
668                                 <listitem><para>Show messages from
669                                 system services and the kernel (with
670                                 <option>--system</option>). Show
671                                 messages from service of current user
672                                 (with <option>--user</option>).
673                                 If neither is specified, show all
674                                 messages that the user can see.
675                                 </para></listitem>
676                         </varlistentry>
677
678                         <varlistentry>
679                                 <term><option>-M</option></term>
680                                 <term><option>--machine=</option></term>
681
682                                 <listitem><para>Show messages from a
683                                 running, local container. Specify a
684                                 container name to connect
685                                 to.</para></listitem>
686                         </varlistentry>
687
688                         <varlistentry>
689                                 <term><option>-D <replaceable>DIR</replaceable></option></term>
690                                 <term><option>--directory=<replaceable>DIR</replaceable></option></term>
691
692                                 <listitem><para>Takes a directory path
693                                 as argument. If specified, journalctl
694                                 will operate on the specified journal
695                                 directory
696                                 <replaceable>DIR</replaceable> instead
697                                 of the default runtime and system
698                                 journal paths.</para></listitem>
699                         </varlistentry>
700
701                         <varlistentry>
702                                 <term><option>--file=<replaceable>GLOB</replaceable></option></term>
703
704                                 <listitem><para>Takes a file glob as an
705                                 argument. If specified, journalctl will
706                                 operate on the specified journal files
707                                 matching <replaceable>GLOB</replaceable>
708                                 instead of the default runtime and
709                                 system journal paths. May be specified
710                                 multiple times, in which case files will
711                                 be suitably interleaved.</para></listitem>
712                         </varlistentry>
713
714                         <varlistentry>
715                                 <term><option>--root=<replaceable>ROOT</replaceable></option></term>
716
717                                 <listitem><para>Takes a directory path
718                                 as an argument. If specified, journalctl
719                                 will operate on catalog file hierarchy
720                                 underneath the specified directory
721                                 instead of the root directory
722                                 (e.g. <option>--update-catalog</option>
723                                 will create
724                                 <filename><replaceable>ROOT</replaceable>/var/lib/systemd/catalog/database</filename>).
725                                 </para></listitem>
726                         </varlistentry>
727
728                         <varlistentry>
729                                 <term><option>--new-id128</option></term>
730
731                                 <listitem><para>Instead of showing
732                                 journal contents, generate a new 128-bit
733                                 ID suitable for identifying
734                                 messages. This is intended for usage
735                                 by developers who need a new
736                                 identifier for a new message they
737                                 introduce and want to make
738                                 recognizable. This will print the new ID in
739                                 three different formats which can be
740                                 copied into source code or
741                                 similar.</para></listitem>
742                         </varlistentry>
743
744                         <varlistentry>
745                                 <term><option>--header</option></term>
746
747                                 <listitem><para>Instead of showing
748                                 journal contents, show internal header
749                                 information of the journal fields
750                                 accessed.</para></listitem>
751                         </varlistentry>
752
753                         <varlistentry>
754                                 <term><option>--disk-usage</option></term>
755
756                                 <listitem><para>Shows the current disk
757                                 usage of all
758                                 journal files.</para></listitem>
759                         </varlistentry>
760
761                         <varlistentry>
762                                 <term><option>--list-catalog
763                                 <optional><replaceable>128-bit-ID...</replaceable></optional>
764                                 </option></term>
765
766                                 <listitem><para>List the contents of
767                                 the message catalog as a table of
768                                 message IDs, plus their short
769                                 description strings.</para>
770
771                                 <para>If any
772                                 <replaceable>128-bit-ID</replaceable>s are
773                                 specified, only those entries are shown.
774                                 </para>
775                                 </listitem>
776                         </varlistentry>
777
778                         <varlistentry>
779                                 <term><option>--dump-catalog
780                                 <optional><replaceable>128-bit-ID...</replaceable></optional>
781                                 </option></term>
782
783                                 <listitem><para>Show the contents of
784                                 the message catalog, with entries
785                                 separated by a line consisting of two
786                                 dashes and the ID (the format is the
787                                 same as <filename>.catalog</filename>
788                                 files).</para>
789
790                                 <para>If any
791                                 <replaceable>128-bit-ID</replaceable>s are
792                                 specified, only those entries are shown.
793                                 </para>
794                                 </listitem>
795                         </varlistentry>
796
797                         <varlistentry>
798                                 <term><option>--update-catalog</option></term>
799
800                                 <listitem><para>Update the message
801                                 catalog index. This command needs to
802                                 be executed each time new catalog
803                                 files are installed, removed, or
804                                 updated to rebuild the binary catalog
805                                 index.</para></listitem>
806                         </varlistentry>
807
808                         <varlistentry>
809                                 <term><option>--setup-keys</option></term>
810
811                                 <listitem><para>Instead of showing
812                                 journal contents, generate a new key
813                                 pair for Forward Secure Sealing
814                                 (FSS). This will generate a sealing
815                                 key and a verification key. The
816                                 sealing key is stored in the journal
817                                 data directory and shall remain on the
818                                 host. The verification key should be
819                                 stored externally. Refer to the
820                                 <option>Seal=</option> option in
821                                 <citerefentry><refentrytitle>journald.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
822                                 for information on Forward Secure
823                                 Sealing and for a link to a refereed
824                                 scholarly paper detailing the
825                                 cryptographic theory it is based on.
826                                 </para></listitem>
827                         </varlistentry>
828
829                         <varlistentry>
830                                 <term><option>--force</option></term>
831
832                                 <listitem><para>When
833                                 <option>--setup-keys</option> is passed and
834                                 Forward Secure Sealing (FSS) has already been
835                                 configured, recreate FSS keys.</para></listitem>
836                         </varlistentry>
837
838                         <varlistentry>
839                                 <term><option>--interval=</option></term>
840
841                                 <listitem><para>Specifies the change
842                                 interval for the sealing key when
843                                 generating an FSS key pair with
844                                 <option>--setup-keys</option>. Shorter
845                                 intervals increase CPU consumption but
846                                 shorten the time range of
847                                 undetectable journal
848                                 alterations. Defaults to
849                                 15min.</para></listitem>
850                         </varlistentry>
851
852                         <varlistentry>
853                                 <term><option>--verify</option></term>
854
855                                 <listitem><para>Check the journal file
856                                 for internal consistency. If the
857                                 file has been generated with FSS
858                                 enabled and the FSS verification key
859                                 has been specified with
860                                 <option>--verify-key=</option>,
861                                 authenticity of the journal file is
862                                 verified.</para></listitem>
863                         </varlistentry>
864
865                         <varlistentry>
866                                 <term><option>--verify-key=</option></term>
867
868                                 <listitem><para>Specifies the FSS
869                                 verification key to use for the
870                                 <option>--verify</option>
871                                 operation.</para></listitem>
872                         </varlistentry>
873
874                         <xi:include href="standard-options.xml" xpointer="help" />
875                         <xi:include href="standard-options.xml" xpointer="version" />
876                         <xi:include href="standard-options.xml" xpointer="no-pager" />
877                 </variablelist>
878         </refsect1>
879
880         <refsect1>
881                 <title>Exit status</title>
882
883                 <para>On success, 0 is returned; otherwise, a non-zero
884                 failure code is returned.</para>
885         </refsect1>
886
887         <xi:include href="less-variables.xml" />
888
889         <refsect1>
890                 <title>Examples</title>
891
892                 <para>Without arguments, all collected logs are shown
893                 unfiltered:</para>
894
895                 <programlisting>journalctl</programlisting>
896
897                 <para>With one match specified, all entries with a field matching the expression are shown:</para>
898
899                 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service</programlisting>
900
901                 <para>If two different fields are matched, only entries matching both expressions at the same time are shown:</para>
902
903                 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097</programlisting>
904
905                 <para>If two matches refer to the same field, all entries matching either expression are shown:</para>
906
907                 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service</programlisting>
908
909                 <para>If the separator <literal>+</literal> is used,
910                 two expressions may be combined in a logical OR. The
911                 following will show all messages from the Avahi
912                 service process with the PID 28097 plus all messages
913                 from the D-Bus service (from any of its
914                 processes):</para>
915
916                 <programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</programlisting>
917
918                 <para>Show all logs generated by the D-Bus executable:</para>
919
920                 <programlisting>journalctl /usr/bin/dbus-daemon</programlisting>
921
922                 <para>Show all logs of the kernel device node <filename noindex='true'>/dev/sda</filename>:</para>
923
924                 <programlisting>journalctl /dev/sda</programlisting>
925
926                 <para>Show all kernel logs from previous boot:</para>
927
928                 <programlisting>journalctl -k -b -1</programlisting>
929
930                 <para>Show a live log display from a system service <filename>apache.service</filename>:</para>
931
932                 <programlisting>journalctl -f -u apache</programlisting>
933
934         </refsect1>
935
936         <refsect1>
937                 <title>See Also</title>
938                 <para>
939                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
940                         <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
941                         <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
942                         <citerefentry><refentrytitle>coredumpctl</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>