Query the systemd journal

journalctl [options] [field=value]

Query the contents of the systemd journal.
Without parameters, shows the full content , starting with the oldest entry (see -r).

Output is filtered based on field=value example: "_SYSTEMD_UNIT=httpd.service" . See systemd.journal-fields(7)
Multiple field=value are anded unless field is the same, then ored.

"+" between other terms causes all matches before OR after .

Filter the entries by specifying an absolute file path as an argument, a file or a symbolic link .
When file path refers to an executable , an "_EXE=" match for the canonicalized binary path is added .
When a file path refers to an script, a "_COMM=" match for the script name is added .
When a file path refers to a device node, "_KERNEL_DEVICE=" matches for the kernel name of the device and for each of its ancestor devices is added .

Constraints using --boot, --unit=, etc., limit entries output(logical AND).

Output is interleaved from all journal files, whether they are rotated or currently being written including user journals.

The journals to be used can be restricted using --user, --system, --directory, and --file .

All users are can access their per-user journals.
Only root and members of systemd-journal adm and wheel can read all journal files.
Groups are granted access to the system journal and the journals of other users. adm and wheel have additional privileges.

The output is paged through less by default, and long lines are "truncated" to screen width. The truncated part can be viewed by using the left-arrow and right-arrow keys.

When outputting to a tty, lines are colored according to priority: lines of level ERROR and higher are red; lines of level oputputing and higher are highlighted; other lines are displayed normally.


Reverse so newest entries are displayed first.
Ellipsize fields when they do not fit. The default is to show full fields, allowing them to wrap or be truncated by the pager
Show all fields in full
Do not exit, rather display new entries as they are appended .
Implies --lines=10
Show the most recent events and limit the number of events .
all disables line limiting. The default value is 10
Start at the end inside the pager, implies -n1000 so the pager will not buffer logs of unbounded size. may be overridden with -n ,
-nall disables this cap. only for less
--no-tail Show all stored output lines, even in follow mode. Undoes the effect of --lines=.
Controls the formatting of the entries that are shown. Takes one of the following options:
short default generates output similar to classic syslog
cat very terse output, showing the actual message of with no metadata,
short-full shows timestamps as --since= and --until= options accepted include weekday, year and timezone information in the output, and is locale-independent.
short-iso shows (ISO 8601) T[hh][mm][ss] timestamps.
short-precise shows timestamps with microseconds.
short-monotonic shows monotonic timestamps
short-unix shows seconds since epoch.
verbose shows the full-structured entry items with all fields.
export serializes the journal into a binary (but mostly text-based) stream suitable for backups and network transfer (see Journal Export Format[1]
json formats entries as JSON data structures, one per line (see Journal JSON Format[2]
json-pretty formats entries as JSON more readable by humans.
json-sse formats entries as JSON data structures, wraps in a format suitable for Server-Sent Events[3].
--utc time UTC
--no-hostname Don't show the hostname field from the local host. only effect on the short form of output
Augment log lines with explanation texts 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.
help is not available for all messages. Refer to the Message Catalog Developer Documentation[4].
Suppresses info messages (i.e. "-- Logs begin at ...", "-- Reboot --"), warnings regarding inaccessible system journals when run as a normal user.
Show entries interleaved from all available journals, including remote ones.
--list-boots Show a list of boot numbers (relative to the current boot), IDs, and timestamps of the first and last message pertaining to the boot. Example:
 0 76727533a534499ebfe90a1f6c9eca7c Tue 2019-07-23 15:50:01 EDT<80><94>Sat 2019-07-27 21:30:01 EDT
Show messages from a specific boot. add a match for "_BOOT_ID=".
With no argument logs since the current boot will be shown.
If the boot ID is omitted, a positive offset refers to boots starting from the beginning of the journal.
ID0 offset will look up boots starting from the end of the journal.
1 refers to the first boot 2 the second; -0 is the last boot, -1 the boot before last, and so on.
An empty offset is equivalent to -0, except when the current boot is not the last boot (e.g. --directory was specified to look at logs from a different machine).

If the 32-character ID is specified, it may be followed by offset which identifies the boot relative to the one given by boot ID. Negative values mean earlier boots and positive values mean later boots.
If offset is not specified, a value of zero is assumed, and the logs for the boot given by ID are shown.

Show only kernel messages. implies --boot and adds match "_TRANSPORT=kernel".
Show messages for the specified syslog identifier SYSLOG_IDENTIFIER.
May be specified multiple times.
Show messages for the specified systemd unit UNIT (such as a service unit), or for any of the units matched by PATTERN. 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 ("_SYSTEMD_UNIT=UNIT"), along with additional matches for messages from systemd and messages about coredumps for the specified unit.
May be specified multiple times.
--user-unit= Show messages for the specified user session unit. This will add a match for messages from the unit ("_SYSTEMD_USER_UNIT=" and "_UID=") and additional matches for messages from session systemd and messages about coredumps for the specified unit.
May be specified multiple times.
--priority=n| emerg | alert | crit | err | warning | notice | debug
Filter output by priorities or ranges.
If a single level is specified, all messages with this level or a lower (more important) level are shown.
If a range is specified, messages with this level within the range, inclusive are shown. Adds PRIORITY="
show entries from the location
--show-cursor The cursor is shown after the last entry after two dashes: example:
 --cursor: s=0639…
--after-cursor= Show entries from the location after the location specified by the passed cursor.
--since=ccyy-mm-dd [hh:mm:ss]
--until= …
Start examining entries "on or newer then" or "on or older then" ccyy-mm-dd
hh:mm defaults to 00:00 and :ss :00 .
Date defaults to the current day.
yesterday, today, tomorrow?? are allowed, which refer to 00:00:00 of the day before the current day, the current day, or the day after the current day. now refers to the current time.
Finally, relative times may be specified, prefixed with "-" or "+", referring to times before or after the current time. For time and date specification, see systemd.time(7).
--output=short-full displays timestamps that follow this format.
output all possible data values the field can take in all entries of the journal.
output all field names currently used in all entries (43 )


--system Show messages from system services and the kernel
--userShow messages from services of current user (default)
Show messages from a running, local container.
-D dir
operate on a journal directory DIR instead of the default runtime and system journal paths.
--file=glob operate on the journal files matching GLOB …
May be specified multiple times, in which case files will be interleaved.
--root=root operate on journal directories and catalog file hierarchy below root instead of the root directory (e.g. --update-catalog will create ROOT/var/lib/systemd/catalog/database, and journal files under ROOT/run/journal or ROOT/var/log/journal will be displayed).
--new-id128 Generate a unique 128-bit ID for identifying messages.
--header show internal header information of the journal fields accessed.
--disk-usage Shows disk usage of all journal files including archived and active journal files.
Archived and active journals take up 21.6M 
Removes journal files until the disk space they use is below the size ("K", "M", "G" and "T" suffixes), or
all archived journal files contain no data older than the specified timespan (specified with the usual "s", "m", "h", "days", "months", "weeks" and "years" suffixes), or
no more than the specified number of separate journal files remain.
running --vacuum-size= has only an indirect effect on the output shown by --disk-usage, as the latter includes active journal files, while the vacuuming operation only operates on archived journal files. Similarly, Does not remove active journal files.

--vacuum-size=-,-vacuum-time= and --vacuum-files= may be combined
zero is equivalent to not enforcing the specific limit, and is thus redundant.

--list-catalog [128-bit-ID …] List the contents of the message catalog as a table of message IDs, plus their short description strings.
If any 128-bit-IDs are specified, only those entries are shown.
--dump-catalog [128-bit-ID...] 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 .catalog files). If any 128-bit-IDs are specified, only those entries are shown.
--update-catalog 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.
--setup-keys 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 Seal= option in journald.conf(5) for information on Forward Secure Sealing and for a link to a refereed scholarly paper detailing the cryptographic theory it is based on.
--force When --setup-keys is passed and Forward Secure Sealing (FSS) has already been configured, recreate FSS keys.
--interval= Specifies the change interval for the sealing key when generating an FSS key pair with --setup-keys. Shorter intervals increase CPU consumption but shorten the time range of undetectable journal alterations. Defaults to 15min.
--verify 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 --verify-key=, authenticity of the journal file is verified.
--verify-key= Specifies the FSS verification key to use for the --verify operation.
--sync Instructs journald to write all data to files and synchronize all journals.
Does not return until the synchronization is complete.
--flush daemon flushes data stored in /run/log/journal to /var/log/journal, if persistent storage is enabled.
Does not return until complete.
Idempotent: i.e. the data is flushed once during system runtime, and this command exits cleanly without executing any operation if this has already happened.
--rotate Instructs journald to rotate journal files.
Does not return until the rotation is complete.
--no-pager Do not pipe output into a pager.
Print a short help text and exit.
--version Print a short version string and exit.


Symbolic links are dereferenced, kernel names are synthesized, and parent devices are identified from the environment at the time of the query. In general, a device node is the best proxy for an actual device, as log entries do not usually contain fields that identify an actual device. For the resulting log entries to be correct for the actual device, the relevant parts of the environment at the time the entry was logged, in particular the actual device corresponding to the device node, must have been the same as those at the time of the query. Because device nodes generally change their corresponding devices across reboots, specifying a device node path causes the resulting entries to be restricted to those from the current boot.


$SYSTEMD_PAGER Pager to use when --no-pager is not given; overrides $PAGER. If neither $SYSTEMD_PAGER nor $PAGER are set, a set of well-known pager implementations are tried in turn, including less(1) and more(1), until one is found. If no pager implementation is discovered no pager is invoked. Setting this environment variable to an empty string or the value "cat" is equivalent to passing --no-pager.
$SYSTEMD_LESS Override the options passed to less (by default "FRSXMK").
$SYSTEMD_LESSCHARSET Override the charset passed to less (by default "utf-8", if the invoking terminal is determined to be UTF-8 compatible).


Without arguments, all collected logs are shown unfiltered: journalctl With one match specified, all entries with a field matching the expression are shown: journalctl _SYSTEMD_UNIT=avahi-daemon.service If two different fields are matched, only entries matching both expressions at the same time are shown: journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 If two matches refer to the same field, all entries matching either expression are shown: journalctl _SYSTEMD_UNIT=avahi-daemon.service _SYSTEMD_UNIT=dbus.service 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): journalctl _SYSTEMD_UNIT=avahi-daemon.service _PID=28097 + _SYSTEMD_UNIT=dbus.service Show all logs generated by the D-Bus executable: journalctl /usr/bin/dbus-daemon Show all kernel logs from previous boot: journalctl -k -b -1 Show a live log display from a system service apache.service: journalctl -f -u apache SEE ALSO systemd(1), systemd-journald.service(8), systemctl(1), coredumpctl(1), systemd.journal-fields(7), journald.conf(5), systemd.time(7)
systemctl  status systemd-journald
* systemd-journald.service - Journal Service
   Loaded: loaded (/lib/systemd/system/systemd-journald.service; static; vendor preset: enabled)
   Active: active (running) since Fri 2019-07-26 06:55:53 EDT; 1 day 13h ago
     Docs: man:systemd-journald.service(8)
 Main PID: 12704 (systemd-journal)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-journald.service
           `-12704 /lib/systemd/systemd-journald

Jul 26 06:55:48 pi93graf systemd-journald[12704]: Journal started
Jul 26 06:55:51 pi93graf systemd-journald[12704]: Runtime journal (/run/log/journal/2768cc53d7374a488f956ea7a5dc716e) is 21.6M, max 21.6M, 0B f
Jul 26 06:54:47 pi93graf systemd[1]: systemd-journald.service: Watchdog timeout (limit 3min)!
Jul 26 06:54:48 pi93graf systemd[1]: systemd-journald.service: Killing process 94 (systemd-journal) with signal SIGABRT.
NOTES 1. Journal Export Format 2. Journal JSON Format 3. Server-Sent Events 4. Message Catalog Developer Documentation systemd 232