mirror of
https://git.proxmox.com/git/systemd
synced 2026-01-13 17:24:42 +00:00
449 lines
47 KiB
HTML
449 lines
47 KiB
HTML
<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>·
|
|
<a href="../libudev/index.html">libudev </a>·
|
|
<a href="../libudev/index.html">gudev </a><span style="float:right">systemd 208</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="idm274678752256"></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, if the character
|
|
"<code class="literal">+</code>" appears as separate word on the
|
|
command line, all matches before and after are 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>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>All users are granted access to their private
|
|
per-user journals. However, by default, only root and
|
|
users who are members of the "<code class="literal">systemd-journal</code>"
|
|
group get access to the system journal and the
|
|
journals of other users.</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
|
|
<code class="option">--no-pager</code> and section Environment
|
|
below.</p><p>When outputing 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, and other lines are displayed normally.
|
|
</p></div><div class="refsect1"><a name="idm274680130496"></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="-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>Prints a short help
|
|
text and exits.</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>Prints a short version
|
|
string and exits.</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><dt id="-l"><span class="term"><code class="option">-l</code>, </span><span class="term"><code class="option">--full</code></span><a class="headerlink" title="Permalink to this term" href="#-l">¶</a></dt><dd><p>Show all (printable) fields in
|
|
full.</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 on the
|
|
command line. Note that this option is
|
|
only supported for the
|
|
<a href="less.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,
|
|
a positive integer, is optional, and
|
|
defaults to 10. </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 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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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 for 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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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 meta data,
|
|
not even a timestamp.
|
|
</p></dd></dl></div></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
|
|
message regarding inaccessible system
|
|
journals when run as 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 the
|
|
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 that, 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="-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="-u"><span class="term"><code class="option">-u</code>, </span><span class="term"><code class="option">--unit=</code></span><a class="headerlink" title="Permalink to this term" href="#-u">¶</a></dt><dd><p>Show messages for the
|
|
specified systemd unit. This will add
|
|
a match for messages from the unit
|
|
("<code class="literal">_SYSTEMD_UNIT=</code>")
|
|
and 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="syslog.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.
|
|
</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="-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
|
|
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 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.</p></dd><dt id="--list-catalog
|
|
ID128...
|
|
"><span class="term"><code class="option">--list-catalog
|
|
[<span class="optional"><em class="replaceable"><code>ID128...</code></em></span>]
|
|
</code></span><a class="headerlink" title="Permalink to this term" href="#--list-catalog%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ID128...%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20">¶</a></dt><dd><p>List the contents of
|
|
the message catalog, as table of
|
|
message IDs plus their short
|
|
description strings.</p><p>If any
|
|
<em class="replaceable"><code>ID128</code></em>s are
|
|
specified, only those entries are shown.
|
|
</p></dd><dt id="--dump-catalog
|
|
ID128...
|
|
"><span class="term"><code class="option">--dump-catalog
|
|
[<span class="optional"><em class="replaceable"><code>ID128...</code></em></span>]
|
|
</code></span><a class="headerlink" title="Permalink to this term" href="#--dump-catalog%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20ID128...%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%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>ID128</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. Also see 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 details.</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 --setup-keys is passed and
|
|
Forward Secure Sealing has already been set up,
|
|
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></dl></div></div><div class="refsect1"><a name="idm274675525648"></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, a non-zero failure
|
|
code otherwise.</p></div><div class="refsect1"><a name="idm274675524400"></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></dl></div></div><div class="refsect1"><a name="idm274675519536"></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 logs of the kernel device node <code class="filename">/dev/sda</code>:</p><pre class="programlisting">journalctl /dev/sda</pre><p>Show all kernel logs from previous boot:</p><pre class="programlisting">journalctl -k -b -1</pre></div><div class="refsect1"><a name="idm274675508224"></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="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>
|