Journalctl

From wikieduonline
Jump to navigation Jump to search

Journalctl command allows to query the contents of the systemd journal/logs.

Configuration

  • /etc/systemd/journald.conf

Basic Commands

  • journalctl[1] or journalctl --no-pager
  • journalctl -r (reverse order)
  • journalctl -k : Show only kernel messages
  • journalctl -f (follow)
  • journalctl -u service-name.service
-u unit_name
journalctl -u libvirtd
  • journalctl --verify
  • Disk Usage/Logging: /journalctl --disk-usage/
  • journalctl --vacuum-size=200M[2]
    • --vacuum-size=BYTES Reduce disk usage below specified size
    • --vacuum-files=INT Leave only the specified number of journal files
    • --vacuum-time=TIME Remove journal files older than specified time
  • journalctl --list-boots. See also: last (command)
  • journalctl -xb
-x --catalog Includes explanations in log lines from message catalgog
-b show message from current boot. if [ID] is provided will show messages from that specific boot.

See also

Advertising: