User supplied sensor-values from file/pipe? Like nvme temperatures via smartctl/grep? #409
Description
I took a very brief look at how you are getting info from SMART like this code:
HWSensors/HWMonitor/HWMAtaSmartSensor.m
The attributes for nvme are a whole new game, and it will take a while to incorporate parsing them.
(BTW Parsing smartctl output is notoriously difficult: just ask the gsmartcontrol maintainer ;-)
As a temporary work-around/new-feature request, how possible to have HWMonitor poll a file or pipe where a background script provides current nvme temperatures? Maybe a json or other defined format for user-input? For example, a script could grep the current temperature from last few lines of SMART output for a nvme-samsung960evo in a macpro pcie-adapter, shown below.
Also, btw, is there a command-line option or some other way to periodically log date-stamped sensor values. Assuming, I guess, that this preference is enabled: "Continue to monitor sensors in background" (under Graph prefs). And/or turn on debugging/dumps?
smartctl 6.6 2017-11-05 r4594 [Darwin 17.7.0 x86_64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: Samsung SSD 960 EVO 250GB
Serial Number: S3ESNX0K475554M
Firmware Version: 3B7QCXE7
PCI Vendor/Subsystem ID: 0x144d
IEEE OUI Identifier: 0x002538
Total NVM Capacity: 250,059,350,016 [250 GB]
Unallocated NVM Capacity: 0
Controller ID: 2
Number of Namespaces: 1
Local Time is: Fri Aug 10 17:08:20 2018 EDT
Firmware Updates (0x16): 3 Slots, no Reset required
Optional Admin Commands (0x0007): Security Format Frmw_DL
Optional NVM Commands (0x001f): Comp Wr_Unc DS_Mngmt Wr_Zero Sav/Sel_Feat
Maximum Data Transfer Size: 512 Pages
Warning Comp. Temp. Threshold: 77 Celsius
Critical Comp. Temp. Threshold: 79 Celsius
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 6.04W - - 0 0 0 0 0 0
1 + 5.09W - - 1 1 1 1 0 0
2 + 4.08W - - 2 2 2 2 0 0
3 - 0.0400W - - 3 3 3 3 210 1500
4 - 0.0050W - - 4 4 4 4 2200 6000
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02, NSID 0x0)
Critical Warning: 0x00
Temperature: 40 Celsius
Available Spare: 100%
Available Spare Threshold: 10%
Percentage Used: 0%
Data Units Read: 89,783 [45.9 GB]
Data Units Written: 172,943 [88.5 GB]
Host Read Commands: 874,630
Host Write Commands: 818,316
Controller Busy Time: 2
Power Cycles: 23
Power On Hours: 27
Unsafe Shutdowns: 18
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Warning Comp. Temperature Time: 0
Critical Comp. Temperature Time: 0
Temperature Sensor 1: 40 Celsius
Temperature Sensor 2: 57 Celsius
Read Error Information Log failed: NVMe admin command:0x02/page:0x01 is not supported