本文总结在 macOS
上使用 smartctl
和 lspci
的安装过程和使用方法。
使用系统 macOS Big Sur
,软件包管理器 Homebrew
。
Update: 2022 / 10 / 15
smartctl
参考 1
查看 MacBook
原装 SSD
硬盘的相关信息,推荐下载使用 smartmontools
,命令行工具,功能完整。
使用 -a
命令查看状态:
% brew install smartmontools
% which smartctl
/opt/homebrew/bin/smartctl
% cd /opt/homebrew/bin
% smartctl -a disk0
smartctl 7.2 2020-12-30 r5155 [Darwin 20.5.0 arm64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Number:
Serial Number:
Firmware Version:
PCI Vendor/Subsystem ID:
IEEE OUI Identifier:
Controller ID: 0
NVMe Version: <1.2
Number of Namespaces:
Local Time is: Sat Oct 15 14:20:07 2022 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: 34 Celsius
Available Spare: 100%
Available Spare Threshold: 99%
Percentage Used: 0%
Data Units Read: 47,321,246 [24.2 TB]
Data Units Written: 23,063,527 [11.8 TB]
Host Read Commands: 696,632,379
Host Write Commands: 288,986,187
Controller Busy Time: 0
Power Cycles: 116
Power On Hours: 442
Unsafe Shutdowns: 24
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
lspci
没成功在自己的笔记本电脑上安上 pciutils。。。
先mark,后续补上。