How to Check Faults in Hardware Using Command Line

What Do I Need?

  • A Dedicated or VPS Linux Server
  • CentOS

What Can Go Wrong with Hardware?

Linux web servers are used for mission-critical business and consumer applications in many different types of infrastructures, including physical machines, virtualization, private, public, and hybrid cloud. Linux hardware infrastructure, including software-defined functionalities, relates to networking, storage, containers and multiple tools on Linux servers.

It takes some time to troubleshoot and solve hardware related issues on Linux. Even experienced sysadmins can spend hours working to solve mysterious software discrepancies.

  1. Quick-Diagnosing Devices, Modules, and Drivers
  1. 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 the ls commands, for example: lspci, lsblk, lscpu, and lsscsi. Run the lsblk command:

How to Check Faults in Hardware using Command Line

  1. If the ls commands don’t reveal any errors, use init processes, for example, systemd, to see how the web server is working. systemd is the most popular init process for bootstrapping user spaces and controlling multiple system processes. Run the systemctl command:
systemctl status

How to Check Faults in Hardware using Command Line

Press ‘q’ to quit at the end. You can save the output as a file by pressing ‘s’ and then providing a name and pressing ‘enter’.

  1. Exploring Further using Multiple Loggings
  1. Dsmeg allows you to figure out errors and warnings in the kernel’s latest messages. Run the dmesg | more command:
dmesg | more

  1. I would recommend also looking at your system logs, which can normally be found in the /var/log/messages files, which is where you’ll find errors related to specific issues. It’s worthwhile monitoring messages via the tail command in real-time when you modify your hardware, such as mounting an extra disk or adding an ethernet network interface.
tail -f /var/log/messages

  1. Analyzing Network Functions
  1. There may be hundreds of thousands of cloud-native applications to business services in a complex networking environment; this can 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 work out networking functions in the Linux server include, ip addr, traceroute, nslookup, dig, and ping, among others.
ip addr show

How to Check Faults in Hardware using Command Line

Next Steps

There are a lot of different types of hardware problems that you’ll experience and they can usually be diagnosed as falling into one or more of the following categories:

  • Non-functioning hardware
  • A dead piece of electronic equipment is usually the simplest case. If your power supply is gone, the machine just won’t turn on. A no-brainer.
  • Erratic hardware malfunctions
  • Probably the most difficult, most elusive type of problem. If you have a hardware component that’s throwing errors only once in a while, you may end up having sufficient data to correlate between these separate events and draw the right conclusion.
  • Firmware/driver problems
  • Driver problems will usually appear similar to hardware malfunctions, although you may get a more consistent experience. In many cases, you’ll have bad drivers that won’t communicate with the hardware at all, in others you’ll be running a buggy driver that causes your machine to misbehave in an unpredictable fashion.
  • Other considerations
  • It’s necessary to realize that some systems will have locked-down bios preventing you from making full use of hardware components or features, while others may have these components disabled on purpose.

If you’re experiencing issues with missing files or sporadic crashes and mysterious reboots you should try checking your hard disk drives:

        smartctl -a /dev/sda

How to Check Faults in Hardware using Command Line


Troubleshooting Linux hardware requires considerable knowledge, including the use of powerful command-line tools and system loggings. You should know how to diagnose the kernel space, which is where you can find the root cause of many of these hardware problems. Keep in mind that hardware issues in Linux come from many different sources, including devices, drivers, bios, networking, and even plain old hardware malfunctions.

  • Check the recommendations for the best VPS and get a suitable one.

How To Set up a VSFTPD Server on a CentOS 7 VPS or Dedicated Server

Brief Description FTP is usually insecure exposing clear-text passwords, userna
2 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Set up a VSFTPD Server on an Ubuntu 16.04 VPS or Dedicated Server

Brief Description FTP data is usually insecure since information (usernames, pa
2 min read
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to use phpMyAdmin to develop a website (without MySQL experience)

Brief description A web developer who is not well versed into coding websites f
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Install MySQL on a Windows Web Server Running Apache

This tutorial will show you how to install the MySQL database on a Windows serve
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top