【问题标题】:systemd messages not showing in /var/log/messages/var/log/messages 中未显示 systemd 消息
【发布时间】:2016-02-29 11:29:12
【问题描述】:

systemd 版本是 systemd-201-2.fc18.9.i686 journald 被屏蔽了。 rsyslog 版本为 rsyslog-7.2.6

我看到 /var/log/messages 中出现的所有消息日志,除了 systemd 消息。 我在 dmesg 缓冲区中看到 systemd 消息,但在 /var/log/messages 中没有。

在 /etc/systemd/system.conf 我也有 "LogTarget=syslog-or-kmsg"

仍然无法在 /var/log/messages 中看到任何 systemd 消息。 有人可以帮忙解释一下 syslog-or-kmsg 到底是什么意思吗,我找不到很好的解释。

这是rsyslog.service的内容

在 /usr/lib/systemd/system/rsyslog.service

[Unit]
Description=System Logging Service

[Service]
EnvironmentFile=-/etc/sysconfig/rsyslog
ExecStart=/sbin/rsyslogd -n
Sockets=syslog.socket
StandardOutput=null

[Install]
WantedBy=multi-user.target
Alias=syslog.service

/etc/sysconfig/rsyslog 的内容

# NOTE NOTE NOTE NOTE NOTE
#
# This file is AUTO-GENERATED based on the system's configuration.
# Any modifications you make to this file will be lost when the
# system's configuration is changed, e.g. from the CLI.
#

SYSLOGD_OPTIONS=""

# End of auto-generated file

【问题讨论】:

    标签: logging fedora syslog rsyslog systemd


    【解决方案1】:

    我不确定 Fedora 的具体情况,但他们说,有一个名为 journald.conf 的文件并在其中设置:ForwardToSyslog=nosystemd 版本 216 以来。此设置设置为 rsyslog/syslog-ng 自版本 3.6 到期它将从套接字/run/systemd/journal/syslog 获取消息。

    【讨论】:

    • 嗯...但我已经屏蔽了日志服务并直接使用 rsyslog。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-27
    • 1970-01-01
    • 2017-04-29
    相关资源
    最近更新 更多