Introduction to Linux Logs basics

Source: Internet
Author: User
Tags rsyslog
Common logs on Linux are:
1./var/log/cron Query crontab has not been executed, whether there is a problem.
2./VAR/LOG/DMESG records the information generated by the kernel detection process when it is powered on.
3./var/log/lastlog records the information about the last time the system was logged on to all the accounts on the system.
4./var/log/secure logs information about all account passwords that are logged into Linux.
5./var/log/messages system error or important information will be logged to this file

Log file generation:
1. Software developers define their own written logs, such as Apache
2. There are log file management services provided by Linux distribution for unified management, such as SYSLOG,CENTOS6 is Rsyslog.
Log files are getting larger, read-write efficiency is poor, reading from disk to memory, need to consume a lot of memory. Log files need to be backed up and updated by logrotate (log file rotation) for Automatic Updates. ---Replace the old log file with a name and create a new log file.

I am installing linux6.5 here. So the next introduction rsyslog this daemon configuration file/etc/rsyslog.conf, first look at the

The syntax in this file is
Service name [link symbol] Information level information record the file name or device or host
. Indicates a record that is higher than an information level.
. = indicates a requirement record equal to an information level.
.! Indicates that it is not equal to a level of information to be recorded.
Journal Rotation logrotate Introduction
Configuration file/etc/logrotate.conf Introduction

Introduction to Linux Logs basics

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.