This page looks best with JavaScript enabled

How to View Device Information on a Server

 ·  ☕ 2 min read

1. Checking the CPU

  • Check the CPU model
1
lscpu
  • Check the instruction set
1
cat /proc/cpuinfo | grep -iE "flags|instruction set"

2. Checking Memory

  • Memory usage and size
1
free -h
  • Memory module model
1
dmidecode -t memory

3. Checking Disks

  • Check disk mounts
1
lsblk -o NAME,TYPE,SIZE,MODEL,UUID,MOUNTPOINT
  • Check disk usage
1
df -H | grep -vE '^Filesystem|tmpfs|cdrom|loop|udev' | awk '{ print $5 "/" $2 " " $1 }' |grep " "/
  • Check disk speed
1
hdparm -t /dev/sda3
  • Check disk temperature and more
1
apt install smartmontools
1
(for disk in /dev/sd?; do sudo smartctl -A $disk | grep -iE 'Temperature|Celsius'; echo "---"; done) && (for disk in /dev/nvme?n?; do sudo nvme smart-log $disk; echo "---"; done)

4. Checking PCI Bandwidth

  • Find the device’s PCI ID

The disk is used as an example here

1
lspci | grep -iE "SATA|SAS|NVM Express|NVMe"
  • Check bandwidth by ID
1
lspci -vv -s 1a:00.0 | grep -i "LnkCap:"
VersionRelease YearLine EncodingTransfer Rate per LaneBandwidth (per direction)
1.020038b/10b2.5 GT/sx1: 0.250 GB/s
x2: 0.500 GB/s
x4: 1.000 GB/s
x8: 2.000 GB/s
x16: 4.000 GB/s
2.020078b/10b5.0 GT/sx1: 0.500 GB/s
x2: 1.000 GB/s
x4: 2.000 GB/s
x8: 4.000 GB/s
x16: 8.000 GB/s
3.02010128b/130b8.0 GT/sx1: 0.985 GB/s
x2: 1.969 GB/s
x4: 3.938 GB/s
x8: 7.877 GB/s
x16: 15.754 GB/s
4.02017128b/130b16.0 GT/sx1: 1.969 GB/s
x2: 3.938 GB/s
x4: 7.877 GB/s
x8: 15.754 GB/s
x16: 31.508 GB/s
5.02019128b/130b32.0 GT/sx1: 3.938 GB/s
x2: 7.877 GB/s
x4: 15.754 GB/s
x8: 31.508 GB/s
x16: 63.015 GB/s
6.02021242B/256B64.0 GT/sx1: 7.563 GB/s
x2: 15.125 GB/s
x4: 30.250 GB/s
x8: 60.500 GB/s
x16: 121.000 GB/s

5. Checking NICs

  • List NICs
1
lshw -class network -short
  • Check Bond details
1
cat /proc/net/bonding/bond0
  • Check NIC speed
1
2
3
4
5
for i in /sys/class/net/*; do
  iface=$(basename "$i")
  ethtool "$iface" 2>/dev/null | \
    awk -v i="$iface" '/Speed:/ {print i, $2}'
done

6. Checking IB NIC Devices

  • List all IB NICs
1
ibdev2netdev
  • Check NIC speed
1
ibstat

7. Checking RoCE NIC Devices

  • Device-to-NIC mapping
1
rdma link

8. Checking Accelerator Devices

  • Check GPU cards
1
nvidia-smi -L
  • Check NPU cards
1
npu-smi info

WeChat Official Account
WRITTEN BY
WeChat Official Account