martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
690 stars 79 forks source link

Update nvme temperatures. #380

Closed PartialVolume closed 2 years ago

PartialVolume commented 2 years ago

For sdX devices we look in /sys/class/hwmon/hwmonX/block for the device name.

However, for nvme we access the device name by looking in .. /sys/class/hwmon/hwmonX/device/nvme/nvme0

nvme0n1

Multiple nvme drives/controllers will need to be tested.

Firminator commented 2 years ago

success!!

Screenshot from 2021-11-17 14-40-08

PartialVolume commented 2 years ago

Excellent !! :1st_place_medal:

In the nwipe log does it show all the max/min/critical temperatures as well ?

Firminator commented 2 years ago

No. See https://github.com/PartialVolume/shredos.x86_64/issues/48#issuecomment-971914000

But even nvme-cli doesn't show it. It only shows how many times the critical temp. occured is what I interpret from the output of sudo nvme smart-log /dev/nvme0:

Smart Log for NVME device:nvme0 namespace-id:ffffffff
critical_warning                    : 0
temperature                         : 30 C
available_spare                     : 100%
available_spare_threshold           : 50%
percentage_used                     : 4%
data_units_read                     : 32,475,728
data_units_written                  : 49,733,651
host_read_commands                  : 1,067,799,634
host_write_commands                 : 957,754,523
controller_busy_time                : 4,891
power_cycles                        : 2,292
power_on_hours                      : 26,989
unsafe_shutdowns                    : 345
media_errors                        : 0
num_err_log_entries                 : 8,281
Warning Temperature Time            : 0
Critical Composite Temperature Time : 0
Thermal Management T1 Trans Count   : 0
Thermal Management T2 Trans Count   : 0
Thermal Management T1 Total Time    : 0
Thermal Management T2 Total Time    : 0