General Checkup
How to check cpu model
lscpu
How to chech frequency on which your cores operate
cat /proc/cpuinfo | grep MHz
sudo cpupower monitor
How to check motherboard model
sudo dmidecode -t baseboard
How to check memory speed
sudo dmidecode | grep "Configured Memory Speed"
How to check speed of nvme drives and network card
lspci | grep -iE "Non-Volatile memory controller|Ethernet controller" | while read -r line; do
dev=$(awk '{print $1}' <<< "$line")
name=$(cut -d' ' -f2- <<< "$line")
echo "$dev | $name"
lspci -vv -s "$dev" | awk '/LnkSta:/ {print " " $0; exit}'
done
Should not have status degraded. If degraded, report to us!
How to check temperature sensors
sudo ipmitool sensor
How to check serial numbers of all drives
Install smartmontools:
apt-get -y install smartmontoolsRun this script to display the serial numbers of all NVMe disks installed in the system:
cat << \EOF | bash
for disk in $(lsblk -J -o NAME,MODEL,UUID | jq -rc '.blockdevices | map(select(.name | startswith("nvme"))) | .[] | .name'); do
serial=$(smartctl -a "/dev/${disk}" | grep Serial | cut -d: -f2- | tr -d ' ')
if [[ -z $serial ]]; then
serial="N/A"
fi
printf "Disk: %-12s Serial: %s\n" "${disk}" "${serial}"
done
EOF
How to mount additional nvme drives
Install gdisk:
apt-get update && apt-get -y install gdisk jqShow empty disks:
lsblk -J -o NAME,MODEL,UUID | jq -rc '.blockdevices | map(select(has("children") | not)) | map(select(.name | startswith("nvme"))) | .[] | .name'Add the disks in list and perform the command:
cat << \EOF | bash
set -e
FS="xfs"
DISKS=(
nvme0n1
nvme1n1
)
for DISK in ${DISKS[@]}; do
mkfs.xfs -f "/dev/${DISK}"
mkdir -p "/mnt/${DISK}"
sleep 2
UUID=$(blkid | grep $DISK | awk '{print $2}' | cut -d= -f2 | tr -d '"')
grep -q /mnt/$DISK /etc/fstab || echo "UUID=$UUID /mnt/$DISK $FS defaults,nofail,noatime,discard 0 2" >> /etc/fstab
mount "/mnt/${DISK}"
done
systemctl daemon-reload
EOF
How to check temperature of nvme drives
cat << \EOF | bash
for disk in $(lsblk -J -o NAME,MODEL,UUID | jq -rc '.blockdevices | map(select(.name | startswith("nvme"))) | .[] | .name' | sort --version-sort); do
temp=$(smartctl -a "/dev/${disk}" | grep 'Temperature:' | cut -d: -f2- | tr -d ' ')
if [[ -z $temp ]]; then
temp="N/A"
fi
printf "Disk: %-12s Temperature: %s\n" "${disk}" "${temp}"
done
EOF
How to check the temperature of network card
Install lm-sensors:
apt-get -y install lm-sensorsRun lm-sensors:
sensors
Performance mode for CPU
How to check current mode
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
How to enable performance mode
apt-get -y install cpufrequtils
cat << \EOF > /etc/default/cpufrequtils
ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0"
EOF
systemctl restart cpufrequtils.service
Have Questions?
Send us an email at [email protected]