syslog占满磁盘空间问题

发布时间 2023-04-24 14:41:04作者: Skyge

1.手动删除

echo /dev/null > /var/log/syslog

2.采用journald服务 https://itlanyan.com/clear-systemd-journal-logs/

/etc/systemd/journald.conf 

[Journal]
#Storage=auto
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitInterval=30s
#RateLimitBurst=1000
SystemMaxUse=1G
#SystemKeepFree=
#SystemMaxFileSize=
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=

sudo systemctl restart systemd-journald