journalctl.xml revision a0b78ede25ad1b07521aa6c1b70258dcc05136fa
0066eddda7203f6345b56f77d146a759298dc635gryzor<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
0066eddda7203f6345b56f77d146a759298dc635gryzor "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0066eddda7203f6345b56f77d146a759298dc635gryzor This file is part of systemd.
0066eddda7203f6345b56f77d146a759298dc635gryzor Copyright 2012 Lennart Poettering
0066eddda7203f6345b56f77d146a759298dc635gryzor systemd is free software; you can redistribute it and/or modify it
0066eddda7203f6345b56f77d146a759298dc635gryzor under the terms of the GNU Lesser General Public License as published by
0066eddda7203f6345b56f77d146a759298dc635gryzor the Free Software Foundation; either version 2.1 of the License, or
0066eddda7203f6345b56f77d146a759298dc635gryzor (at your option) any later version.
0066eddda7203f6345b56f77d146a759298dc635gryzor systemd is distributed in the hope that it will be useful, but
0066eddda7203f6345b56f77d146a759298dc635gryzor WITHOUT ANY WARRANTY; without even the implied warranty of
0066eddda7203f6345b56f77d146a759298dc635gryzor MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0066eddda7203f6345b56f77d146a759298dc635gryzor Lesser General Public License for more details.
0066eddda7203f6345b56f77d146a759298dc635gryzor You should have received a copy of the GNU Lesser General Public License
0066eddda7203f6345b56f77d146a759298dc635gryzor along with systemd; If not, see <http://www.gnu.org/licenses/>.
0066eddda7203f6345b56f77d146a759298dc635gryzor <refentryinfo>
0066eddda7203f6345b56f77d146a759298dc635gryzor <authorgroup>
0066eddda7203f6345b56f77d146a759298dc635gryzor </authorgroup>
0066eddda7203f6345b56f77d146a759298dc635gryzor </refentryinfo>
0066eddda7203f6345b56f77d146a759298dc635gryzor <refnamediv>
0066eddda7203f6345b56f77d146a759298dc635gryzor </refnamediv>
9f47982d4f9350397f1f62f04f1ba744ad5b6fa5lgentis <refsynopsisdiv>
9f47982d4f9350397f1f62f04f1ba744ad5b6fa5lgentis <cmdsynopsis>
0066eddda7203f6345b56f77d146a759298dc635gryzor <command>journalctl <arg choice="opt" rep="repeat">OPTIONS</arg> <arg choice="opt" rep="repeat">MATCHES</arg></command>
0066eddda7203f6345b56f77d146a759298dc635gryzor </cmdsynopsis>
0066eddda7203f6345b56f77d146a759298dc635gryzor </refsynopsisdiv>
0066eddda7203f6345b56f77d146a759298dc635gryzor query the contents of the
0066eddda7203f6345b56f77d146a759298dc635gryzor <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor journal as written by
0066eddda7203f6345b56f77d146a759298dc635gryzor <citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
0066eddda7203f6345b56f77d146a759298dc635gryzor <para>If called without parameter it will show the full
0066eddda7203f6345b56f77d146a759298dc635gryzor contents of the journal, starting with the oldest
0066eddda7203f6345b56f77d146a759298dc635gryzor entry collected.</para>
0066eddda7203f6345b56f77d146a759298dc635gryzor <para>If one or more match arguments are passed the
0066eddda7203f6345b56f77d146a759298dc635gryzor output is filtered accordingly. A match is in the
0066eddda7203f6345b56f77d146a759298dc635gryzor referring to the components of a structured journal
0066eddda7203f6345b56f77d146a759298dc635gryzor <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor for a list of well-known fields. If multiple matches
0066eddda7203f6345b56f77d146a759298dc635gryzor are specified matching different fields the log
0066eddda7203f6345b56f77d146a759298dc635gryzor entries are filtered by both, i.e. the resulting output
0066eddda7203f6345b56f77d146a759298dc635gryzor will show only entries matching all the specified
0066eddda7203f6345b56f77d146a759298dc635gryzor matches of this kind. If two matches apply to the same
0066eddda7203f6345b56f77d146a759298dc635gryzor field, then they are automatically matched as
0066eddda7203f6345b56f77d146a759298dc635gryzor alternatives, i.e. the resulting output will show
0066eddda7203f6345b56f77d146a759298dc635gryzor entries matching any of the specified matches for the
0066eddda7203f6345b56f77d146a759298dc635gryzor same field. Finally, if the character
0066eddda7203f6345b56f77d146a759298dc635gryzor "<literal>+</literal>" appears as separate word on the
0066eddda7203f6345b56f77d146a759298dc635gryzor command line all matches before and after are combined
0066eddda7203f6345b56f77d146a759298dc635gryzor matches file paths may be specified. If a file path
0066eddda7203f6345b56f77d146a759298dc635gryzor refers to an executable file, this is equivalent to an
0066eddda7203f6345b56f77d146a759298dc635gryzor binary path. Similar, if a path refers to a device
0066eddda7203f6345b56f77d146a759298dc635gryzor node, this is equivalent to a
0066eddda7203f6345b56f77d146a759298dc635gryzor device.</para>
0066eddda7203f6345b56f77d146a759298dc635gryzor <para>Output is interleaved from all accessible
0066eddda7203f6345b56f77d146a759298dc635gryzor journal files, whether they are rotated or currently
0066eddda7203f6345b56f77d146a759298dc635gryzor being written, and regardless whether they belong to the
0066eddda7203f6345b56f77d146a759298dc635gryzor system itself or are accessible user journals.</para>
0066eddda7203f6345b56f77d146a759298dc635gryzor <para>All users are granted access to their private
a025329610d2b832bb62bc34dd328985e14e8718lgentis per-user journals. However, by default only root and
0066eddda7203f6345b56f77d146a759298dc635gryzor group get access to the system journal and the
0066eddda7203f6345b56f77d146a759298dc635gryzor journals of other users.</para>
0066eddda7203f6345b56f77d146a759298dc635gryzor </refsect1>
a025329610d2b832bb62bc34dd328985e14e8718lgentis <variablelist>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
a025329610d2b832bb62bc34dd328985e14e8718lgentis </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor full, even if they include unprintable
0066eddda7203f6345b56f77d146a759298dc635gryzor characters or are very
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis </varlistentry>
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor journal entries, and continuously print
0066eddda7203f6345b56f77d146a759298dc635gryzor new entries as they are appended to
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor journal lines to show, counting from
0066eddda7203f6345b56f77d146a759298dc635gryzor the most recent ones. Takes a positive
0066eddda7203f6345b56f77d146a759298dc635gryzor integer argument. In follow mode
a025329610d2b832bb62bc34dd328985e14e8718lgentis defaults to 10, otherwise is unset
0066eddda7203f6345b56f77d146a759298dc635gryzor thus not limiting how many lines are
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh lines, even in follow mode. Undoes the
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor formatting of the journal entries that
0066eddda7203f6345b56f77d146a759298dc635gryzor are shown. Takes one of
0066eddda7203f6345b56f77d146a759298dc635gryzor is the default and generates an output
0066eddda7203f6345b56f77d146a759298dc635gryzor that is mostly identical to the
0066eddda7203f6345b56f77d146a759298dc635gryzor formatting of classic syslog log
0066eddda7203f6345b56f77d146a759298dc635gryzor files, showing one line per journal
0066eddda7203f6345b56f77d146a759298dc635gryzor is very similar but shows monotonic
0066eddda7203f6345b56f77d146a759298dc635gryzor timestamps instead of wallclock
0066eddda7203f6345b56f77d146a759298dc635gryzor shows the full structured entry items
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis serializes the journal into a binary
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh (but mostly text-based) stream
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis suitable for backups and network
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis transfer (see <ulink
0066eddda7203f6345b56f77d146a759298dc635gryzor url="http://www.freedesktop.org/wiki/Software/systemd/export">Journal
0066eddda7203f6345b56f77d146a759298dc635gryzor Export Format</ulink> for more
d28e54f867ab1292ce75324d90680396c1d5f47dlgentis formats entries as JSON data
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis structures, one per
0066eddda7203f6345b56f77d146a759298dc635gryzor also formats entries as JSON data
d28e54f867ab1292ce75324d90680396c1d5f47dlgentis structures, but formats them in
0066eddda7203f6345b56f77d146a759298dc635gryzor multiple lines in order to make them
0066eddda7203f6345b56f77d146a759298dc635gryzor more readable for
0066eddda7203f6345b56f77d146a759298dc635gryzor generates a very terse output only
0066eddda7203f6345b56f77d146a759298dc635gryzor showing the actual message of each
0066eddda7203f6345b56f77d146a759298dc635gryzor journal entry with no meta data, not
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor message regarding inaccessible system
0066eddda7203f6345b56f77d146a759298dc635gryzor journals when run as normal
a025329610d2b832bb62bc34dd328985e14e8718lgentis </varlistentry>
a025329610d2b832bb62bc34dd328985e14e8718lgentis <varlistentry>
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh interleaved from all available
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis journals, including remote
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor directory path as argument. If
a025329610d2b832bb62bc34dd328985e14e8718lgentis specified journalctl will operate on the
0066eddda7203f6345b56f77d146a759298dc635gryzor specified journal directory instead of
0066eddda7203f6345b56f77d146a759298dc635gryzor the default runtime and system journal
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
a025329610d2b832bb62bc34dd328985e14e8718lgentis <varlistentry>
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh message priorities or priority
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh ranges. Takes either a single numeric
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh or textual log level (i.e. between
0066eddda7203f6345b56f77d146a759298dc635gryzor the form FROM..TO. The log levels are
0066eddda7203f6345b56f77d146a759298dc635gryzor the usual syslog log levels as
0066eddda7203f6345b56f77d146a759298dc635gryzor documented in
0066eddda7203f6345b56f77d146a759298dc635gryzor <citerefentry><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
0066eddda7203f6345b56f77d146a759298dc635gryzor single log level is specified all
0066eddda7203f6345b56f77d146a759298dc635gryzor messages with this log level or a
0066eddda7203f6345b56f77d146a759298dc635gryzor lower (hence more important) log level
0066eddda7203f6345b56f77d146a759298dc635gryzor are shown. If a range is specified all
0066eddda7203f6345b56f77d146a759298dc635gryzor messages within the range are shown,
0066eddda7203f6345b56f77d146a759298dc635gryzor including both the start and the end
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh journal contents generate a new 128
784fd1e5958e08cf05cd929c6e6b117b06adc2cflgentis bit ID suitable for identifying
70d39834fda98ce22bd29dc44c5fae5c9abe3a06humbedooh messages. This is intended for usage
0066eddda7203f6345b56f77d146a759298dc635gryzor by developers who need a new
0066eddda7203f6345b56f77d146a759298dc635gryzor identifier for a new message they
0066eddda7203f6345b56f77d146a759298dc635gryzor introduce and want to make
0066eddda7203f6345b56f77d146a759298dc635gryzor recognizable. Will print the new ID in
0066eddda7203f6345b56f77d146a759298dc635gryzor three different formats which can be
0066eddda7203f6345b56f77d146a759298dc635gryzor copied into source code or
0066eddda7203f6345b56f77d146a759298dc635gryzor </varlistentry>
0066eddda7203f6345b56f77d146a759298dc635gryzor <varlistentry>
<para>If two different fields are matched only entries matching both expressions at the same time are shown:</para>
<para>If two matches refer to the same field all entries matching either expression are shown:</para>
<programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service</programlisting>
<programlisting>journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service</programlisting>
<citerefentry><refentrytitle>systemd-journald.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>,