Journalctl: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
* https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/s1-using_the_journal
=Internal=
=Internal=
 
* [[Systemd_Operations#journalctl|systemd Operations]]
* [[systemd#Operations|systemd]]
* [[systemctl]]
* [[systemctl]]


=Overview=
=Overview=


<tt>journalctl</tt> may be used to query the contents of the <tt>systemd</tt> journal as written by <tt>systemd-journald.service</tt>.
<tt>journalctl</tt> may be used to query the contents of the systemd journal as written by systemd-journald.service. For more details about journald see: {{Internal|Linux Logging Concepts#journald|journald Concepts}}


If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.
If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.
Line 37: Line 40:


Immediately jump to the end of the journal.
Immediately jump to the end of the journal.
=-n=
Only display the specified number of recent log lines.
=-o=
====verbose====
View full metadata about entries.
journalctl -o verbose

Latest revision as of 22:23, 19 August 2023

External

Internal

Overview

journalctl may be used to query the contents of the systemd journal as written by systemd-journald.service. For more details about journald see:

journald Concepts

If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected.

-f (follow)

Continuous output. Equivalent with tail -f

-u (unit)

-u, --unit=

Show messages for the specified systemd unit. This will add a match for messages from the unit ("_SYSTEMD_UNIT=") and additional matches for messages from systemd and messages about coredumps for the specified unit. This parameter can be specified multiple times.

-r (reverse)

-r, --reverse

Reverse output, so the newest entries are displayed first.

-x

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.

-e

Immediately jump to the end of the journal.

-n

Only display the specified number of recent log lines.

-o

verbose

View full metadata about entries.

journalctl -o verbose