syslog location in Redhat 6

Posted by Md. Mahidul Hasan on 1:05 AM with No comments

Troubleshooting Experience:

What is syslog?
- Syslog keeps all the error report of the system. It is extremely necessary for the system administrators to monitor the system status to find out/ troubleshoot any system related issue.

Where is the syslog location in Redhat 6?
- Silly question. But amazingly I didn't find any syslog location in redhat. After some googling I find out that by defaults syslog is not enabled in redhat. We need to enable it manually for the first time. And this is how I did it:

First check that sysconfig package in installed to your system:
[root@mahidul ~]# rpm -qa | grep syslog
rsyslog-gssapi-4.6.2-12.el6.x86_64
rsyslog-mysql-4.6.2-12.el6.x86_64
rsyslog-relp-4.6.2-12.el6.x86_64
rsyslog-4.6.2-12.el6.x86_64
rsyslog-gnutls-4.6.2-12.el6.x86_64
sblim-cmpi-syslog-0.8.0-1.el6.x86_64
rsyslog-pgsql-4.6.2-12.el6.x86_64

If its not installed by default then install it like this way:
[root@mahidul ~]# yum install -y rsyslog

Check the syslog status:
[root@mahidul ~]# service rsyslog status

Restart the service:
[root@mahidul ~]# service rsyslog restart

Start syslog after every time system restart:
[root@mahidul ~]# chkconfig rsyslog on

Optional, If you try to change/customize the syslog settings edit the below location:
[root@mahidul ~]# vim /etc/rsyslog.conf

At last check the syslog:
[root@mahidul ~]# tail -f /var/log/messages