Is there a way to check that the hardware of one server is the same as that of another?

We have three Ubuntu (trusty) servers taking requests. One of them is having a variety of weird problems that we are trying to find the cause of.

Firstly, we want to rule out hardware differences. So we want to verify that the hardware on all three servers is the same, and that the OS on each sees all the hardware in the same way. Is there a straightforward way to get a summary we can compare from each server? Almost like an md5 checksum of the hardware?


Solution 1:

Try installing the List Hardware package for Ubuntu.

sudo apt-get install lshw

Run the command

sudo lshw -short

on all three hardware & compare it using Notepad++ after installing its Compare plugin. This is the best and easiest way I can think of. The command above leaves a lot of detail, of course. If you need it in detail you can leave out the -short switch and route the output to a html, xml or txt file as shown below.

sudo lshw > hardware.txt
sudo lshw -html > hardware.html
sudo lshw -xml > hardware.xml

You can also try using an excel sheet. Depends on what you are comfortable with.

Solution 2:

The dmidecode command is likely already installed. Try this:

dmidecode -t 1 | egrep '(Manufacturer|Product|Serial)'; dmidecode -t 0 | egrep '(Version|Release)'; dmidecode -t processor| egrep '(Socket|Version)'

I'd be interested in seeing the output...

However, if you're having stability issues, hardware differences probably aren't the issue. Is this a hosting environment? If so, they're likely using lower-end or hand-assembled (cough... Supermicro) equipment. You may want to see if there are any messages in the kernel ring buffer (dmesg | tail) on the problem server.

The type of equipment in use by these providers typically doesn't have any form of hardware monitoring available. You may have out-of-band options like IPMI, but it's not as tightly integrated with the sensors/components on generic hardware.