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