ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

สอบถามเรื่องทั่วไป กับ การใช้คอมพิวเตอร์โดยทั่วไป แนะนำข่าวสารไวรัสคอม เทคนิคเล็กน้อยๆ กับ การใช้ คอมพิวเตอร์ ให้มีประสิทธิภาพมากที่สุด ฝากคำถามไว้ได้นะค่ะ

Moderator: mindphp, ผู้ดูแลกระดาน

ภาพประจำตัวสมาชิก
eange08
PHP VIP Members
PHP VIP Members
โพสต์: 16184
ลงทะเบียนเมื่อ: 22/12/2020 10:09 am

ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย eange08 »

ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu 16.04 ต้องดูยังงัยค่ะ

รุ่นของ ssd : KINGSTON SA400S37240G (R0105A)
ถาม - ตอบ คอมพิวเตอร์-1.png
ถาม - ตอบ คอมพิวเตอร์-1.png (60.33 KiB) Viewed 1213 times
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

ติดตั้งเครื่องมื่อช่วยเช็คตัวนี้

โค้ด: เลือกทั้งหมด

sudo apt-get install smartmontools 
ติดตั้งเสร็จลองรันคำสั่ง

โค้ด: เลือกทั้งหมด

smartctl --all /dev/sdc | grep Power_On_Hours
เปลี่ยน /dev/sdc เป็น disk ในเครื่องของเรา
เช่นถ้าตามภาพจะเป็น
/dev/sda
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
eange08
PHP VIP Members
PHP VIP Members
โพสต์: 16184
ลงทะเบียนเมื่อ: 22/12/2020 10:09 am

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย eange08 »

ลอง run คำสั่งนี้แล้วไม่ขึ้นผลลัพท์ให้นะคะ

โค้ด: เลือกทั้งหมด

 smartctl --all /dev/sda | grep Power_On_Hours
ผลที่ได้

โค้ด: เลือกทั้งหมด

com012@com012-X450LD:~$ smartctl --all /dev/sda | grep Power_On_Hours
com012@com012-X450LD:~$ smartctl --all /dev/sda | grep Power_On_Hours
ถาม - ตอบ คอมพิวเตอร์-1.png
ถาม - ตอบ คอมพิวเตอร์-1.png (153.87 KiB) Viewed 1204 times
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

ลองตัดเหลือคำสั่งหรือ

โค้ด: เลือกทั้งหมด

 smartctl --all /dev/sda
เพื่อดูผล
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
eange08
PHP VIP Members
PHP VIP Members
โพสต์: 16184
ลงทะเบียนเมื่อ: 22/12/2020 10:09 am

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย eange08 »

run ได้แล้วนะคะ ต้องเพิ่ม sudo เพราะติดเรื่องสิทธิ

โค้ด: เลือกทั้งหมด

sudo smartctl --all /dev/sda
ผลที่ได้จะดูวันที่หมดอายุตรงไหนเหรอค่ะ

โค้ด: เลือกทั้งหมด

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.15.0-142-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     KINGSTON SA400S37240G
Serial Number:    50026B77823F74AE
LU WWN Device Id: 5 0026b7 7823f74ae
Firmware Version: R0105A
User Capacity:    240,057,409,536 bytes [240 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-3 T13/2161-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Dec 30 12:57:42 2021 +07
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: 		(  120) seconds.
Offline data collection
capabilities: 			 (0x11) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					No Offline surface scan supported.
					Self-test supported.
					No Conveyance Self-test supported.
					No Selective Self-test supported.
SMART capabilities:            (0x0002)	Does not save 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: 	 (  10) minutes.

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     0x0032   100   100   000    Old_age   Always       -       100
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       3974
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       968
148 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       0
149 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       0
167 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       0
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
169 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       0
170 Unknown_Attribute       0x0000   100   100   010    Old_age   Offline      -       0
172 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
173 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       0
181 Program_Fail_Cnt_Total  0x0032   100   100   000    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0000   100   100   000    Old_age   Offline      -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       49
194 Temperature_Celsius     0x0022   047   061   000    Old_age   Always       -       47 (Min/Max 31/61)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
199 UDMA_CRC_Error_Count    0x0032   100   100   000    Old_age   Always       -       0
218 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       0
231 Temperature_Celsius     0x0000   096   096   000    Old_age   Offline      -       96
233 Media_Wearout_Indicator 0x0032   100   100   000    Old_age   Always       -       2644
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       2310
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       1475
244 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       40
245 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       75
246 Unknown_Attribute       0x0000   100   100   000    Old_age   Offline      -       19959

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       Aborted by host               90%         0         -
# 2  Short offline       Completed without error       00%         0         -
# 3  Short offline       Self-test routine in progress 40%         0         -
# 4  Short offline       Aborted by host               90%         0         -

Selective Self-tests/Logging not supported
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

Power_On_Hours 0x0032 100 100 000 Old_age Always - 3974
คือ จำนวนชม. ทีเปิดใช้งาน
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
eange08
PHP VIP Members
PHP VIP Members
โพสต์: 16184
ลงทะเบียนเมื่อ: 22/12/2020 10:09 am

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย eange08 »

ขอสูตรคำนวณอายุใช้งานได้ไหมค่ะ
ภาพประจำตัวสมาชิก
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
โพสต์: 41232
ลงทะเบียนเมื่อ: 22/09/2008 6:18 pm
ติดต่อ:

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย mindphp »

หาร 24 ชม. จะได้หน่วยเป็นวันออกมาครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042
ภาพประจำตัวสมาชิก
MBMoo
PHP VIP Members
PHP VIP Members
โพสต์: 25602
ลงทะเบียนเมื่อ: 04/06/2020 10:05 am

Re: ขอวิธีเช็ควันหมดอายุของ ssd บน ubantu

โพสต์ที่ยังไม่ได้อ่าน โดย MBMoo »

โค้ด: เลือกทั้งหมด

smartctl 6.5 2016-01-24 r4214 [x86_64-linux-4.15.0-137-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     TOSHIBA KSG60ZMV256G M.2 2280 256GB
Serial Number:    682F70F8F5WP
LU WWN Device Id: 5 00080d 8001d8626
Firmware Version: ABDA4102
User Capacity:    256,060,514,304 bytes [256 GB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    Solid State Device
Form Factor:      M.2
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   Unknown(0x0ff8) (minor revision not indicated)
SATA Version is:  SATA >3.2 (0x1ff), 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri Jan 21 19:54:24 2022 +07
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:      (  16)	The self-test routine was aborted by
					the host.
Total time to complete Offline 
data collection: 		(  120) 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: 	 (   2) minutes.
Extended self-test routine
recommended polling time: 	 (  11) minutes.
SCT capabilities: 	       (0x003d)	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
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       7172
 12 Power_Cycle_Count       0x0033   100   100   000    Pre-fail  Always       -       1567
166 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
167 Unknown_Attribute       0x0022   100   100   000    Old_age   Always       -       0
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
173 Unknown_Attribute       0x0012   188   188   000    Old_age   Always       -       0
175 Program_Fail_Count_Chip 0x0033   100   100   010    Pre-fail  Always       -       0
176 Erase_Fail_Count_Chip   0x0033   100   100   010    Pre-fail  Always       -       0
177 Wear_Leveling_Count     0x0033   088   088   010    Pre-fail  Always       -       0
178 Used_Rsvd_Blk_Cnt_Chip  0x0033   100   100   010    Pre-fail  Always       -       0
179 Used_Rsvd_Blk_Cnt_Tot   0x0033   100   100   010    Pre-fail  Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   010    Pre-fail  Always       -       100
181 Program_Fail_Cnt_Total  0x0033   100   100   010    Pre-fail  Always       -       100
182 Erase_Fail_Count_Total  0x0033   100   100   010    Pre-fail  Always       -       100
187 Reported_Uncorrect      0x0033   100   100   000    Pre-fail  Always       -       3
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       118
194 Temperature_Celsius     0x0022   044   023   000    Old_age   Always       -       56 (Min/Max 23/77)
195 Hardware_ECC_Recovered  0x002b   100   100   000    Pre-fail  Always       -       0
199 UDMA_CRC_Error_Count    0x0012   100   100   000    Old_age   Always       -       0
238 Unknown_Attribute       0x0032   088   088   010    Old_age   Always       -       0
241 Total_LBAs_Written      0x0013   100   100   000    Pre-fail  Always       -       382071
242 Total_LBAs_Read         0x0013   100   100   000    Pre-fail  Always       -       318880

SMART Error Log Version: 1
ATA Error Count: 3
	CR = Command Register [HEX]
	FR = Features Register [HEX]
	SC = Sector Count Register [HEX]
	SN = Sector Number Register [HEX]
	CL = Cylinder Low Register [HEX]
	CH = Cylinder High Register [HEX]
	DH = Device/Head Register [HEX]
	DC = Device Command Register [HEX]
	ER = Error register [HEX]
	ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 3 occurred at disk power-on lifetime: 2380 hours (99 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 08 2a 47 58 40  Error: UNC at LBA = 0x0058472a = 5785386

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 70 30 32 f4 40 08      00:24:44.774  READ FPDMA QUEUED
  60 08 68 30 32 de 40 08      00:24:44.774  READ FPDMA QUEUED
  60 08 60 18 8c 44 40 08      00:24:44.774  READ FPDMA QUEUED
  60 08 58 00 95 ec 40 08      00:24:44.774  READ FPDMA QUEUED
  60 78 50 f8 f9 74 40 08      00:24:44.772  READ FPDMA QUEUED

Error 2 occurred at disk power-on lifetime: 2380 hours (99 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 d8 2a 47 58 40  Error: WP at LBA = 0x0058472a = 5785386

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  61 18 e8 d8 2b dc 40 08      00:24:13.798  WRITE FPDMA QUEUED
  60 08 e0 b0 62 ea 40 08      00:24:13.798  READ FPDMA QUEUED
  60 08 d8 28 47 58 40 08      00:24:13.798  READ FPDMA QUEUED
  60 08 d0 f0 aa f2 40 08      00:24:13.798  READ FPDMA QUEUED
  60 08 c8 80 5a d4 40 08      00:24:13.798  READ FPDMA QUEUED

Error 1 occurred at disk power-on lifetime: 2380 hours (99 days + 4 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 51 48 2a 47 58 40  Error: UNC at LBA = 0x0058472a = 5785386

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 48 28 47 58 40 08      00:23:42.449  READ FPDMA QUEUED
  60 08 40 60 5a 52 40 08      00:23:42.449  READ FPDMA QUEUED
  60 08 38 60 a8 f2 40 08      00:23:42.449  READ FPDMA QUEUED
  60 08 30 28 55 9c 40 08      00:23:42.449  READ FPDMA QUEUED
  60 08 28 10 59 52 40 08      00:23:42.449  READ FPDMA QUEUED

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Aborted by host               00%      4433         -
# 2  Short offline       Aborted by host               00%      3121         -
# 3  Short offline       Aborted by host               00%      3121         -
# 4  Short offline       Completed without error       00%         2         -
# 5  Short offline       Completed without error       00%         0         -

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.
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: facebook.com [Crawler] และบุคลทั่วไป 93