目录
[TOC]
1.初始化环境
# Homebrew 安装
xcode-select --install # 先安装 xcode-select 工具
# 安装 brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install smartmontools
2.正式使用
smartctl -a /dev/disk0
运行后可以看到返回:
# dean @ mac in ~ [18:24:06]
$ smartctl -a /dev/disk0
smartctl 7.3 2022-02-28 r5338 [Darwin 22.4.0 arm64] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number: APPLE SSD xxxxx
Serial Number: xxxxx
Firmware Version: 874.100.
PCI Vendor/Subsystem ID: 0x106b
IEEE OUI Identifier: 0x000000
Controller ID: 0
NVMe Version: <1.2
Number of Namespaces: 3
Local Time is: Wed Apr 19 18:24:07 2023 CST
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: 47 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 9%
Data Units Read: 331,155,145 [169 TB]
Data Units Written: 259,881,741 [133 TB]
Host Read Commands: 6,068,117,117
Host Write Commands: 2,813,098,894
Controller Busy Time: 0
Power Cycles: 691
Power On Hours: 2,185
Unsafe Shutdowns: 105
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
# brettdean @ mac in ~ [18:24:07] C:4
$
3.卸载
brew uninstall smartctl