I think I found an error in FreeNAS smart monitoring/logging

Status
Not open for further replies.

NASbox

Guru
Joined
May 8, 2012
Messages
650
This post https://forums.freenas.org/index.ph...g-of-services-s-m-a-r-t-information-go.63205/
I have found it. The messages were written to
Code:
/vat/log/daemon.log
prompted me to have a peek in the log just for interest and I found: (recent example for /dev/da4)
Code:
Apr 18 14:52:47 freenas smartd[3480]: Device: /dev/da3 [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 115 to 116
Apr 18 15:22:46 freenas smartd[3480]: Device: /dev/da4 [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 116 to 115
Apr 18 15:52:46 freenas smartd[3480]: Device: /dev/da4 [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 115 to 116
Apr 18 16:22:46 freenas smartd[3480]: Device: /dev/da4 [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 116 to 115
Apr 18 16:52:46 freenas smartd[3480]: Device: /dev/da4 [SAT], SMART Usage Attribute: 194 Temperature_Celsius changed from 115 to 116

I know this IS WRONG. There is a small chance that the numbers may be Fahrenheit, but 116F is 46.66667C
Code:
smartctl 6.5 2016-05-07 r4318 [FreeBSD 11.1-STABLE amd64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:	 Western Digital Red
Device Model:	 WDC WD60EFRX-68MYMN1
Serial Number:	WD-WXXXXXXXXXXXXXX
LU WWN Device Id: 5 0014ee 2b6647874
Firmware Version: 82.00A82
User Capacity:	6,001,175,126,016 bytes [6.00 TB]
Sector Sizes:	 512 bytes logical, 4096 bytes physical
Rotation Rate:	5700 rpm
Device is:		In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:	Wed Apr 18 16:53:58 2018 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x00) Offline data collection activity
										was never started.
										Auto Offline Data Collection: Disabled.
Self-test execution status:	  (   0) The previous self-test routine completed
										without error or no self-test has ever
										been run.
Total time to complete Offline
data collection:				( 2144) seconds.
Offline data collection
capabilities:					(0x7b) SMART execute Offline immediate.
										Auto Offline data collection on/off support.
										Suspend Offline collection upon new
										command.
										Offline surface scan supported.
										Self-test supported.
										Conveyance Self-test supported.
										Selective Self-test supported.
SMART capabilities:			(0x0003) Saves SMART data before entering
										power-saving mode.
										Supports SMART auto save timer.
Error logging capability:		(0x01) Error logging supported.
										General Purpose Logging supported.
Short self-test routine
recommended polling time:		(   2) minutes.
Extended self-test routine
recommended polling time:		( 675) minutes.
Conveyance self-test routine
recommended polling time:		(   5) minutes.
SCT capabilities:			  (0x303d) SCT Status supported.
										SCT Error Recovery Control supported.
										SCT Feature Control supported.
										SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME		  FLAG	 VALUE WORST THRESH TYPE	  UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate	 0x002f   200   200   051	Pre-fail  Always	   -	   0
  3 Spin_Up_Time			0x0027   210   196   021	Pre-fail  Always	   -	   8458
  4 Start_Stop_Count		0x0032   100   100   000	Old_age   Always	   -	   629
  5 Reallocated_Sector_Ct   0x0033   200   200   140	Pre-fail  Always	   -	   0
  7 Seek_Error_Rate		 0x002e   200   200   000	Old_age   Always	   -	   0
  9 Power_On_Hours		  0x0032   069   069   000	Old_age   Always	   -	   22704
 10 Spin_Retry_Count		0x0032   100   100   000	Old_age   Always	   -	   0
 11 Calibration_Retry_Count 0x0032   100   253   000	Old_age   Always	   -	   0
 12 Power_Cycle_Count	   0x0032   100   100   000	Old_age   Always	   -	   68
192 Power-Off_Retract_Count 0x0032   200   200   000	Old_age   Always	   -	   27
193 Load_Cycle_Count		0x0032   192   192   000	Old_age   Always	   -	   24384
194 Temperature_Celsius	 0x0022   116   097   000	Old_age   Always	   -	   36
196 Reallocated_Event_Count 0x0032   200   200   000	Old_age   Always	   -	   0
197 Current_Pending_Sector  0x0032   200   200   000	Old_age   Always	   -	   0
198 Offline_Uncorrectable   0x0030   100   253   000	Old_age   Offline	  -	   0
199 UDMA_CRC_Error_Count	0x0032   200   200   000	Old_age   Always	   -	   0
200 Multi_Zone_Error_Rate   0x0008   200   200   000	Old_age   Offline	  -	   0


Box is almost completely idle and has been so for most of the day. I have a script that does smartctl and my drives are all WAY below.

Code:
da0	ATA WDC WD60EFRX-68L	  37C
da1	ATA WDC WD60EFRX-68L	  35C
da2	ATA WDC WD60EFRX-68M	 34C
da3	ATA WDC WD60EFRX-68M	 36C
da4	ATA WDC WD60EFRX-68M	 36C
da5	ATA WDC WD60EFRX-68M	 34C
da6	ATA WDC WD60EFRX-68L	 36C
da7	ATA WDC WD60EFRX-68L	 35C


I've NEVER seen one of these WD drives that hot even after several hours of scrubbing (the heaviest load they ever see)! Hottest I've seen is about 42-43 during a hot summer and during a scrub.

I haven't looked at the code, but a bit of quick messing with a calculator makes me think someone messed up the C->F conversion

°F = ℃ × 1.8 + 32 ... just a guess, but it looks like the code may be doing something like °F = (℃ + 32) × 1.8

If someone wants more info for troubleshooting, please let me know.
 

kdragon75

Wizard
Joined
Aug 7, 2016
Messages
2,457
Sounds about right. File a bug!
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I don't think it is a bug. The log is just recording the number from the "value" column instead of recording the temperature. There is probably some formula that converts the "value" to a temperature.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
I don't think it is a bug. The log is just recording the number from the "value" column instead of recording the temperature. There is probably some formula that converts the "value" to a temperature.
I see what you mean.... I didn't notice that number in the VALUE column. It's weird.... makes the log message pretty useless. The actual TEMP is available in the RAW VALUE column, and that seems to be pretty consistent behavior (at least for every hard drive I've seen-maybe commercial/specialty drives may be different-can't say, but I haven't seen one). I think at least the RAW VALUE should be part of the message.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
It's weird.... makes the log message pretty useless.
I kind of agree with that. Maybe this will prompt a change to how they log the data, but I don't know if it is something that the FreeNAS developers control or if it comes from up-stream in the development path.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
I kind of agree with that. Maybe this will prompt a change to how they log the data, but I don't know if it is something that the FreeNAS developers control or if it comes from up-stream in the development path.
It's not critical, it won't happen overnight, but I suspect if the FreeNAS crew thinks it's a good idea, the upstream people might be receptive. That message isn't completely useless, but damn near. Unless there is a reliable way to correlate that value to a real temperature for an alarm it's just wasting log space.
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
That message isn't completely useless, but damn near.

Note that in corresponding SMART alert emails the temperature is referred to in degrees Celsius, as in
Code:
Device: /dev/ada2, Temperature 40 Celsius reached critical limit of 40 Celsius (Min/Max 32/40)

In my view the current logging is not wasted log space due to the usage of VALUE instead of RAW_VALUE values, this fact just makes it a little harder for humans to interpret the numerical values.

The NOTES section of the smartd man page gives some hope that the FreeNAS devs might be able to improve the readability of the logs without much effort.

See also https://www.smartmontools.org/wiki/FAQ#Whyismydisktemperaturesreportedbysmartdas150Celsius
 
Status
Not open for further replies.
Top