In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Ubuntu Syslog configuration / var/log/messages example analysis, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
1. Problem description
I need to check the log file of the system today, but I can't find the file / var/log/messages. Search for information on the Internet, it is said to configure / etc/syslog.conf. Syslog adopts a configurable and unified system registration program to accept log requests from all parts of the system at any time, and then write the log information into the corresponding file, mail it to a specific user or send it directly to the console according to the preset settings in / etc/syslog.conf.
Okay, here's the problem again. There is still no / etc/syslog.conf in the system, after a search, the final conclusion is: the corresponding under Ubuntu should be / etc/rsyslog.conf and rsyslogd.
two。 Solution
For more information on the functions of syslog.conf files and files under syslog.d, please refer to the following article:
Https://www.jb51.net/article/164470.htm
By looking at the rsyslog.conf file, you can see that all the configuration files are in the / etc/rsyslog.d/ folder.
# / etc/rsyslog.conf Configuration file for rsyslog. # # For more information see # / usr/share/doc/rsyslog-doc/html/rsyslog_conf.html # # Default logging rules can be found in / etc/rsyslog.d/50-default.conf … ... # # Include all config files in / etc/rsyslog.d/ # $IncludeConfig / etc/rsyslog.d/*.conf
Open the / etc/rsyslog.d/50-default.conf file with vim and add a line as follows:
* .info;mail.none;authpriv.none;cron.none / var/log/messages
Restart the system, then check the system log and find that it is already okay! ^ _ ^
Thank you for reading this article carefully. I hope the article "Ubuntu Syslog configuration / sample Analysis of var/log/messages" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.