Linux system logs and rsyslog service

Source: Internet
Author: User
Tags rsyslog
Linux system logs and their rsyslog service logs are plain text files/var/logs used by the system to record some messages related to the system runtime to save a large number of logs of plain text logs. maintain the running status of related programs, error message. to analyze system running errors... linux system logs and rsyslog service
A log is a plain text file/var/log used by the system to record some related messages during system operation. it stores a large number of plain text log files to maintain the running status of related programs., error message. to analyze system running errors, use 1. kernel message 2. service message 3. application message this article will only involve saving logs and recording rsyslog is an enhancement of the old syslog version. you can view the current status through service rsyslog status and control rsyslog service viewing through service rsyslog start/stop/restart. generally, use the tail command to view the last 10 lines of logs (latest) you can also use tail-f to update/etc/rsyslog in real time. conf is the configuration file format of rsyslog XXX. YYY/var/filename XXX is the log Source. YYY is the priority, for example, kern. the error/var/kern_error configuration adds a minus sign (minus sign) before the kernel error is written to the specified file path, which improves the write efficiency, but may cause cache loss during power failure, such as kern. error-/var/kern_error you can also write the path as @ 192.168.1.1 and send it to the log server. @ indicates UDP and @ indicates TCP is recommended to use TCP Facility-log Source Facility message source kern kernel message user level message mail system message daemon kernel message auth authentication system message syslog log system message lpr print system message authpriv permission system message cron scheduled task message news system message uucp system message ftp service message Priority/Severity LevelEmergency the system is no longer available Alert must immediately handle Critical severe Error Warning Notice normal information, however, the more important information is the normal information of Informational. Debug debug information/the log file in var/log records the message file name and records the message boot. log start message secure user switch logon related message messages normal message dmesg kernel message messages normal message
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.