3
.\" Author: Lennart Poettering <lennart@poettering.net>
4
.\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
10
.TH "JOURNALCTL" "1" "" "systemd" "journalctl"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
25
.\" disable justification (adjust text to left margin only)
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
31
journalctl \- Query the systemd journal
33
.HP \w'\fBjournalctl\ \fR\fB[OPTIONS...]\fR\fB\ \fR\fB[MATCHES...]\fR\ 'u
34
\fBjournalctl \fR\fB[OPTIONS...]\fR\fB \fR\fB[MATCHES...]\fR
38
may be used to query the contents of the
41
\fBsystemd-journald.service\fR(8)\&.
43
If called without parameter it will show the full contents of the journal, starting with the oldest entry collected\&.
45
If one or more match arguments are passed the output is filtered accordingly\&. A match is in the format
47
_SYSTEMD_UNIT=httpd\&.service, referring to the components of a structured journal entry\&. See
48
\fBsystemd.journal-fields\fR(7)
49
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 "+" appears as separate word on the command line all matches before and after are combined in a disjunction (i\&.e\&. logical OR)\&.
51
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
53
match for the canonicalized binary path\&. Similar, if a path refers to a device node, this is equivalent to a
55
match for the device\&.
57
Output is interleaved from all accessible journal files, whether they are rotated or currently being written, and regardless whether they belong to the system itself or are accessible user journals\&.
59
All users are granted access to their private per\-user journals\&. However, by default only root and users who are members of the
61
group get access to the system journal and the journals of other users\&.
64
The following options are understood:
66
\fB\-h\fR, \fB\-\-help\fR
68
Prints a short help text and exits\&.
73
Prints a short version string and exits\&.
78
Do not pipe output into a pager\&.
83
Show all (printable) fields in full\&.
86
\fB\-a\fR, \fB\-\-all\fR
88
Show all fields in full, even if they include unprintable characters or are very long\&.
91
\fB\-f\fR, \fB\-\-follow\fR
93
Show only the most recent journal entries, and continuously print new entries as they are appended to the journal\&.
96
\fB\-e\fR, \fB\-\-pager\-end\fR
98
Immediately jump to the end of the journal inside the implied pager tool\&. This implies
100
to guarantee that the pager won\*(Aqt buffer logs of unbounded size\&. This may be overriden with an explicit
102
with some other numeric value on the command line\&. Note that this option is only supported for the
107
\fB\-n\fR, \fB\-\-lines=\fR
109
Show the most recent journal events and limit the number of events shown\&. If
111
is used, this option is implied\&. The argument, a positive integer, is optional, and defaults to 10\&.
116
Show all stored output lines, even in follow mode\&. Undoes the effect of
120
\fB\-r\fR, \fB\-\-reverse\fR
122
Reverse output, so the newest entries are displayed first\&.
125
\fB\-o\fR, \fB\-\-output=\fR
127
Controls the formatting of the journal entries that are shown\&. Takes one of
137
is the default and generates an output that is mostly identical to the formatting of classic syslog log files, showing one line per journal entry\&.
139
is very similar but shows monotonic timestamps instead of wallclock timestamps\&.
141
shows the full structured entry items with all fields\&.
143
serializes the journal into a binary (but mostly text\-based) stream suitable for backups and network transfer (see
144
\m[blue]\fBJournal Export Format\fR\m[]\&\s-2\u[1]\d\s+2
145
for more information)\&.
147
formats entries as JSON data structures, one per line (see
148
\m[blue]\fBJournal JSON Format\fR\m[]\&\s-2\u[2]\d\s+2
149
for more information)\&.
151
also formats entries as JSON data structures, but formats them in multiple lines in order to make them more readable for humans\&.
153
also formats entries as JSON data structures, but wraps them in a format suitable for
154
\m[blue]\fBServer\-Sent Events\fR\m[]\&\s-2\u[3]\d\s+2\&.
156
generates a very terse output only showing the actual message of each journal entry with no meta data, not even a timestamp\&.
159
\fB\-x\fR, \fB\-\-catalog\fR
161
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
162
\m[blue]\fBMessage Catalog Developer Documentation\fR\m[]\&\s-2\u[4]\d\s+2\&.
165
\fB\-q\fR, \fB\-\-quiet\fR
167
Suppresses any warning message regarding inaccessible system journals when run as normal user\&.
170
\fB\-m\fR, \fB\-\-merge\fR
172
Show entries interleaved from all available journals, including remote ones\&.
175
\fB\-b\fR, \fB\-\-this\-boot\fR
177
Show data only from current boot\&. This will add a match for
179
for the current boot ID of the kernel\&.
182
\fB\-u\fR, \fB\-\-unit=\fR
184
Show data only of the specified unit\&. This will add a match for
186
for the specified unit\&.
189
\fB\-\-user\-unit=\fR
191
Show data only of the specified user session unit\&. This will add a match for
193
for the specified unit\&.
196
\fB\-p\fR, \fB\-\-priority=\fR
198
Filter output by message priorities or priority ranges\&. Takes either a single numeric or textual log level (i\&.e\&. between 0/emerg
199
and 7/debug), 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
200
\fBsyslog\fR(3), i\&.e\&.
216
(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
218
matches for the specified priorities\&.
221
\fB\-c\fR, \fB\-\-cursor=\fR
223
Start showing entries from the location in the journal specified by the passed cursor\&.
226
\fB\-\-since=\fR, \fB\-\-until=\fR
228
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 "2012\-10\-30 18:17:16"\&. If the time part is omitted, 00:00:00 is assumed\&. If only the seconds component is omitted, :00 is assumed\&. If the date component is omitted, the current day is assumed\&. Alternatively the strings
232
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\&.
234
refers to the current time\&. Finally, relative times may be specified, prefixed with
237
+, referring to times before or after the current time, respectively\&.
240
\fB\-F\fR, \fB\-\-field=\fR
242
Print all possible data values the specified field can take in all entries of the journal\&.
245
\fB\-D\fR, \fB\-\-directory=\fR
247
Takes an absolute directory path as argument\&. If specified journalctl will operate on the specified journal directory instead of the default runtime and system journal paths\&.
252
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\&. Will print the new ID in three different formats which can be copied into source code or similar\&.
257
Instead of showing journal contents show internal header information of the journal fields accessed\&.
260
\fB\-\-disk\-usage\fR
262
Shows the current disk usage of all journal files\&.
265
\fB\-\-list\-catalog\fR
267
List the contents of the message catalog, as table of message IDs plus their short description strings\&.
270
\fB\-\-update\-catalog\fR
272
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\&.
275
\fB\-\-setup\-keys\fR
277
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\&.
282
Specifies the change interval for the sealing key, when generating an FSS key pair with
283
\fB\-\-setup\-keys\fR\&. Shorter intervals increase CPU consumption but shorten the time range of undetectable journal alterations\&. Defaults to 15min\&.
288
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
289
\fB\-\-verify\-key=\fR
290
authenticity of the journal file is verified\&.
293
\fB\-\-verify\-key=\fR
295
Specifies the FSS verification key to use for the
301
On success 0 is returned, a non\-zero failure code otherwise\&.
308
is not given; overrides
309
\fI$PAGER\fR\&. Setting this to an empty string or the value
311
is equivalent to passing
312
\fB\-\-no\-pager\fR\&.
316
Without arguments all collected logs are shown unfiltered:
328
With one match specified all entries with a field matching the expression are shown:
334
journalctl _SYSTEMD_UNIT=avahi\-daemon\&.service
340
If two different fields are matched only entries matching both expressions at the same time are shown:
346
journalctl _SYSTEMD_UNIT=avahi\-daemon\&.service _PID=28097
352
If two matches refer to the same field all entries matching either expression are shown:
358
journalctl _SYSTEMD_UNIT=avahi\-daemon\&.service _SYSTEMD_UNIT=dbus\&.service
364
If the separator "+" 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):
370
journalctl _SYSTEMD_UNIT=avahi\-daemon\&.service _PID=28097 + _SYSTEMD_UNIT=dbus\&.service
376
Show all logs generated by the D\-Bus executable:
382
journalctl /usr/bin/dbus\-daemon
388
Show all logs of the kernel device node
404
\fBsystemd-journald.service\fR(8),
406
\fBsystemd.journal-fields\fR(7),
407
\fBjournald.conf\fR(5)
410
Journal Export Format
412
\%http://www.freedesktop.org/wiki/Software/systemd/export
417
\%http://www.freedesktop.org/wiki/Software/systemd/json
422
\%https://developer.mozilla.org/en-US/docs/Server-sent_events/Using_server-sent_events
425
Message Catalog Developer Documentation
427
\%http://www.freedesktop.org/wiki/Software/systemd/catalog