From Fedora Project Wiki
(First version) |
(minor changes) |
||
Line 6: | Line 6: | ||
# Switch to root user: {{command | su -}} | # Switch to root user: {{command | su -}} | ||
# Check if rsyslog service is running and enabled at boot: {{command| systemctl status rsyslog.service}} | # Check if rsyslog service is running and enabled at boot: {{command| systemctl status rsyslog.service}} | ||
# Check if | # Check if system logging facility is working ({{command|tail}} can be replaced with {{command|less}} in the following): | ||
## {{command| tail /var/log/messages}} | ## {{command| tail /var/log/messages}} | ||
## {{command| tail /var/log/secure}} | ## {{command| tail /var/log/secure}} |
Latest revision as of 08:56, 23 June 2011
Description
This test case tests if system logging is available, enabled by default and working as expected.
Setup
- Ensure that
rsyslog
packages is installed.
How to test
- Switch to root user:
su -
- Check if rsyslog service is running and enabled at boot:
systemctl status rsyslog.service
- Check if system logging facility is working (
tail
can be replaced withless
in the following):tail /var/log/messages
tail /var/log/secure
Expected Results
- rsyslog must be running and active at boot, the output of
systemctl
should be like:# systemctl status rsyslog.service rsyslog.service - System Logging Service Loaded: loaded (/lib/systemd/system/rsyslog.service) Active: active (running) since Thu, 23 Jun 2011 08:12:31 +0100; 23min ago Process: 576 ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service (code=exited, status=0/SUCCESS) Main PID: 613 (rsyslogd) CGroup: name=systemd:/system/rsyslog.service └ 613 /sbin/rsyslogd -n -c 5
- Log files should not be empty.
- The last entries in logs should correspond to the current date and time.