讓journalctl永遠保留所有日誌(SystemMaxUse =無限)

讓journalctl永遠保留所有日誌(SystemMaxUse =無限)

我如何配置journald,使其永遠不會刪除我的日誌。

是的,我想做的是告訴日誌繼續寫入,直到磁碟(讀取:/var分割區的檔案系統)已滿。

不,我不希望它繼續儲存到記憶體中,直到 RAM 已滿。

根據man 5 journald.conf

SystemMaxUse=, SystemKeepFree=, SystemMaxFileSize=, SystemMaxFiles=,
RuntimeMaxUse=, RuntimeKeepFree=, RuntimeMaxFileSize=, RuntimeMaxFiles=
    Enforce size limits on the journal files stored. The options
    prefixed with "System" apply to the journal files when stored on a
    persistent file system
...
    The first pair defaults to 10% and the second to 15% of the size of
    the respective file system, but each value is capped to 4G.

因此預設是檔案系統的一定百分比,上限為 4G。不幸的是,我在上面的手冊頁中沒有看到任何關於如何將其設定為無限的提及。

如何讓我journald的日誌永不刪除?增加旋轉和壓縮等附加選項的獎勵積分。

相關內容