-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue: should use 'Value' column to calculate the health percentage for Virtium SSD #381
Conversation
@@ -150,10 +150,10 @@ def parse_virtium_info(self): | |||
pass | |||
else: | |||
try: | |||
self.health = float(self._parse_re('Remaining_Life_Left\s*\d*\s*(\d+?)\s+', self.vendor_ssd_info)) | |||
self.health = float(self._parse_re('Remaining_Life_Left\s*\d*\s*\d*\s*(\d+?)\s+', self.vendor_ssd_info)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Junchao-Mellanox can you paste the output of "smartctl -a /dev/sda" in the description of PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.10.0-18-2-amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: VSFDM8XC240G-V11-T
Serial Number: 61174-0189
Firmware Version: 0913-000
User Capacity: 240,057,409,536 bytes [240 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
TRIM Command: Available, deterministic, zeroed
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 (minor revision not indicated)
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Jun 19 05:18:32 2023 IDT
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: ( 0) seconds.
Offline data collection
capabilities: (0x73) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No 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: ( 15) minutes.
Conveyance self-test routine
recommended polling time: ( 0) minutes.
SCT capabilities: (0x0031) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 000 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0013 100 100 000 Pre-fail Always - 0
9 Power_On_Hours 0x0012 100 100 000 Old_age Always - 2275
12 Power_Cycle_Count 0x0012 100 100 000 Old_age Always - 696
14 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 469427376
15 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 468862128
16 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1430
17 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 1430
100 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 99147
168 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
170 Unknown_Attribute 0x0003 100 100 000 Pre-fail Always - 0
172 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 0
173 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 105
174 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 683
175 Program_Fail_Count_Chip 0x0012 100 100 000 Old_age Always - 25
181 Program_Fail_Cnt_Total 0x0012 100 100 000 Old_age Always - 0
187 Reported_Uncorrect 0x0012 100 100 000 Old_age Always - 0
194 Temperature_Celsius 0x0023 065 241 000 Pre-fail Always - 35 (Min/Max 29/115)
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0012 100 100 000 Old_age Always - 0
199 UDMA_CRC_Error_Count 0x000b 100 100 000 Pre-fail Always - 0
202 Unknown_SSD_Attribute 0x0012 000 000 000 Old_age Always - 0
231 Unknown_SSD_Attribute 0x0013 100 100 000 Pre-fail Always - 100
232 Available_Reservd_Space 0x0013 100 100 000 Pre-fail Always - 0
234 Unknown_Attribute 0x000b 100 100 000 Pre-fail Always - 5220883648
235 Unknown_Attribute 0x000b 100 100 000 Pre-fail Always - 11021409984
241 Total_LBAs_Written 0x0012 100 100 000 Old_age Always - 10288250403
242 Total_LBAs_Read 0x0012 100 100 000 Old_age Always - 2021353914
247 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 11021409984
248 Unknown_Attribute 0x0012 100 100 000 Old_age Always - 25
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
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.
Hi @StormLiangMS , could you please help cherry-pick to 202211? |
Update sonic-platform-common submodule pointer to include the following: * 4d270f0 [actions] Support Semgrep by Github Actions ([sonic-net#383](sonic-net/sonic-platform-common#383)) * 74ddd4e Fix issue: should use 'Value' column to calculate the health percentage ([sonic-net#381](sonic-net/sonic-platform-common#381)) Signed-off-by: dprital <[email protected]>
Hi @yxieca , could you please help cherry-pick to 202205? |
Description
Currently, we are using "Low Raw" column to calculate SSD health, but "Value"column should be used according to vendor document.
Motivation and Context
Fix issue that SSD health display wrong value
How Has This Been Tested?
Manual test
Unit test
Additional Information (Optional)