summaryrefslogtreecommitdiff
path: root/man/journalctl.html
blob: a42d6e5e66157b252c81efa7bfd369522a08f1d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>journalctl</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·

  <span style="float:right">systemd 221</span><hr><div class="refentry"><a name="journalctl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>journalctl — Query the systemd journal</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">journalctl</code>  [OPTIONS...] [MATCHES...]</p></div></div><div class="refsect1"><a name="idm47766011721424"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><span class="command"><strong>journalctl</strong></span> may be used to query the
      contents of the
      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>
      journal as written by
      <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>.</p><p>If called without parameters, it will show the full
      contents of the journal, starting with the oldest entry
      collected.</p><p>If one or more match arguments are passed, the output is
      filtered accordingly. A match is in the format
      "<code class="literal">FIELD=VALUE</code>",
      e.g. "<code class="literal">_SYSTEMD_UNIT=httpd.service</code>", referring
      to the components of a structured journal entry. See
      <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>
      for a list of well-known fields. If multiple matches are
      specified matching different fields, the log entries are
      filtered by both, i.e. the resulting output will show only
      entries matching all the specified matches of this kind. If two
      matches apply to the same field, then they are automatically
      matched as alternatives, i.e. the resulting output will show
      entries matching any of the specified matches for the same
      field. Finally, the character "<code class="literal">+</code>" may appears
      as a separate word between other terms on the command line. This
      causes all matches before and after to be combined in a
      disjunction (i.e. logical OR).</p><p>As shortcuts for a few types of field/value matches, file
      paths may be specified. If a file path refers to an executable
      file, this is equivalent to an "<code class="literal">_EXE=</code>" match
      for the canonicalized binary path. Similarly, if a path refers
      to a device node, this is equivalent to a
      "<code class="literal">_KERNEL_DEVICE=</code>" match for the device.</p><p>Additional constraints may be added using options
      <code class="option">--boot</code>, <code class="option">--unit=</code>, etc, to
      further limit what entries will be shown (logical AND).</p><p>Output is interleaved from all accessible journal files,
      whether they are rotated or currently being written, and
      regardless of whether they belong to the system itself or are
      accessible user journals.</p><p>The set of journal files which will be used can be
      modified using the <code class="option">--user</code>,
      <code class="option">--system</code>, <code class="option">--directory</code>, and
      <code class="option">--file</code> options, see below.</p><p>All users are granted access to their private per-user
      journals. However, by default, only root and users who are
      members of a few special groups are granted access to the system
      journal and the journals of other users. Members of the the
      "<code class="literal">systemd-journal</code>", "<code class="literal">adm</code>", and
      "<code class="literal">wheel</code>" groups can read all journal files. Note
      that the two latter groups traditionally have additional
      privileges specified by the distribution. Members of the
      "<code class="literal">wheel</code>" group can often perform administrative
      tasks.</p><p>The output is paged through <span class="command"><strong>less</strong></span> by
      default, and long lines are "truncated" to screen width. The
      hidden part can be viewed by using the left-arrow and
      right-arrow keys. Paging can be disabled; see the
      <code class="option">--no-pager</code> option and the "Environment" section
      below.</p><p>When outputting to a tty, lines are colored according to
      priority: lines of level ERROR and higher are colored red; lines
      of level NOTICE and higher are highlighted; other lines are
      displayed normally.</p></div><div class="refsect1"><a name="idm47766010913872"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>The following options are understood:</p><div class="variablelist"><dl class="variablelist"><dt id="--no-full"><span class="term"><code class="option">--no-full</code>, </span><span class="term"><code class="option">--full</code>, </span><span class="term"><code class="option">-l</code></span><a class="headerlink" title="Permalink to this term" href="#--no-full">¶</a></dt><dd><p>Ellipsize fields when they do not fit in
          available columns.  The default is to show full fields,
          allowing them to wrap or be truncated by the pager, if one
          is used.</p><p>The old options
          <code class="option">-l</code>/<code class="option">--full</code> are not useful
          anymore, except to undo <code class="option">--no-full</code>.</p></dd><dt id="-a"><span class="term"><code class="option">-a</code>, </span><span class="term"><code class="option">--all</code></span><a class="headerlink" title="Permalink to this term" href="#-a">¶</a></dt><dd><p>Show all fields in full, even if they
          include unprintable characters or are very
          long.</p></dd><dt id="-f"><span class="term"><code class="option">-f</code>, </span><span class="term"><code class="option">--follow</code></span><a class="headerlink" title="Permalink to this term" href="#-f">¶</a></dt><dd><p>Show only the most recent journal entries,
          and continuously print new entries as they are appended to
          the journal.</p></dd><dt id="-e"><span class="term"><code class="option">-e</code>, </span><span class="term"><code class="option">--pager-end</code></span><a class="headerlink" title="Permalink to this term" href="#-e">¶</a></dt><dd><p>Immediately jump to the end of the journal
          inside the implied pager tool. This implies
          <code class="option">-n1000</code> to guarantee that the pager will not
          buffer logs of unbounded size. This may be overridden with
          an explicit <code class="option">-n</code> with some other numeric
          value while <code class="option">-nall</code> will disable this cap.
          Note that this option is only supported for the
          <a href="http://man7.org/linux/man-pages/man1/less.1.html"><span class="citerefentry"><span class="refentrytitle">less</span>(1)</span></a>
          pager.</p></dd><dt id="-n"><span class="term"><code class="option">-n</code>, </span><span class="term"><code class="option">--lines=</code></span><a class="headerlink" title="Permalink to this term" href="#-n">¶</a></dt><dd><p>Show the most recent journal events and
          limit the number of events shown. If
          <code class="option">--follow</code> is used, this option is
          implied. The argument is a positive integer or
          "<code class="literal">all</code>" to disable line limiting. The default
          value is 10 if no argument is given.</p></dd><dt id="--no-tail"><span class="term"><code class="option">--no-tail</code></span><a class="headerlink" title="Permalink to this term" href="#--no-tail">¶</a></dt><dd><p>Show all stored output lines, even in follow
          mode. Undoes the effect of <code class="option">--lines=</code>.
          </p></dd><dt id="-r"><span class="term"><code class="option">-r</code>, </span><span class="term"><code class="option">--reverse</code></span><a class="headerlink" title="Permalink to this term" href="#-r">¶</a></dt><dd><p>Reverse output so that the newest entries
          are displayed first.</p></dd><dt id="-o"><span class="term"><code class="option">-o</code>, </span><span class="term"><code class="option">--output=</code></span><a class="headerlink" title="Permalink to this term" href="#-o">¶</a></dt><dd><p>Controls the formatting of the journal
          entries that are shown. Takes one of the following
          options:</p><div class="variablelist"><dl class="variablelist"><dt id="
                short
              "><span class="term">
                <code class="option">short</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20short%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>is the default and generates an output that is
                mostly identical to the formatting of classic syslog
                files, showing one line per journal entry.</p></dd><dt id="
                short-iso
              "><span class="term">
                <code class="option">short-iso</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20short-iso%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>is very similar, but shows ISO 8601 wallclock
                timestamps.</p></dd><dt id="
                short-precise
              "><span class="term">
                <code class="option">short-precise</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20short-precise%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>is very similar, but shows timestamps with full
                microsecond precision.</p></dd><dt id="
                short-monotonic
              "><span class="term">
                <code class="option">short-monotonic</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20short-monotonic%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>is very similar, but shows monotonic timestamps
                instead of wallclock timestamps.</p></dd><dt id="
                verbose
              "><span class="term">
                <code class="option">verbose</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20verbose%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>shows the full-structured entry items with all
                fields.</p></dd><dt id="
                export
              "><span class="term">
                <code class="option">export</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20export%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>serializes the journal into a binary (but mostly
                text-based) stream suitable for backups and network
                transfer (see
                <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/export" target="_top">Journal Export Format</a>
                for more information).</p></dd><dt id="
                json
              "><span class="term">
                <code class="option">json</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20json%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>formats entries as JSON data structures, one per
                line (see
                <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/json" target="_top">Journal JSON Format</a>
                for more information).</p></dd><dt id="
                json-pretty
              "><span class="term">
                <code class="option">json-pretty</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20json-pretty%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>formats entries as JSON data structures, but
                formats them in multiple lines in order to make them
                more readable by humans.</p></dd><dt id="
                json-sse
              "><span class="term">
                <code class="option">json-sse</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20json-sse%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>formats entries as JSON data structures, but wraps
                them in a format suitable for
                <a class="ulink" href="https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events" target="_top">Server-Sent Events</a>.
                </p></dd><dt id="
                cat
              "><span class="term">
                <code class="option">cat</code>
              </span><a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20cat%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>generates a very terse output, only showing the
                actual message of each journal entry with no metadata,
                not even a timestamp.</p></dd></dl></div></dd><dt id="--utc"><span class="term"><code class="option">--utc</code></span><a class="headerlink" title="Permalink to this term" href="#--utc">¶</a></dt><dd><p>Express time in Coordinated Universal Time
        (UTC).</p></dd><dt id="-x"><span class="term"><code class="option">-x</code>, </span><span class="term"><code class="option">--catalog</code></span><a class="headerlink" title="Permalink to this term" href="#-x">¶</a></dt><dd><p>Augment log lines with explanation texts from
        the message catalog. This will add explanatory help texts to
        log messages in the output where this is available. These
        short help texts will explain the context of an error or log
        event, possible solutions, as well as pointers to support
        forums, developer documentation, and any other relevant
        manuals. Note that help texts are not available for all
        messages, but only for selected ones. For more information on
        the message catalog, please refer to the
        <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/catalog" target="_top">Message Catalog Developer Documentation</a>.</p><p>Note: when attaching <span class="command"><strong>journalctl</strong></span>
        output to bug reports, please do <span class="emphasis"><em>not</em></span> use
        <code class="option">-x</code>.</p></dd><dt id="-q"><span class="term"><code class="option">-q</code>, </span><span class="term"><code class="option">--quiet</code></span><a class="headerlink" title="Permalink to this term" href="#-q">¶</a></dt><dd><p>Suppresses any warning messages regarding
        inaccessible system journals when run as a normal
        user.</p></dd><dt id="-m"><span class="term"><code class="option">-m</code>, </span><span class="term"><code class="option">--merge</code></span><a class="headerlink" title="Permalink to this term" href="#-m">¶</a></dt><dd><p>Show entries interleaved from all available
        journals, including remote ones.</p></dd><dt id="-b ID±offset"><span class="term"><code class="option">-b [<span class="optional"><em class="replaceable"><code>ID</code></em></span>][<span class="optional"><em class="replaceable"><code>±offset</code></em></span>]</code>, </span><span class="term"><code class="option">--boot=[<span class="optional"><em class="replaceable"><code>ID</code></em></span>][<span class="optional"><em class="replaceable"><code>±offset</code></em></span>]</code></span><a class="headerlink" title="Permalink to this term" href="#-b%20ID%C2%B1offset">¶</a></dt><dd><p>Show messages from a specific boot. This will
        add a match for "<code class="literal">_BOOT_ID=</code>".</p><p>The argument may be empty, in which case logs for the
        current boot will be shown.</p><p>If the boot ID is omitted, a positive
        <em class="replaceable"><code>offset</code></em> will look up the boots
        starting from the beginning of the journal, and a
        equal-or-less-than zero <em class="replaceable"><code>offset</code></em> will
        look up boots starting from the end of the journal. Thus,
        <code class="constant">1</code> means the first boot found in the
        journal in chronological order, <code class="constant">2</code> the
        second and so on; while <code class="constant">-0</code> is the last
        boot, <code class="constant">-1</code> the boot before last, and so
        on. An empty <em class="replaceable"><code>offset</code></em> is equivalent
        to specifying <code class="constant">-0</code>, except when the current
        boot is not the last boot (e.g. because
        <code class="option">--directory</code> was specified to look at logs
        from a different machine).</p><p>If the 32-character <em class="replaceable"><code>ID</code></em> is
        specified, it may optionally be followed by
        <em class="replaceable"><code>offset</code></em> which identifies the boot
        relative to the one given by boot
        <em class="replaceable"><code>ID</code></em>. Negative values mean earlier
        boots and a positive values mean later boots. If
        <em class="replaceable"><code>offset</code></em> is not specified, a value of
        zero is assumed, and the logs for the boot given by
        <em class="replaceable"><code>ID</code></em> are shown.</p></dd><dt id="--list-boots"><span class="term"><code class="option">--list-boots</code></span><a class="headerlink" title="Permalink to this term" href="#--list-boots">¶</a></dt><dd><p>Show a tabular list of boot numbers (relative to
        the current boot), their IDs, and the timestamps of the first
        and last message pertaining to the boot.</p></dd><dt id="-k"><span class="term"><code class="option">-k</code>, </span><span class="term"><code class="option">--dmesg</code></span><a class="headerlink" title="Permalink to this term" href="#-k">¶</a></dt><dd><p>Show only kernel messages. This implies
        <code class="option">-b</code> and adds the match
        "<code class="literal">_TRANSPORT=kernel</code>".</p></dd><dt id="-t"><span class="term"><code class="option">-t</code>, </span><span class="term"><code class="option">--identifier=<em class="replaceable"><code>SYSLOG_IDENTIFIER</code></em>|<em class="replaceable"><code>PATTERN</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-t">¶</a></dt><dd><p>Show messages for the specified syslog
        identifier <em class="replaceable"><code>SYSLOG_IDENTIFIER</code></em>, or
        for any of the messages with a
        "<code class="literal">SYSLOG_IDENTIFIER</code>" matched by
        <em class="replaceable"><code>PATTERN</code></em>.</p><p>This parameter can be specified multiple
        times.</p></dd><dt id="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--unit=<em class="replaceable"><code>UNIT</code></em>|<em class="replaceable"><code>PATTERN</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Show messages for the specified systemd unit
        <em class="replaceable"><code>UNIT</code></em> (such as a service unit), or
        for any of the units matched by
        <em class="replaceable"><code>PATTERN</code></em>.  If a pattern is
        specified, a list of unit names found in the journal is
        compared with the specified pattern and all that match are
        used. For each unit name, a match is added for messages from
        the unit
        ("<code class="literal">_SYSTEMD_UNIT=<em class="replaceable"><code>UNIT</code></em></code>"),
        along with additional matches for messages from systemd and
        messages about coredumps for the specified unit.</p><p>This parameter can be specified multiple times.</p></dd><dt id="--user-unit="><span class="term"><code class="option">--user-unit=</code></span><a class="headerlink" title="Permalink to this term" href="#--user-unit=">¶</a></dt><dd><p>Show messages for the specified user session
        unit. This will add a match for messages from the unit
        ("<code class="literal">_SYSTEMD_USER_UNIT=</code>" and
        "<code class="literal">_UID=</code>") and additional matches for messages
        from session systemd and messages about coredumps for the
        specified unit.</p><p>This parameter can be specified multiple times.</p></dd><dt id="-p"><span class="term"><code class="option">-p</code>, </span><span class="term"><code class="option">--priority=</code></span><a class="headerlink" title="Permalink to this term" href="#-p">¶</a></dt><dd><p>Filter output by message priorities or
        priority ranges. Takes either a single numeric or textual log
        level (i.e. between 0/"<code class="literal">emerg</code>" and
        7/"<code class="literal">debug</code>"), or a range of numeric/text log
        levels in the form FROM..TO. The log levels are the usual
        syslog log levels as documented in
        <a href="http://man7.org/linux/man-pages/man3/syslog.3.html"><span class="citerefentry"><span class="refentrytitle">syslog</span>(3)</span></a>,
        i.e. "<code class="literal">emerg</code>" (0),
        "<code class="literal">alert</code>" (1), "<code class="literal">crit</code>" (2),
        "<code class="literal">err</code>" (3), "<code class="literal">warning</code>" (4),
        "<code class="literal">notice</code>" (5), "<code class="literal">info</code>" (6),
        "<code class="literal">debug</code>" (7). If a single log level is
        specified, all messages with this log level or a lower (hence
        more important) log level are shown. If a range is specified,
        all messages within the range are shown, including both the
        start and the end value of the range. This will add
        "<code class="literal">PRIORITY=</code>" matches for the specified
        priorities.</p></dd><dt id="-c"><span class="term"><code class="option">-c</code>, </span><span class="term"><code class="option">--cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#-c">¶</a></dt><dd><p>Start showing entries from the location in the
        journal specified by the passed cursor.</p></dd><dt id="--after-cursor="><span class="term"><code class="option">--after-cursor=</code></span><a class="headerlink" title="Permalink to this term" href="#--after-cursor=">¶</a></dt><dd><p>Start showing entries from the location in the
        journal <span class="emphasis"><em>after</em></span> the location specified by
        the this cursor.  The cursor is shown when the
        <code class="option">--show-cursor</code> option is used.</p></dd><dt id="--show-cursor"><span class="term"><code class="option">--show-cursor</code></span><a class="headerlink" title="Permalink to this term" href="#--show-cursor">¶</a></dt><dd><p>The cursor is shown after the last entry after
        two dashes:</p><pre class="programlisting">-- cursor: s=0639...</pre><p>The format of the cursor is private
        and subject to change.</p></dd><dt id="--since="><span class="term"><code class="option">--since=</code>, </span><span class="term"><code class="option">--until=</code></span><a class="headerlink" title="Permalink to this term" href="#--since=">¶</a></dt><dd><p>Start showing entries on or newer than the
        specified date, or on or older than the specified date,
        respectively. Date specifications should be of the format
        "<code class="literal">2012-10-30 18:17:16</code>".  If the time part is
        omitted, "<code class="literal">00:00:00</code>" is assumed.  If only the
        seconds component is omitted, "<code class="literal">:00</code>" is
        assumed. If the date component is omitted, the current day is
        assumed. Alternatively the strings
        "<code class="literal">yesterday</code>", "<code class="literal">today</code>",
        "<code class="literal">tomorrow</code>" are understood, which refer to
        00:00:00 of the day before the current day, the current day,
        or the day after the current day,
        respectively. "<code class="literal">now</code>" refers to the current
        time. Finally, relative times may be specified, prefixed with
        "<code class="literal">-</code>" or "<code class="literal">+</code>", referring to
        times before or after the current time, respectively.</p></dd><dt id="-F"><span class="term"><code class="option">-F</code>, </span><span class="term"><code class="option">--field=</code></span><a class="headerlink" title="Permalink to this term" href="#-F">¶</a></dt><dd><p>Print all possible data values the specified
        field can take in all entries of the journal.</p></dd><dt id="--system"><span class="term"><code class="option">--system</code>, </span><span class="term"><code class="option">--user</code></span><a class="headerlink" title="Permalink to this term" href="#--system">¶</a></dt><dd><p>Show messages from system services and the
        kernel (with <code class="option">--system</code>). Show messages from
        service of current user (with <code class="option">--user</code>).  If
        neither is specified, show all messages that the user can see.
        </p></dd><dt id="-M"><span class="term"><code class="option">-M</code>, </span><span class="term"><code class="option">--machine=</code></span><a class="headerlink" title="Permalink to this term" href="#-M">¶</a></dt><dd><p>Show messages from a running, local
        container. Specify a container name to connect to.</p></dd><dt id="-D DIR"><span class="term"><code class="option">-D <em class="replaceable"><code>DIR</code></em></code>, </span><span class="term"><code class="option">--directory=<em class="replaceable"><code>DIR</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#-D%20DIR">¶</a></dt><dd><p>Takes a directory path as argument. If
        specified, journalctl will operate on the specified journal
        directory <em class="replaceable"><code>DIR</code></em> instead of the
        default runtime and system journal paths.</p></dd><dt id="--file=GLOB"><span class="term"><code class="option">--file=<em class="replaceable"><code>GLOB</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--file=GLOB">¶</a></dt><dd><p>Takes a file glob as an argument. If
        specified, journalctl will operate on the specified journal
        files matching <em class="replaceable"><code>GLOB</code></em> instead of the
        default runtime and system journal paths. May be specified
        multiple times, in which case files will be suitably
        interleaved.</p></dd><dt id="--root=ROOT"><span class="term"><code class="option">--root=<em class="replaceable"><code>ROOT</code></em></code></span><a class="headerlink" title="Permalink to this term" href="#--root=ROOT">¶</a></dt><dd><p>Takes a directory path as an argument. If
        specified, journalctl will operate on catalog file hierarchy
        underneath the specified directory instead of the root
        directory (e.g. <code class="option">--update-catalog</code> will create
        <code class="filename"><em class="replaceable"><code>ROOT</code></em>/var/lib/systemd/catalog/database</code>).
        </p></dd><dt id="--new-id128"><span class="term"><code class="option">--new-id128</code></span><a class="headerlink" title="Permalink to this term" href="#--new-id128">¶</a></dt><dd><p>Instead of showing journal contents, generate
        a new 128-bit ID suitable for identifying messages. This is
        intended for usage by developers who need a new identifier for
        a new message they introduce and want to make
        recognizable. This will print the new ID in three different
        formats which can be copied into source code or similar.
        </p></dd><dt id="--header"><span class="term"><code class="option">--header</code></span><a class="headerlink" title="Permalink to this term" href="#--header">¶</a></dt><dd><p>Instead of showing journal contents, show
        internal header information of the journal fields
        accessed.</p></dd><dt id="--disk-usage"><span class="term"><code class="option">--disk-usage</code></span><a class="headerlink" title="Permalink to this term" href="#--disk-usage">¶</a></dt><dd><p>Shows the current disk usage of all journal
        files. This shows the sum of the disk usage of all archived
        and active journal files.</p></dd><dt id="--vacuum-size="><span class="term"><code class="option">--vacuum-size=</code>, </span><span class="term"><code class="option">--vacuum-time=</code></span><a class="headerlink" title="Permalink to this term" href="#--vacuum-size=">¶</a></dt><dd><p>Removes archived journal files until the disk
        space they use falls below the specified size (specified with
        the usual "<code class="literal">K</code>", "<code class="literal">M</code>",
        "<code class="literal">G</code>", "<code class="literal">T</code>" suffixes), or all
        journal files contain no data older than the specified
        timespan (specified with the usual "<code class="literal">s</code>",
        "<code class="literal">min</code>", "<code class="literal">h</code>",
        "<code class="literal">days</code>", "<code class="literal">months</code>",
        "<code class="literal">weeks</code>", "<code class="literal">years</code>"
        suffixes). Note that running <code class="option">--vacuum-size=</code>
        has only indirect effect on the output shown by
        <code class="option">--disk-usage</code> as the latter includes active
        journal files, while the former only operates on archived
        journal files. <code class="option">--vacuum-size=</code> and
        <code class="option">--vacuum-time=</code> may be combined in a single
        invocation to enforce both a size and time limit on the
        archived journal files.</p></dd><dt id="--list-catalog
        128-bit-ID...
        "><span class="term"><code class="option">--list-catalog
        [<span class="optional"><em class="replaceable"><code>128-bit-ID...</code></em></span>]
        </code></span><a class="headerlink" title="Permalink to this term" href="#--list-catalog%0A%20%20%20%20%20%20%20%20128-bit-ID...%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>List the contents of the message catalog as a
        table of message IDs, plus their short description strings.
        </p><p>If any <em class="replaceable"><code>128-bit-ID</code></em>s are
        specified, only those entries are shown.</p></dd><dt id="--dump-catalog
        128-bit-ID...
        "><span class="term"><code class="option">--dump-catalog
        [<span class="optional"><em class="replaceable"><code>128-bit-ID...</code></em></span>]
        </code></span><a class="headerlink" title="Permalink to this term" href="#--dump-catalog%0A%20%20%20%20%20%20%20%20128-bit-ID...%0A%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>Show the contents of the message catalog, with
        entries separated by a line consisting of two dashes and the
        ID (the format is the same as <code class="filename">.catalog</code>
        files).</p><p>If any <em class="replaceable"><code>128-bit-ID</code></em>s are
        specified, only those entries are shown.</p></dd><dt id="--update-catalog"><span class="term"><code class="option">--update-catalog</code></span><a class="headerlink" title="Permalink to this term" href="#--update-catalog">¶</a></dt><dd><p>Update the message catalog index. This command
        needs to be executed each time new catalog files are
        installed, removed, or updated to rebuild the binary catalog
        index.</p></dd><dt id="--setup-keys"><span class="term"><code class="option">--setup-keys</code></span><a class="headerlink" title="Permalink to this term" href="#--setup-keys">¶</a></dt><dd><p>Instead of showing journal contents, generate
        a new key pair for Forward Secure Sealing (FSS). This will
        generate a sealing key and a verification key. The sealing key
        is stored in the journal data directory and shall remain on
        the host. The verification key should be stored
        externally. Refer to the <code class="option">Seal=</code> option in
        <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
        for information on Forward Secure Sealing and for a link to a
        refereed scholarly paper detailing the cryptographic theory it
        is based on.</p></dd><dt id="--force"><span class="term"><code class="option">--force</code></span><a class="headerlink" title="Permalink to this term" href="#--force">¶</a></dt><dd><p>When <code class="option">--setup-keys</code> is passed
        and Forward Secure Sealing (FSS) has already been configured,
        recreate FSS keys.</p></dd><dt id="--interval="><span class="term"><code class="option">--interval=</code></span><a class="headerlink" title="Permalink to this term" href="#--interval=">¶</a></dt><dd><p>Specifies the change interval for the sealing
        key when generating an FSS key pair with
        <code class="option">--setup-keys</code>. Shorter intervals increase CPU
        consumption but shorten the time range of undetectable journal
        alterations. Defaults to 15min.</p></dd><dt id="--verify"><span class="term"><code class="option">--verify</code></span><a class="headerlink" title="Permalink to this term" href="#--verify">¶</a></dt><dd><p>Check the journal file for internal
        consistency. If the file has been generated with FSS enabled and
        the FSS verification key has been specified with
        <code class="option">--verify-key=</code>, authenticity of the journal file
        is verified.</p></dd><dt id="--verify-key="><span class="term"><code class="option">--verify-key=</code></span><a class="headerlink" title="Permalink to this term" href="#--verify-key=">¶</a></dt><dd><p>Specifies the FSS verification key to use for
        the <code class="option">--verify</code> operation.</p></dd><dt id="--flush"><span class="term"><code class="option">--flush</code></span><a class="headerlink" title="Permalink to this term" href="#--flush">¶</a></dt><dd><p>Asks the Journal daemon to flush any log data
        stored in <code class="filename">/run/log/journal</code> into
        <code class="filename">/var/log/journal</code>, if persistent storage is
        enabled. This call does not return until the operation is
        complete.</p></dd><dt id="-h"><span class="term"><code class="option">-h</code>, </span><span class="term"><code class="option">--help</code></span><a class="headerlink" title="Permalink to this term" href="#-h">¶</a></dt><dd><p><a name="help-text"></a>Print a short help text and exit.
    </p></dd><dt id="--version"><span class="term"><code class="option">--version</code></span><a class="headerlink" title="Permalink to this term" href="#--version">¶</a></dt><dd><p><a name="version-text"></a>Print a short version string and exit.</p></dd><dt id="--no-pager"><span class="term"><code class="option">--no-pager</code></span><a class="headerlink" title="Permalink to this term" href="#--no-pager">¶</a></dt><dd><p>Do not pipe output into a pager.</p></dd></dl></div></div><div class="refsect1"><a name="idm47766010745136"></a><h2 id="Exit status">Exit status<a class="headerlink" title="Permalink to this headline" href="#Exit%20status">¶</a></h2><p>On success, 0 is returned; otherwise, a non-zero failure
    code is returned.</p></div><div class="refsect1"><a name="idm47766001794384"></a><h2 id="Environment">Environment<a class="headerlink" title="Permalink to this headline" href="#Environment">¶</a></h2><div class="variablelist"><dl class="variablelist"><dt id="$SYSTEMD_PAGER"><span class="term"><code class="varname">$SYSTEMD_PAGER</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_PAGER">¶</a></dt><dd><p>Pager to use when
                        <code class="option">--no-pager</code> is not given;
                        overrides <code class="varname">$PAGER</code>.  Setting
                        this to an empty string or the value
                        "<code class="literal">cat</code>" is equivalent to passing
                        <code class="option">--no-pager</code>.</p></dd><dt id="$SYSTEMD_LESS"><span class="term"><code class="varname">$SYSTEMD_LESS</code></span><a class="headerlink" title="Permalink to this term" href="#%24SYSTEMD_LESS">¶</a></dt><dd><p>Override the default
                        options passed to
                        <span class="command"><strong>less</strong></span>
                        ("<code class="literal">FRSXMK</code>").</p></dd></dl></div></div><div class="refsect1"><a name="idm47766010743392"></a><h2 id="Examples">Examples<a class="headerlink" title="Permalink to this headline" href="#Examples">¶</a></h2><p>Without arguments, all collected logs are shown
    unfiltered:</p><pre class="programlisting">journalctl</pre><p>With one match specified, all entries with a field matching
    the expression are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service</pre><p>If two different fields are matched, only entries matching
    both expressions at the same time are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097</pre><p>If two matches refer to the same field, all entries matching
    either expression are shown:</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service</pre><p>If the separator "<code class="literal">+</code>" is used, two
    expressions may be combined in a logical OR. The following will
    show all messages from the Avahi service process with the PID
    28097 plus all messages from the D-Bus service (from any of its
    processes):</p><pre class="programlisting">journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</pre><p>Show all logs generated by the D-Bus executable:</p><pre class="programlisting">journalctl /usr/bin/dbus-daemon</pre><p>Show all kernel logs from previous boot:</p><pre class="programlisting">journalctl -k -b -1</pre><p>Show a live log display from a system service
    <code class="filename">apache.service</code>:</p><pre class="programlisting">journalctl -f -u apache</pre></div><div class="refsect1"><a name="idm47766010732368"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
      <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
      <a href="systemd-journald.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-journald.service</span>(8)</span></a>,
      <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
      <a href="coredumpctl.html"><span class="citerefentry"><span class="refentrytitle">coredumpctl</span>(1)</span></a>,
      <a href="systemd.journal-fields.html"><span class="citerefentry"><span class="refentrytitle">systemd.journal-fields</span>(7)</span></a>,
      <a href="journald.conf.html"><span class="citerefentry"><span class="refentrytitle">journald.conf</span>(5)</span></a>
    </p></div></div></body></html>