diff --git a/00. Inbox/Linux/journalctl.md b/00. Inbox/Linux/journalctl.md index e6a76a2..14f4507 100644 --- a/00. Inbox/Linux/journalctl.md +++ b/00. Inbox/Linux/journalctl.md @@ -109,10 +109,8 @@ sudo journalctl --vacuum-size=400M # 保留最後400M - `RuntimeKeepFree`: 指定将数据写入易失性存储(在 /run 文件系统内)时为其他用途预留的空间数量。例:`RuntimeMaxUse=100M` - `RuntimeMaxFileSize`: 指定单个日志文件在被轮换之前在易失性存储(在 /run 文件系统内)所能占用的空间量。例:`RuntimeMaxFileSize=200M` -修改後記得重啟`journalctl`: -```bash -sudo systemctl restart systemd-journald -``` +修改後記得重啟 `journalctl`: +![[journalctl#重啟日誌]] 也請記得[[確認日誌的完整性]] @@ -121,5 +119,11 @@ sudo systemctl restart systemd-journald journalctl --verify ``` +### 重啟日誌 +若是有改變設定,記得重啟以讓變更生效: +```shell +sudo systemctl restart systemd-journald +``` + ### 參考 - [系統運作|如何使用journalctl 檢視和分析systemd 日誌(附實例)](https://linux.cn/article-15544-1.html) \ No newline at end of file diff --git a/00. Inbox/樹莓派/設定日誌大小.md b/00. Inbox/樹莓派/設定日誌大小.md index c7dcc4e..521bf40 100644 --- a/00. Inbox/樹莓派/設定日誌大小.md +++ b/00. Inbox/樹莓派/設定日誌大小.md @@ -2,4 +2,6 @@ - `SystemMaxUse=1G` - `RuntimeMaxUse=100M` -[[journalctl]] \ No newline at end of file +![[journalctl#重啟日誌]] + +journalctl使用說明:[[journalctl]] \ No newline at end of file