Shivkumar Mallesappa
Shivkumar Mallesappa

Reputation: 3077

How to get syslog file in Redhat

I have installed collectd on my Red Hat Enterprise Linux 7.2 server.

I have also installed it on ubuntu 14.04 server.

In ubuntu when I run the service collectd and face any error , I can easily go to /var/log/syslog to get the error message and reason.

But when I get error message on my Red Hat server like this :

enter image description here

and I go to /var/log I did not get the file syslog.

As I don't have much/no experience with Red Hat , can some body tell me where to find syslog file in Red Hat server in order to trouble shoot my errors.

Thank you.

Upvotes: 5

Views: 48872

Answers (4)

Chris C
Chris C

Reputation: 1082

RH uses journald for logging and has moved away from syslog and flat files per se. The best thing to do is to look at the logs for your specific service. Such as:

sudo journalctl -u <service/yourservice.service>

You can also lots of output options such as output in JSON or only output for the past hour

sudo journalctl -u <service> --since "1 hour ago"

Look here for an extensive overview of what you can do with journald commands: Journald system logs tutorial

Upvotes: 7

joko pram
joko pram

Reputation: 31

systemclt status yourservice.service

complete syslog will be on /var/log

if you not configure on rsyslog.conf file. all your apps will be log on messages file

less /var/log/messages

Upvotes: 3

Bhakti Bhoj
Bhakti Bhoj

Reputation: 49

log files are present under /var/log but if you want to see perticular process log then u can also give grep command along with that another way is

systemctl status processname

Upvotes: 0

lzap
lzap

Reputation: 17173

RHEL 7.x uses journald for logging, your installation might not have syslog redirection enabled. To view system log use journalctl.

Upvotes: 0

Related Questions