In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux system hardware fault log example analysis, the article introduces in great detail, has a certain reference value, interested friends must read it!
Syslog records information about hardware, software, and system problems in the system, as well as monitoring events that occur in the system. Users can use it to check the cause of errors, many different things can cause problems with Linux hardware under Linux, and it is wise to check the hardware failure log before starting to diagnose them.
The first step in quickly troubleshooting devices, modules, and drivers is usually to display a list of hardware installed on the Linux server. You can get detailed information about hardware using LS and other commands such as lspci, lsblk, lscpu, and using lsscsi. For example, the following is the output of the lsblk command:
# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT xvda 202└─ 0 050G 0 disk ├─ xvda1 202 └─ 01M 0 part └─ xvda2 202└─ 20 50G 0 part / xvdb 202 disk xvdb1 202 xvdb1 if the ls command does not show any errors, use the init process (for example, systemd) to see how the Linux server works. Systemd is the most popular initialization process used to guide user space and control multiple system processes. For example, this is the output of the systemctl status command:
# systemctl status ● bastion.f347.internal State: running Jobs: 0 queued Failed: 0 units Since: Wed 2018-11-28 01:29:05 UTC 2 days ago CGroup: / ├─ 1 / usr/lib/systemd/systemd-- switched-root-- system-- deserialize 21 ├─ kubepods.slice │ ├─ kubepods-pod3881728a_f2af_11e8_af77_06af52f87498.slice │ ├─ docker-88b27385f4bae77bba834fbd60a61d19026bae13d18eb147783ae27819c34967.scope │ └─ 23860 / opt/bridge/bin/bridge-public-dir=/opt/bridge/static-config=/var/console-config/console-c │ │ └─ docker-a4433f0d523c7e5bc772ee4db1861e4fa56c4e63a2d48f6bc831458c2ce9fd2d.scope │ │ └─ 23639 / usr/bin/pod.... Mining multiple logs Dmesg allows you to find errors and warnings in the latest kernel messages. For example, this is the output of dmesg |. More commands:
# dmesg | more.... Same superblock, different security settings for (dev mqueue, type mqueue) [9965.292788] SELinux: mount invalid. Same superblock, different security settings for (dev mqueue, type mqueue) [9965.449401] IPv6: ADDRCONF (NETDEV_UP): eth0: link is not ready [9965.462738] IPv6: ADDRCONF (NETDEV_UP): vetheacc333c: link is not ready [9965.468942] IPv6: ADDRCONF (NETDEV_CHANGE): vetheacc333c: link becomes ready. You can also view all Linux system logs in the / var / log / messages file, where you can find errors related to a specific problem. When making changes to the hardware, such as installing additional disks or adding Ethernet network interfaces, it is worth monitoring messages in real time through the tail command. For example, this is the output of the tail-f / var / log / messages command:
# tail-f / var/log/messages Dec 1 13:20:33 bastion dnsmasq [30201]: using nameserver 127.0.0.1.53 for domain in-addr.arpa Dec 1 13:20:33 bastion dnsmasq [30201]: using nameserver 127.0.0.1inclusive 53 for domain cluster.local Dec 1 13:21:03 bastion dnsmasq [30201]: setting upstream servers from DBus Dec 1 13:21:03 bastion dnsmasq [30201]: using nameserver 192.199.0 . 2#53 Dec 1 13:21:03 bastion dnsmasq [30201]: using nameserver 127.0.0.1#53 for domain in-addr.arpa Dec 1 13:21:03 bastion dnsmasq [30201]: using nameserver 127.0.0.1#53 for domain cluster.local Dec 1 13:21:33 bastion dnsmasq [30201]: setting upstream servers from DBus Dec 1 13:21:33 bastion dnsmasq [30201]: using nameserver 192.199.0.2#53 Dec 1 13:21:33 bastion dnsmasq [30201]: using nameserver 127.0.0.1cloud 53 for domain in-addr.arpa Dec 1 13:21:33 bastion dnsmasq [30201]: using nameserver 127.0.1room53 for domain cluster.local Analytical Network functions you may have thousands of cloud native applications serving business services in a complex network environment. These may include virtualization, multiple clouds, and hybrid clouds. This means that, as part of troubleshooting, you should analyze whether the network connection is working properly. Useful commands for finding network functions in Linux servers include ip addr, traceroute, nslookup, dig, and ping. For example, this is the output of the ip addr show command:
# ip addr show 1: lo:mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6:: 1/128 scope host valid_lft forever preferred_lft forever 2: eth0:mtu 9001 Qdisc mq state UP group default qlen 1000 link/ether 06:af:52:f8:74:98 brd ff:ff:ff:ff:ff:ff inet 192.199.0.169/24 brd 192.199.0.255 scope global noprefixroute dynamic eth0 valid_lft 3096sec preferred_lft 3096sec inet6 fe80::4af:52ff:fef8:7498/64 scope link valid_lft forever preferred_lft forever 3: Docker0:mtu 1500 qdisc noqueue state DOWN group default link/ether 02:42:67:fb:1a:a2 brd ff:ff:ff:ff:ff:ff inet 172.17.0.1/16 scope global docker0 valid_lft forever preferred_lft forever inet6 fe80::42:67ff:fefb:1aa2/64 scope link valid_lft forever preferred_lft forever.... Conclusion troubleshooting Linux hardware requires a lot of knowledge, including how to use powerful command-line tools and finding out system log records. You should also know how to diagnose kernel space, where you can find the root causes of many hardware problems. Keep in mind that hardware problems in Linux can come from many different sources, including devices, modules, drivers, BIOS, networking, and even common old hardware failures.
The above is all the contents of the article "sample Analysis of Linux system hardware failure Log". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.