danb35
Hall of Famer
- Joined
- Aug 16, 2011
- Messages
- 15,504
The drives are ada0-ada6 and da0-da7, so there are no double-digit drive numbers (if by that you mean that the N in adaN is two digits). My suspicion is that there are two unrelated things going on:It might have something to do with text-parsing double-digit drive numbers, but that's speculation.
- The temps of ada0 and ada1 are being parsed incorrectly (perhaps reported incorrectly), which ultimately leads to the error message I'm seeing
- The script is only scanning /dev/adaN for temperatures, not /dev/daN
Code:
for i in $(/sbin/sysctl -n kern.disks | awk '{for (i=NF; i!=0 ; i--) if(match($i, '/da/')) print $i }' );and it works fine, except that ada0 and ada1 still give odd output. It looks like the same change could be made to temps-rrd-format.sh.
As to the first issue, it looks like the SATA DOMs have two attributes they're reporting (194 and 231) with the label of "Temperature_Celsius". Here's the SMART output of one of them:
Code:
[root@freenas2] /mnt/tank/scripts/freenas-temperature-graphing# smartctl -a /dev/ada0
smartctl 6.3 2014-07-26 r3976 [FreeBSD 9.3-RELEASE-p31 amd64] (local build)
Copyright (C) 2002-14, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: KingSpec KDM-SA.71-016GMJ
Serial Number: 985021000159
LU WWN Device Id: 5 000000 000000000
Firmware Version: 1.094.12
User Capacity: 16,013,942,784 bytes [16.0 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-2 T13/2015-D revision 3
SATA Version is: SATA >3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Tue Apr 19 13:03:23 2016 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: ( 245) Self-test routine in progress...
50% of test remaining.
Total time to complete Offline
data collection: ( 32) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 1) minutes.
SCT capabilities: (0x0039) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 0
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000a 100 100 000 Old_age Always - 0
2 Throughput_Performance 0x0005 100 100 050 Pre-fail Offline - 0
3 Spin_Up_Time 0x0007 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 050 Pre-fail Always - 0
7 Unknown_SSD_Attribute 0x000b 100 100 050 Pre-fail Always - 0
8 Unknown_SSD_Attribute 0x0005 100 100 050 Pre-fail Offline - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 9943
10 Unknown_SSD_Attribute 0x0013 100 100 050 Pre-fail Always - 0
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 12
167 Unknown_Attribute 0x0022 100 100 000 Old_age Always - 0
168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 3
169 Unknown_Attribute 0x0013 100 100 010 Pre-fail Always - 131073
170 Unknown_Attribute 0x0013 100 100 010 Pre-fail Always - 0
171 Unknown_Attribute 0x0032 000 000 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 000 000 000 Old_age Always - 0
173 Unknown_Attribute 0x0012 001 001 000 Old_age Always - 4295229441
175 Program_Fail_Count_Chip 0x0013 100 100 010 Pre-fail Always - 0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 100 100 020 Pre-fail Always - 128
187 Reported_Uncorrect 0x0032 000 000 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0012 100 100 000 Old_age Always - 7
194 Temperature_Celsius 0x0022 075 075 030 Old_age Always - 25 (0 60 0 30 0)
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
231 Temperature_Celsius 0x0033 100 100 005 Pre-fail Always - 0
240 Unknown_SSD_Attribute 0x0013 100 100 050 Pre-fail Always - 0
241 Total_LBAs_Written 0x0032 100 100 000 Old_age Always - 27787834
242 Total_LBAs_Read 0x0032 100 100 000 Old_age Always - 496520585
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Self-test routine in progress 00% 9943 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
[root@freenas2] /mnt/tank/scripts/freenas-temperature-graphing#