Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Talking about Linux Log File

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

1. Type of log

Kernel system log: records common faults in the Linux kernel. Kernel logs are managed by rsyslog service.

User log: records user login to the system, starts or shuts down system information, and the user log is managed by rsyslog service

Program log: the program log is independent and records the running status information of the program or service.

two。 Common directories in logs

/ var/log: record the event information generated by the crond scheduled task

/ var/log/dmesg: record all kinds of event information of Linux operating system during boot process

/ var/log/maillog: record email activity entering or sending out the system

/ var/log/lastlog: record each user's most recent login event

/ var/log/secure: record security event information related to user authentication

/ var/log/wtmp: log each user login, logout, and system startup and downtime events

/ var/log/btmp: log failed and incorrect login attempts and authentication events

3. The security level of the log

0 Emergency EMERG: the system or host cannot be used

1 warning ALERT: the fault must be handled immediately

2 serious CRIT: compare verification error messages

3 error ERR: an error message appears to solve the problem

4 remind WARNING that it may affect the operation of the system and require users' attention.

5 Note NOTICE: it will not affect the normal use of the system.

6 Information INFO: general information

7 debug DEBUG: configure system or service information

Log messages are divided into different priorities according to their importance (the smaller the number, the higher the priority, and the more important the message)

4. For most log files managed by the rsyslog service, the logging format is basically the same. Take the public log / var/log/messages file recording format as an example, where each line represents a log message, and each message includes the following four fields

5. The cause of the failure

The virus destroys the system or file

Damage to the system or files caused by human misoperation

Hard disk failure data system damage caused by physical failure

6. Common types of failure

Missing MBR failed to boot the system

GRUB Boot menu failure system failed to boot

7. Fault solving ideas

Backup data

Use the system disk to enter first aid mode for repair

Restore data from backup

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report