infrastructure check

first checking the infrastructure that we have

dmidecode

dmidecode - DMI table decoder dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format.

Usage dmidecode --type | -t Available options

bios
system
baseboard
chassis
processor
memory
cache
connector
slot

Three of them are more useful

sudo dmidecode --type system
sudo dmidecode --type processor
sudo dmidecode --type memory

Test on a dedicated server (sudo dmidecode --type system)

sudo dmidecode --type system
System Information
Manufacturer: HP
Product Name: ProLiant DL360 G7
Version: Not Specified
Serial Number: ...
...
Family: ProLiant

Test on a Virtual Server in Hetzner (sudo dmidecode --type system)

lshw

lshw - list hardware

First see all available options, sample output:

Four useful ones are cpu, memory, disk, network which we can see using -class arguments

here we are more interested in network and disk, first for network find how many interfaced we have:

then check that one which is up.

here -sanitize is for removing sensitive information like serial numbers, etc.

ethtool

ethtool - query or control network driver and hardware settings

It is more userful for network interface card check , an example of a home machine with home router

and we are interested in Speed: 100Mb/s which shows the speed

on a clould server Speed: Unknown! , so it is not always available

first check the NIC name

then check it by ethtool

On a dedicated server

What if we could not install ethtool or it did not show the port speed?

We can look at /sys/class/net/{nic-name}/speed which can show in the speed

lsblk

lsblk - list block devices

lsblk lists information about all available or the specified block devices. The lsblk command reads the sysfs filesystem and udev db to gather information.

If this command was not installed by default , install it

Simple example

Check for type disk , if it is HDD or SSD with lsblk is simple

even if the disk is SSD or NVMe the result seems to be HDD which is misleading and the reason is because it is a VM and it depends of bus type which has been chosen for the VM.

Also we can check th disk type by checking sys file

smartctl

smartctl - Control and Monitor Utility for SMART Disks

smartctl controls the Self-Monitoring, Analysis and Reporting Technology (SMART) system built into most ATA/SATA and SCSI/SAS hard drives and solid-state drives.

if it was not installed, you can install it

On Debian, Ubuntu:

On RHEL, CentOS:

On openSUSE:

Last updated

Was this helpful?