Skip to content

Instantly share code, notes, and snippets.

@zoonderkins
Last active November 7, 2021 06:13
Show Gist options
  • Save zoonderkins/32ba4ede0c796d72d1a45bf0082f32cd to your computer and use it in GitHub Desktop.
Save zoonderkins/32ba4ede0c796d72d1a45bf0082f32cd to your computer and use it in GitHub Desktop.
Linux control systemd

Linux control systemd

nano  /etc/systemd/journald.conf

# Set Max Use to 50M

[Journal]

SystemMaxUse=50M

Force log rotation

systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service

Check size

journalctl --disk-usage
Journals take up 3.8G on disk.

Clean based on time

journalctl --vacuum-time=3d

Clean based on Size

journalctl --vacuum-size=100M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment