Monday, August 21, 2017

Useful commands for checking Linux hardware specs - memory, CPU, serial number

Server model
# dmidecode | grep -A3 '^System Information'

CPU model
# cat /proc/cpuinfo | grep 'model name' | uniq

Memory summary
# dmidecode -t 17 | grep MB

CPU config - good summary, check socket and core outputs for physicals
# lscpu

CPU config - more detail
# less /proc/cpuinfo

CPU config - just the number of cores, physical and virtual
# nproc

Serial number
# dmidecode -s system-serial-number
# dmidecode | grep Serial

If no root / sudo access (might not work on Debian-based distros, tested on RHEL)
$  lshal | grep system.hardware.serial