要查看syslog服务是否开启,可以使用以下命令:
systemctl status rsyslog
● rsyslog.service - System Logging Service
Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-01-12 10:10:15 UTC; 5min ago
Docs: man:rsyslogd(8)
http://www.rsyslog.com/doc/
Main PID: 1234 (rsyslogd)
Tasks: 3 (limit: 949)
Memory: 2.8M
CGroup: /system.slice/rsyslog.service
└─1234 /usr/sbin/rsyslogd -n
● rsyslog.service - System Logging Service
Loaded: loaded (/lib/systemd/system/rsyslog.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:rsyslogd(8)
http://www.rsyslog.com/doc/
通过以上命令,你可以轻松检查syslog服务的状态。