Nvme Drive Temperatures
I have an M.2 Solid State Drive and I would like to monitor its temperature, however PSensor does not seem to be able to monitor temperatures for NVMe disks. I found I can get the temperature by installing nvme-cli (sudo apt install nvme-cli on my Ubuntu desktop), it only shows the temperature in celsius but that is easy to convert. Is there a way to add a custom sensor, that can be polled by a command? Or is there a way to enable PSensor to monitor temperatures of NVMe disks? I have looked and cannot find any material for adding custom sensor entries, and while I am a programmer I have not had time to look at the codebase for PSensor and determine if this is possible or how to do it. I would appreciate it very much if you could point me in the right direction.
Command I'm using to get the temperature (for /dev/nvme0): sudo nvme smart-log /dev/nvme0 | grep "^temperature" | awk '{print $3 "°" $4}' will print out something like "39°C"
NVMe CLI tool: https://github.com/linux-nvme/nvme-cli
Print the SMART log (not just temperature) of a specified device: sudo nvme smart-log /dev/nvme0
As a side note, the nvme list
command can be used to list NVMe devices
sudo nvme list
or
sudo nvme list --output-format=json
Thanks in advance!