smatrmontools is 何?
Smartmontools は、ハードディスクドライブ (HDD) やソリッドステートドライブ (SSD) などのストレージデバイスの自己診断機能である S.M.A.R.T. (Self-Monitoring, Analysis and Reporting Technology) を利用するためのコマンドラインツールです。
インストール
% brew install smartmontools
smartmon コマンド実行
% smartctl -a /dev/disk0
/dev/disk0
の部分は環境による。
diskutil list
で調べるなどする。
怒られるなどした場合
Error: You have not agreed to the Xcode license. Please resolve this by running:
sudo xcodebuild -license accept
% sudo xcodebuild -license accept
Password:
xcode-select: Failed to locate 'clang', requesting installation of command line developer tools.
こちらはグラフィカルなインストール画面が出る。
MacBook Air 2020 (CPU Apple Silicon M1 / RAM 16GB / SSD 2TB)
=== START OF INFORMATION SECTION ===
Model Number: APPLE SSD AP2048Q
Local Time is: Wed Nov 2 07:56:20 2022 JST
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 38 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 4%
Data Units Read: 497,141,600 [254 TB]
Data Units Written: 370,951,741 [189 TB]
書き込み回数(総書き込み量 ÷ ストレージ容量): 94.5回
MacBook Pro 2019 (CPU Intel Core i9 / RAM 64GB / SSD 1TB)
=== START OF INFORMATION SECTION ===
Model Number: APPLE SSD AP1024N
Local Time is: Wed Nov 2 08:14:33 2022 JST
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 36 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 1%
Data Units Read: 243,942,751 [124 TB]
Data Units Written: 185,837,203 [95.1 TB]
書き込み回数(総書き込み量 ÷ ストレージ容量): 95.1回
MacBook Air 2019 ( CPU Intel Core i7 / RAM 16GB / SSD 2TB)
=== START OF INFORMATION SECTION ===
Model Number: APPLE SSD AP2048N
Local Time is: Wed Nov 2 10:18:50 2022 JST
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 47 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 3%
Data Units Read: 281,351,755 [144 TB]
Data Units Written: 259,379,015 [132 TB]
Host Read Commands: 3,653,418,874
Host Write Commands: 2,591,475,276
書き込み回数(総書き込み量 ÷ ストレージ容量): 66回
MacBookPro M1 MAX 2021 (CPU Apple Silicon M1MAX / RAM 64GB / SSD 4TB)
% smartctl -a /dev/disk0
smartctl 7.4 2023-08-01 r5530 [Darwin 24.4.0 arm64] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: APPLE SSD AP4096R
Serial Number: 0ba019116210ac04
Firmware Version: 532.100.
PCI Vendor/Subsystem ID: 0x106b
IEEE OUI Identifier: 0x000000
Controller ID: 0
NVMe Version: <1.2
Number of Namespaces: 3
Local Time is: Sat Apr 26 15:52:37 2025 JST
Firmware Updates (0x02): 1 Slot
Optional Admin Commands (0x0004): Frmw_DL
Optional NVM Commands (0x0004): DS_Mngmt
Maximum Data Transfer Size: 256 Pages
Supported Power States
St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat
0 + 0.00W - - 0 0 0 0 0 0
=== START OF SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
SMART/Health Information (NVMe Log 0x02)
Critical Warning: 0x00
Temperature: 33 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 4%
Data Units Read: 655,596,274 [335 TB]
Data Units Written: 335,931,062 [171 TB]
Host Read Commands: 15,723,073,828
Host Write Commands: 10,994,436,333
Controller Busy Time: 0
Power Cycles: 380
Power On Hours: 6,813
Unsafe Shutdowns: 23
Media and Data Integrity Errors: 0
Error Information Log Entries: 0
Read 1 entries from Error Information Log failed: GetLogPage failed: system=0x38, sub=0x0, code=745
書き込み回数(総書き込み量 ÷ ストレージ容量): 42.75回