In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to view the linux error log". The editor shows you the operation process through the actual case. The operation method is simple, fast and practical. I hope this article "how to view the linux error log" can help you solve the problem.
The linux error log is in the "/ var/log/" directory, which is where the system log files are saved. There are two kinds of error logs of the system: 1, messages, which is the core system log file, which contains the boot information when the system is started, and other status messages when the system is running; 2, btmp, which records the log of error login.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Log file is an important system information file, which records many important system events, including user login information, system startup information, system security information, mail-related information, various service-related information and so on. Some of this information is very sensitive, so only root users can read these log files in Linux.
Location of the linux error log
The linux error log is in the "/ var/log/" directory.
The / var/ directory is the directory where the system dynamic data is stored, and the / var/log/ directory is the location where the system log files are saved.
Two types of error logs in the system:
The log file says / var/log/btmp records the log of the wrong login. This file is binary and cannot be viewed directly with Vi, but with the lastb command. The command is as follows:
[root@localhost log] # lastb
Root tty1 Tue Jun 4 22:38-22:38 (00:00)
# someone logged in error / var/log/messages at local terminal 1 with root users at 22:38 on June 4, which is the core system log file that contains boot information at system startup and other status messages when the system is running. Igamo errors, network errors, and other system errors are logged to this file. Other information, such as a person's identity switch to root, the log of the user-defined installation of the software, will also be listed here.
Description:
In addition to the system default log, the system service installed in the RPM package will also log in the / var/log/ directory by default (the service log installed by the source package is stored in the directory specified by the source package). However, these logs are not recorded and managed by rsyslogd services, but each service uses its own log management documents to record its own logs.
Extended knowledge: Linux View system error Log (latest)
In Linux, you can use the tail command to view
The tail command is used to view the data at the end of the file in the following basic format:
Tail [option] file name
Example: view the last 50 rows of records
That's all for tail-50 / var/log/messages about "how to check the linux error Log". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.