Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to check syslog in Bash on Linux?

Tags:

linux

bash

syslog

In C we log this way:

syslog( LOG_INFO, "proxying %s", url ); 

In Linux how can we check the log?

like image 897
kern Avatar asked May 20 '11 15:05

kern


People also ask

How do I see syslog in Linux?

Linux logs will display with the command cd/var/log. Then, you can type ls to see the logs stored under this directory. One of the most important logs to view is the syslog, which logs everything but auth-related messages. Issue the command var/log/syslog to view everything under the syslog.

How do I find my syslog?

syslog() generates a log message, which will be distributed by syslogd. The file to configure syslogd is /etc/syslog. conf. This file will tell your where the messages are logged.

What is syslog in Linux?

Syslog is a protocol and utility for capturing and logging system information. This system information can be stored locally, remotely, or both. syslog allows a server to forward log messages over the network to SL1. SL1 then uses these messages to monitor the health of the server and trigger events (if necessary).

How do I view syslog in Ubuntu?

Click on the Syslog tab to view system logs. You can search for a specific log by using ctrl+F control and then enter the keyword. When a new log event is generated, it is automatically added to the list of logs and you can see it in bolded form.


2 Answers

How about less /var/log/syslog?

like image 70
NPE Avatar answered Sep 27 '22 19:09

NPE


On Fedora 19, it looks like the answer is /var/log/messages. Although check /etc/rsyslog.conf if it has been changed.

like image 37
Hackonteur Avatar answered Sep 27 '22 19:09

Hackonteur