我运行的Ubuntu22.02与systemd-journal-remote版本的249.11-0ubuntu3.6.硬盘驱动器是满的,因为日志旋转没有设置。为了管理日志的文件大小,我在/etc/systemd/journal-remote.conf.d/01-central-log.conf上用MaxFiles和MaxUse两个属性更新了配置。不幸的是,这些属性没有得到尊重,当我重新启动systemd日志远程服务时会引发以下错误:
Jan 27 10:20:11 log-server systemd-journal-remote[949021]: /etc/systemd/journal-remote.conf:18: Unknown key name 'MaxUse' in section 'Remote', ignoring.
Jan 27 10:20:11 log-server systemd-journal-remote[949021]: /etc/systemd/journal-remote.conf:18: Unknown key name 'MaxFiles' in section 'Remote', ignoring.我也尝试过直接更新/etc/systemd/journal-remote.conf。相同结果
这是我在/etc/systemd/journal-remote.conf.d/01-central-log.conf的配置
# This file overrides /etc/systemd/journal-remote.conf
[Remote]
# keep only 20 journal files as we have 20 logging servers
# MaxFiles only effects archives. Journal files that are used are not deleted!
MaxFiles=20
# Limit size of Journals to 20GB in total
MaxUse=20G我已经发现并验证了该属性是MaxUse,而不是SystemMaxUse,因为它适用于系统范围的设置。在手册这里和来源中都有发现。
有人能帮我做错事吗?
发布于 2023-02-09 20:29:51
我收到了systemd新闻组的一个用户的答复。配置属性是正确的,并放在正确的文件中。
问题是,正如他所提到的,免费下载手册页“反映了主分支的最新状态,或最新的标记”。因此,该网站显示了一个版本的文档,该版本尚未由Linux发行商发布。
因此,对于像我这样遇到问题的人:尊重已安装的systemd软件的适当手册页版本,而不是使用freedesktop手册页:man journal-remote.conf。
https://serverfault.com/questions/1121275
复制相似问题