Простенькая команда на bash для просмотра температуры всех NVMe дисков на сервере. Работает через NVMe-CLI.
NVMe Command Line Interface (NVMe-CLI)
Установка nvme-cli в Ubuntu:
sudo apt-get install -y nvme-cli
Установка nvme-cli в CentOS/RHEL 7.x или 8.x:
sudo yum install nvme-cli
Команда-однострочник:
nvme list | grep "/dev/nvme" | awk '{print $1}' | xargs -I{} nvme smart-log {} | grep -E "(Temperature|Thermal|device)"
Пример выполнения:
Smart Log for NVME device:nvme0n1 namespace-id:ffffffff Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 43 C Temperature Sensor 2 : 41 C Temperature Sensor 3 : 41 C Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0 Smart Log for NVME device:nvme1n1 namespace-id:ffffffff Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 44 C Temperature Sensor 2 : 44 C Temperature Sensor 3 : 44 C Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0