当前位置:网站首页>Log service management

Log service management

2022-06-30 07:29:00 My deep blue

Log service management

/root/install.log: The software package installed in the system and its version information are stored
/root/install.log.syslog: The event records left during the installation process are stored
/root/anaconda-ks.cfg: With Kickstart with Set the file format to record the option information set during installation

Common log files

Log files explain
/var/log/cron Logs related to system timing tasks are recorded .
/var/1og/cups/ Log printing information
/var/log/dmesg It records the information of kernel self-test when the system is powered on . You can also use Amesg Command to view kernel self test information directly .
/var/log/btmp Log error log . This file is binary , Not directly vi see , To use lastb Command view
/var/log/lastlog Log the last login time of all users in the system . Not directly vi, And you want to use lastlog Command view .
/var/ log/mailog Record mail information . A log of important information about a system . This log file will record Linux System size
/var/1og/message Most important information , If there is a problem with the system , The first thing to check is this log file . Record verification and authorization information ,) Any program involving accounts and passwords will be recorded .
/var/1og/secure For example, system login ,ssh The login ,su Switching users ,sudo to grant authorization , Even adding users and changing user passwords will be recorded in this log file . Log in all users permanently 、 Cancellation information , Simultaneously record the start-up of the system 、 restart 、
/var/1og/wtmp Shutdown event . This file is also a binary , Not directly vi, It needs to be used last Order to see . Record the information of the currently logged in user . This file will follow the user's login and notes
/var/run/utmp And constantly changing , Record only the information of the currently logged in user . Also, this file cannot be directly vi, And you want to use w,who, users etc. Order to inquire .

In addition to the system default log , use RPM The system service installed in mode will also log in by default /var/log/ Directory ( The service log of the source package installation is in the specified directory of the source package ). But these logs are not written by rsyslogd Services to record and manage , Instead, each service uses its own log management document to record its own logs .

Log files explain
/var/log/ httpd/RPM Packages installed apache Default log directory for services
/var/1og/mail/RPM Additional log directory for package installed mail service
/var/ log/ samba/RPM Packages installed samba Under the log directory of the service
/var/log/sssd/ Daemons security service directory

rsyslog

  • rsyslogd New features

be based on TCP Network protocol transport log information ;
More secure network transmission mode ;
A timely analysis framework with log messages ;
Background database ;
Simple logic judgment can be written in the configuration file
And syslog with Set file compatible .

  • The basic log format consists of the following four columns :
    1、 Time of occurrence ;
    2、 Host name of the server where the event occurred ;
    3、 The name of the service or program that generated the event ;
    4、 Details of the incident .
Log type explain
authpam Generated log
suthprivssh,ftp Verification information of login information
cron Time task related
kern kernel
lpr Print
mail mail
mark(syslog)-rlog Information within the service , Time signs
news Newsgroups
user Information generated by the user program
uucpunix to unix copy,unix Communication between hosts
local 1~7 Custom log device
The level of logging explain
debug Having tonal information , Log information is the most
info General information log , The most commonly used
notice The most important common condition of information
warning Warning level
err error level , Information that prevents a function or module from working properly
crit Severity level , Information that prevents the entire system or software from working properly
alert Information that needs to be changed immediately
emerg Kernel crash and other serious information
none Nothing is recorded
原网站

版权声明
本文为[My deep blue]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202160541594258.html