2014年2月17日 星期一

[MAC] Mac 上面檢查SSD的免費command tools "smartnontools"

早上突然想起我MacBook Pro上面自己更換的SSD 硬碟也用了三年多了,不知什麼時候會遇到硬碟毀損的問題,就想說找看看有沒有工具來檢測一下,雖然為了面對這個遲早會來的SSD硬碟毀損,以就先投資了設備,最好備份,但是還是希望有辦法做好心理建設,避免他突然到來,影像到手邊的工作,找了一下,不是windows版本only,就是都要錢,只有上面這一套,open source的,免費,而且效果也不錯

下載網址:http://www.smartmontools.org/

使用方法很簡單,安裝好後就直接開啟 Terminal 

找出你的disk id , 在mac 上面通常是 /dev/rdisk[0-9]

# smartctl -i /dev/rdisk1

=== START OF INFORMATION SECTION ===
Model Family: Toshiba 2.5" HDD MK..65GSX
Device Model: TOSHIBA MK5065GSXF
Serial Number: 91E1C40MT
LU WWN Device Id: 5 000039 38330402a
Firmware Version: GP006B
User Capacity: 500,107,862,016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS (minor revision not indicated)
SATA Version is: SATA 2.6, 3.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Thu May 12 17:35:32 2016 CST
SMART support is: Available - device has SMART capability.
SMART support is: Disabled

 

使用方法:

1、smartctl -a檢查該設備是否已經打開SMART技術。
2、smartctl -s on如果沒有打開SMART技術,使用該命令打開SMART技術。
3、smartctl -t short後台檢測硬盤,消耗時間短;
smartctl -t long後台檢測硬盤,消耗時間長;
smartctl -C -t short前台檢測硬盤,消耗時間短;
smartctl -C -t long前台檢測硬盤,消耗時間長。其實就是利用硬盤SMART的自檢程序。
4、smartctl -X中斷後台檢測硬盤。
5、smartctl -l selftest顯示硬盤檢測日誌。
6、smartctl -l error顯示硬盤錯誤匯總。


如何知道SSD 還有多少壽命?

1.使用diskutil 找出硬碟代號

diskutil list

/dev/disk0 (internal):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                         2.0 TB     disk0

   1:                        EFI EFI                     314.6 MB   disk0s1

   2:                 Apple_APFS Container disk1         2.0 TB     disk0s2

2.例如我這邊最大的硬碟Identifier 為disk0s2,就使用smartctl 檢查

#smartctl -a disk0s2

然後會看到percentage usage, 就代表我的SSD已經損耗3%了



沒有留言:

How to restore a deleted onenote page

復原不小心誤刪的onenote