Tuesday, October 5, 2010

Why syslog stops working ?

1. Could be because of space issue in /var
2. Could be because of spaces in /etc/syslog.conf

Check dmesg command and see when was the last log entry made. Also check if there is any space issue reported. If there was any space issues logged, clear the file systems and restart the daemon again.

The use of a space instead of a tab between facility.level and destination in /etc/syslog.conf will stop sylogd loging anything. Restore a fresh version of syslog.conf file and restart the daemon.

1. Check the syslog daemon and restart it if necessary.

(server1:/)# ps -ef | grep syslog
    root   226  7244   0 10:22:41 ?           0:01 /usr/sbin/syslogd
    root  3068  1691   0 10:07:58 pts/2       0:00 grep syslog

(server1:/)# svcs svc:/system/system-log:default
STATE          STIME    FMRI
online         Sep_28   svc:/system/system-log:default
(server1:/)#
(server1:/)# svcadm restart svc:/system/system-log:default
(server1:/)#
(server1:/)# svcs svc:/system/system-log:default
STATE          STIME    FMRI
online         12:39:27 svc:/system/system-log:default
(server1:/)#



Check the messages file and confirm if the logging is working fine after the corrections.

dmesg (or)
(server1:/)# ls -l /var/adm/messages
-rw-r--r--   1 root     root       46666 Oct  4 12:40 /var/adm/messages
(server1:/)#

No comments:

Post a Comment