Think before you speak, read before you think.

journalctl

查看某个 unit 的日志

journalctl -u docker
journalctl -f

配置文件

/etc/systemd/journald.conf

重启

systemctl restart systemd-journald.service

清理 journal log

只保留两天

journalctl --vacuum-time=2d

只保留 500M

journalctl --vacuum-size=500M

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *