{"id":7081,"date":"2019-01-02T08:19:41","date_gmt":"2019-01-02T08:19:41","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=7081"},"modified":"2019-01-08T10:55:05","modified_gmt":"2019-01-08T10:55:05","slug":"troubleshooting-hardware-problems-in-linux","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/02\/troubleshooting-hardware-problems-in-linux\/","title":{"rendered":"Troubleshooting hardware problems in Linux"},"content":{"rendered":"<p><a href=\"https:\/\/opensource.com\/article\/18\/5\/what-linux-server\">Linux servers<\/a> run mission-critical business applications in many different types of infrastructures including physical machines, virtualization, private cloud, public cloud, and hybrid cloud. It&#8217;s important for Linux sysadmins to understand how to manage Linux hardware infrastructure\u2014including software-defined functionalities related to <a href=\"https:\/\/opensource.com\/article\/18\/11\/intro-software-defined-networking\">networking<\/a>, storage, Linux containers, and multiple tools on Linux servers.<\/p>\n<p>It can take some time to troubleshoot and solve hardware-related issues on Linux. Even highly experienced sysadmins sometimes spend hours working to solve mysterious hardware and software discrepancies.<\/p>\n<p>The following tips should make it quicker and easier to troubleshoot hardware in Linux. Many different things can cause problems with Linux hardware; before you start trying to diagnose them, it&#8217;s smart to learn about the most common issues and where you&#8217;re most likely to find them.<\/p>\n<h2>Quick-diagnosing devices, modules, and drivers<\/h2>\n<p>The first step in troubleshooting usually is to display a list of the hardware installed on your Linux server. You can obtain detailed information on the hardware using ls commands such as <a href=\"https:\/\/linux.die.net\/man\/8\/lspci\" target=\"_blank\" rel=\"noopener\">lspci<\/a>, <a href=\"https:\/\/linux.die.net\/man\/8\/lsblk\" target=\"_blank\" rel=\"noopener\">lsblk<\/a>, <a href=\"https:\/\/linux.die.net\/man\/1\/lscpu\" target=\"_blank\" rel=\"noopener\">lscpu<\/a>, and <a href=\"https:\/\/linux.die.net\/man\/8\/lsscsi\" target=\"_blank\" rel=\"noopener\">lsscsi<\/a>. For example, here is output of the lsblk command:<\/p>\n<p># lsblk<br \/>\nNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT<br \/>\nxvda 202:0 0 50G 0 disk<br \/>\n\u251c\u2500xvda1 202:1 0 1M 0 part<br \/>\n\u2514\u2500xvda2 202:2 0 50G 0 part \/<br \/>\nxvdb 202:16 0 20G 0 disk<br \/>\n\u2514\u2500xvdb1 202:17 0 20G 0 part<\/p>\n<p>If the ls commands don&#8217;t reveal any errors, use init processes (e.g., systemd) to see how the Linux server is working. systemd is the most popular init process for bootstrapping user spaces and controlling multiple system processes. For example, here is output of the systemctl status command:<\/p>\n<p># systemctl status<br \/>\n\u25cf bastion.f347.internal<br \/>\nState: running<br \/>\nJobs: 0 queued<br \/>\nFailed: 0 units<br \/>\nSince: Wed 2018-11-28 01:29:05 UTC; 2 days ago<br \/>\nCGroup: \/<br \/>\n\u251c\u25001 \/usr\/lib\/systemd\/systemd &#8211;switched-root &#8211;system &#8211;deserialize 21<br \/>\n\u251c\u2500kubepods.slice<br \/>\n\u2502 \u251c\u2500kubepods-pod3881728a_f2af_11e8_af77_06af52f87498.slice<br \/>\n\u2502 \u2502 \u251c\u2500docker-88b27385f4bae77bba834fbd60a61d19026bae13d18eb147783ae27819c34967.scope<br \/>\n\u2502 \u2502 \u2502 \u2514\u250023860 \/opt\/bridge\/bin\/bridge &#8211;public-dir=\/opt\/bridge\/static &#8211;config=\/var\/console-config\/console-c<br \/>\n\u2502 \u2502 \u2514\u2500docker-a4433f0d523c7e5bc772ee4db1861e4fa56c4e63a2d48f6bc831458c2ce9fd2d.scope<br \/>\n\u2502 \u2502 \u2514\u250023639 \/usr\/bin\/pod<br \/>\n&#8230;.<\/p>\n<h2>Digging into multiple loggings<\/h2>\n<p>Dmesg allows you to figure out errors and warnings in the kernel&#8217;s latest messages. For example, here is output of the dmesg | more command:<\/p>\n<p># dmesg | more<br \/>\n&#8230;.<br \/>\n[ 1539.027419] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready<br \/>\n[ 1539.042726] IPv6: ADDRCONF(NETDEV_UP): veth61f37018: link is not ready<br \/>\n[ 1539.048706] IPv6: ADDRCONF(NETDEV_CHANGE): veth61f37018: link becomes ready<br \/>\n[ 1539.055034] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready<br \/>\n[ 1539.098550] device veth61f37018 entered promiscuous mode<br \/>\n[ 1541.450207] device veth61f37018 left promiscuous mode<br \/>\n[ 1542.493266] SELinux: mount invalid. Same superblock, different security settings for (dev mqueue, type mqueue)<br \/>\n[ 9965.292788] SELinux: mount invalid. Same superblock, different security settings for (dev mqueue, type mqueue)<br \/>\n[ 9965.449401] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready<br \/>\n[ 9965.462738] IPv6: ADDRCONF(NETDEV_UP): vetheacc333c: link is not ready<br \/>\n[ 9965.468942] IPv6: ADDRCONF(NETDEV_CHANGE): vetheacc333c: link becomes ready<br \/>\n&#8230;.<\/p>\n<p>You can also look at all Linux system logs in the \/var\/log\/messages file, which is where you&#8217;ll find errors related to specific issues. It&#8217;s worthwhile to monitor the messages via the tail command in real time when you make modifications to your hardware, such as mounting an extra disk or adding an Ethernet network interface. For example, here is output of the tail -f \/var\/log\/messages command:<\/p>\n<p># tail -f \/var\/log\/messages<br \/>\nDec 1 13:20:33 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain in-addr.arpa<br \/>\nDec 1 13:20:33 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain cluster.local<br \/>\nDec 1 13:21:03 bastion dnsmasq[30201]: setting upstream servers from DBus<br \/>\nDec 1 13:21:03 bastion dnsmasq[30201]: using nameserver 192.199.0.2#53<br \/>\nDec 1 13:21:03 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain in-addr.arpa<br \/>\nDec 1 13:21:03 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain cluster.local<br \/>\nDec 1 13:21:33 bastion dnsmasq[30201]: setting upstream servers from DBus<br \/>\nDec 1 13:21:33 bastion dnsmasq[30201]: using nameserver 192.199.0.2#53<br \/>\nDec 1 13:21:33 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain in-addr.arpa<br \/>\nDec 1 13:21:33 bastion dnsmasq[30201]: using nameserver 127.0.0.1#53 for domain cluster.local<\/p>\n<h2>Analyzing networking functions<\/h2>\n<p>You may have hundreds of thousands of cloud-native applications to serve business services in a complex networking environment; these may include virtualization, multiple cloud, and hybrid cloud. This means you should analyze whether networking connectivity is working correctly as part of your troubleshooting. Useful commands to figure out networking functions in the Linux server include ip addr, traceroute, nslookup, dig, and ping, among others. For example, here is output of the ip addr show command:<\/p>\n<p># ip addr show<br \/>\n1: lo: &lt;LOOPBACK,UP,LOWER_UP&gt; mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000<br \/>\nlink\/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00<br \/>\ninet 127.0.0.1\/8 scope host lo<br \/>\nvalid_lft forever preferred_lft forever<br \/>\ninet6 ::1\/128 scope host<br \/>\nvalid_lft forever preferred_lft forever<br \/>\n2: eth0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 9001 qdisc mq state UP group default qlen 1000<br \/>\nlink\/ether 06:af:52:f8:74:98 brd ff:ff:ff:ff:ff:ff<br \/>\ninet 192.199.0.169\/24 brd 192.199.0.255 scope global noprefixroute dynamic eth0<br \/>\nvalid_lft 3096sec preferred_lft 3096sec<br \/>\ninet6 fe80::4af:52ff:fef8:7498\/64 scope link<br \/>\nvalid_lft forever preferred_lft forever<br \/>\n3: docker0: &lt;NO-CARRIER,BROADCAST,MULTICAST,UP&gt; mtu 1500 qdisc noqueue state DOWN group default<br \/>\nlink\/ether 02:42:67:fb:1a:a2 brd ff:ff:ff:ff:ff:ff<br \/>\ninet 172.17.0.1\/16 scope global docker0<br \/>\nvalid_lft forever preferred_lft forever<br \/>\ninet6 fe80::42:67ff:fefb:1aa2\/64 scope link<br \/>\nvalid_lft forever preferred_lft forever<br \/>\n&#8230;.<\/p>\n<h2>In conclusion<\/h2>\n<p>Troubleshooting Linux hardware requires considerable knowledge, including how to use powerful command-line tools and figure out system loggings. You should also know how to diagnose the kernel space, which is where you can find the root cause of many hardware problems. Keep in mind that hardware issues in Linux may come from many different sources, including devices, modules, drivers, BIOS, networking, and even plain old hardware malfunctions.<\/p>\n<p><a href=\"http:\/\/lxer.com\/module\/newswire\/ext_link.php?rid=264429\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux servers run mission-critical business applications in many different types of infrastructures including physical machines, virtualization, private cloud, public cloud, and hybrid cloud. It&#8217;s important for Linux sysadmins to understand how to manage Linux hardware infrastructure\u2014including software-defined functionalities related to networking, storage, Linux containers, and multiple tools on Linux servers. It can take some time &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2019\/01\/02\/troubleshooting-hardware-problems-in-linux\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Troubleshooting hardware problems in Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7081","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7081","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=7081"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7081\/revisions"}],"predecessor-version":[{"id":7413,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/7081\/revisions\/7413"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=7081"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=7081"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=7081"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}