Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Storage lifespan with 20 GB (20,480 MB)
- 1 unit
- 20,480 ÷ 1.5 ≈ 13,653 days ≈ 37.4 years
- 10 units
- 15 MB/day → 20,480 ÷ 15 ≈ 1,365 days ≈ 3.7 years
- 25 units
- 37.5 MB/day → 20,480 ÷ 37.5 ≈ 546 days ≈ 1.5 years
- 50 units (worst case)
- 75 MB/day → 20,480 ÷ 75 ≈ 273 days ≈ 0.75 years
- journalctl --vacuum-size=500M
- journalctl --vacuum-time=30d
- journalctl --vacuum-files=10
- ## Journal Vacuum
- /etc/systemd/journald.conf
- SystemMaxUse=500M # total disk usage cap
- SystemKeepFree=100M # leave this much free space
- SystemMaxFileSize=50M # max size per journal file
- MaxRetentionSec=30day # max age
- #logrotate:
- /etc/logrotate.conf
- $ cat /etc/logrotate.conf
- # see "man logrotate" for details
- # global options do not affect preceding include directives
- # rotate log files weekly
- weekly
- # use the adm group by default, since this is the owning group
- # of /var/log/syslog.
- su root adm
- # keep 4 weeks worth of backlogs ##
- rotate 4
- # create new (empty) log files after rotating old ones
- create
- # use date as a suffix of the rotated file
- #dateext
- # uncomment this if you want your log files compressed
- #compress
- # packages drop log rotation information into this directory
- include /etc/logrotate.d
- ## actual log config:
- $ cat /etc/logrotate.d/rsyslog
- /var/log/syslog
- /var/log/mail.info
- /var/log/mail.warn
- /var/log/mail.err
- /var/log/mail.log
- /var/log/daemon.log
- /var/log/kern.log
- /var/log/auth.log
- /var/log/user.log
- /var/log/lpr.log
- /var/log/cron.log
- /var/log/debug
- /var/log/messages
- {
- rotate 4
- weekly
- missingok
- notifempty
- compress
- delaycompress
- sharedscripts
- postrotate
- /usr/lib/rsyslog/rsyslog-rotate
- endscript
- }
Advertisement
Add Comment
Please, Sign In to add comment