Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active April 2, 2023 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacr/428e55bae6fa8a3819bc5e94676f2650 to your computer and use it in GitHub Desktop.
Save dacr/428e55bae6fa8a3819bc5e94676f2650 to your computer and use it in GitHub Desktop.
journald cheat sheet / published by https://github.com/dacr/code-examples-manager #1b94727a-5226-4925-a620-881f0184e1ae/85357cbcdac4da0455b7e656056161ca48f46d03

journald cheat sheet

basic usages

journalctl -f

journalctl CONTAINER_NAME=my-docker-container

journalctl --since "2020-12-01 17:15:00" CONTAINER_NAME=my-docker-container

journalctl --since 09:00 --until "1 hour ago" CONTAINER_NAME=my-docker-container

journalctl -u kafka.service --since today

journalctl --disk-usage

journalctl --since "2021-01-20 10:00:00" --until "2021-01-20 17:00:00" CONTAINER_NAME=my-docker-container

journalctl -fu docker

when journald removes log entries

if journald show such messages : systemd-journald[...]: Suppressed 42 messages from ...)

Tune the configuration in /etc/systemd/journald.conf | /etc/systemd/journald.conf:

RateLimitInterval=0
RateLimitBurst=0

Defaults come with RateLimitInterval=30s & RateLimitBurst=1000.

=> systemctl restart systemd-journald

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment