Hardware

A comprehensive guide to hardware information, management, and troubleshooting in Linux systems.

๐Ÿ’ป System Hardware Overview

System Information

# Basic system information
uname -a                    # Kernel and system information
dmidecode                   # DMI/SMBIOS information
lshw                       # Detailed hardware configuration
hwinfo                     # Hardware information
inxi -Fx                   # System information summary

# System firmware/BIOS
dmidecode -t bios          # BIOS information
systemd-boot               # Boot loader status
efibootmgr                # EFI boot entries

๐Ÿ” CPU Information

CPU Details

# CPU information
lscpu                      # CPU architecture information
cat /proc/cpuinfo          # Detailed CPU information
nproc                      # Number of processing units
cpuid                      # x86 CPU identification

# CPU performance
mpstat -P ALL             # CPU statistics
turbostat                 # CPU frequency and power
cpupower frequency-info   # CPU frequency information
stress-ng --cpu 8         # CPU stress test

CPU Temperature

# Temperature monitoring
sensors                    # Hardware sensor information
watch -n 1 sensors        # Monitor temperature in real-time
cat /sys/class/thermal/thermal_zone*/temp  # Raw temperature data
s-tui                     # Terminal UI for monitoring

๐Ÿงฎ Memory Hardware

Memory Information

# Memory details
free -h                    # Memory usage
dmidecode -t memory       # Memory hardware info
cat /proc/meminfo         # Detailed memory information
lshw -class memory        # Memory hardware configuration

# Memory testing
memtest86+                # Memory testing tool
memtester 1024 1          # Test 1GB RAM once
badram                    # Memory blacklisting

๐Ÿ’ฝ Storage Devices

Disk Information

# Storage device listing
lsblk                     # List block devices
fdisk -l                  # Disk partition information
parted -l                 # Partition information
hdparm -i /dev/sda        # HDD information

# SMART status
smartctl -a /dev/sda      # SMART attributes
smartctl -t short /dev/sda # Short self-test
smartctl -H /dev/sda      # Health status

Storage Performance

# Disk performance
hdparm -tT /dev/sda       # Read speed test
dd if=/dev/zero of=test bs=1G count=1  # Write speed test
iostat -x 1              # I/O statistics
iotop                    # I/O monitoring

RAID Information

# RAID status
cat /proc/mdstat         # Software RAID status
mdadm --detail /dev/md0  # RAID array details
mdadm --examine /dev/sda1 # Examine RAID component

๐ŸŽฎ Peripheral Devices

USB Devices

# USB information
lsusb                    # List USB devices
lsusb -t                 # USB device tree
usb-devices             # Detailed USB information
tail -f /var/log/syslog # Monitor USB events

Input Devices

# Input device information
xinput list              # List X input devices
libinput list-devices    # List input devices
evtest                   # Input device testing
cat /proc/bus/input/devices # Input device details

Audio Devices

# Audio hardware
aplay -l                 # List audio playback devices
arecord -l               # List recording devices
alsamixer               # Audio mixer
pacmd list-sinks        # PulseAudio output devices

๐ŸŽจ Display and Graphics

Display Information

# Display hardware
xrandr                  # Display information
glxinfo                 # OpenGL information
lspci | grep -i vga     # Graphics card info
nvidia-smi              # NVIDIA GPU information

# Monitor information
edid-decode            # Monitor EDID information
xdpyinfo              # X display information
ddcutil detect        # Monitor detection

๐Ÿ”Œ Power Management

Power Information

# Power status
upower -i /org/freedesktop/UPower/devices/battery_BAT0  # Battery info
acpi -V                # ACPI information
powertop              # Power consumption analysis
tlp-stat              # TLP power management status

๐ŸŒก๏ธ Sensors and Monitoring

Hardware Sensors

# Sensor information
sensors                 # Hardware sensors
sensors-detect         # Detect hardware sensors
hddtemp /dev/sda      # HDD temperature
ipmitool sensor       # IPMI sensors (servers)

๐Ÿ”ง Hardware Configuration

PCI Devices

# PCI information
lspci                  # List PCI devices
lspci -v              # Verbose PCI information
lspci -k              # Show kernel drivers
update-pciids         # Update PCI ID database

Driver Information

# Driver details
lsmod                  # List loaded modules
modinfo module_name    # Module information
dmesg | grep driver    # Driver messages
ubuntu-drivers devices # Available drivers

๐Ÿ’ก Best Practices

  1. Regular Monitoring

    • Monitor hardware health

    • Track temperature trends

    • Check storage SMART status

    • Monitor system logs

  2. Maintenance

    • Regular SMART tests

    • Update firmware

    • Clean cooling systems

    • Check error logs

  3. Documentation

    • Keep hardware inventory

    • Document configurations

    • Track hardware changes

    • Maintain driver versions

  4. Performance

    • Monitor performance metrics

    • Track resource usage

    • Benchmark regularly

    • Document baselines

๐Ÿ”ง Troubleshooting

Hardware Issues

# System logs
dmesg                  # Kernel messages
journalctl -k         # Kernel journal
cat /var/log/syslog   # System log
mcelog                # Machine check exceptions

# Hardware diagnostics
memtest86+            # Memory testing
smartctl -t long /dev/sda  # Disk testing
stress-ng            # System stress testing

Performance Issues

# Performance analysis
sar                   # System activity report
iostat               # I/O statistics
vmstat               # Virtual memory stats
perf                 # Performance analysis

๐Ÿ› ๏ธ Advanced Tools

Server Hardware

# Server management
ipmitool              # IPMI management
racadm                # Dell DRAC management
hpasmcli              # HP management
storcli               # RAID controller management

Firmware Management

# Firmware tools
fwupdmgr             # Firmware update manager
flashrom             # ROM/flash programming
dmidecode            # DMI table decoder
biosdecode          # BIOS information decoder

Hardware Security

# TPM status
tpm2_getcap          # TPM capabilities
tpm2_selftest       # TPM self-test
mokutil --sb-state  # Secure Boot status

๐Ÿ“ Documentation Tools

System Reports

# System documentation
lshw -html > hw.html  # Hardware report in HTML
hardinfo             # GUI hardware information
inxi -Fxz           # Detailed system report
sosreport           # System information report

Last updated

Was this helpful?