|
| 1 | +--- |
| 2 | +tags: |
| 3 | + - mac |
| 4 | +--- |
| 5 | + |
| 6 | +# 快速查询 Mac 磁盘信息 |
| 7 | + |
| 8 | +> 参考:[MacBook M1 查询硬盘写入教程 | 知乎](https://zhuanlan.zhihu.com/p/354385629) |
| 9 | +
|
| 10 | +## 安装磁盘工具 |
| 11 | + |
| 12 | +[smartmontools](https://www.smartmontools.org/) 是一款用于监控和分析硬盘健康状态的命令行工具。 |
| 13 | + |
| 14 | +通过 [Homebrew](./homebrew-guide.md) 安装: |
| 15 | + |
| 16 | +```bash |
| 17 | +brew install smartmontools |
| 18 | +``` |
| 19 | + |
| 20 | +## 查询磁盘信息 |
| 21 | + |
| 22 | +安装后,即可查询磁盘信息: |
| 23 | + |
| 24 | +```bash |
| 25 | +smartctl -a disk0 |
| 26 | +``` |
| 27 | + |
| 28 | +::: details 输出磁盘信息参考 |
| 29 | + |
| 30 | +```bash |
| 31 | +smartctl 7.4 2023-08-01 r5530 [Darwin 24.3.0 arm64] (local build) |
| 32 | +Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org |
| 33 | + |
| 34 | +=== START OF INFORMATION SECTION === |
| 35 | +Model Number: APPLE SSD AP2048Q |
| 36 | +Serial Number: 03a486784034c426 |
| 37 | +Firmware Version: 499.0.9 |
| 38 | +PCI Vendor/Subsystem ID: 0x106b |
| 39 | +IEEE OUI Identifier: 0x000000 |
| 40 | +Controller ID: 0 |
| 41 | +NVMe Version: <1.2 |
| 42 | +Number of Namespaces: 3 |
| 43 | +Local Time is: Tue Mar 11 19:05:25 2025 CST |
| 44 | +Firmware Updates (0x02): 1 Slot |
| 45 | +Optional Admin Commands (0x0004): Frmw_DL |
| 46 | +Optional NVM Commands (0x0004): DS_Mngmt |
| 47 | +Maximum Data Transfer Size: 256 Pages |
| 48 | + |
| 49 | +Supported Power States |
| 50 | +St Op Max Active Idle RL RT WL WT Ent_Lat Ex_Lat |
| 51 | + 0 + 0.00W - - 0 0 0 0 0 0 |
| 52 | + |
| 53 | +=== START OF SMART DATA SECTION === |
| 54 | +SMART overall-health self-assessment test result: PASSED |
| 55 | + |
| 56 | +SMART/Health Information (NVMe Log 0x02) |
| 57 | +Critical Warning: 0x00 |
| 58 | +Temperature: 46 Celsius |
| 59 | +Available Spare: 100% |
| 60 | +Available Spare Threshold: 99% |
| 61 | +Percentage Used: 0% |
| 62 | +Data Units Read: 2,122,071 [1.08 TB] |
| 63 | +Data Units Written: 1,233,010 [631 GB] |
| 64 | +Host Read Commands: 35,854,349 |
| 65 | +Host Write Commands: 14,027,979 |
| 66 | +Controller Busy Time: 0 |
| 67 | +Power Cycles: 12 |
| 68 | +Power On Hours: 11 |
| 69 | +Unsafe Shutdowns: 0 |
| 70 | +Media and Data Integrity Errors: 0 |
| 71 | +Error Information Log Entries: 0 |
| 72 | + |
| 73 | +Read 1 entries from Error Information Log failed: GetLogPage failed: system=0x38, sub=0x0, code=745 |
| 74 | +``` |
| 75 | + |
| 76 | +::: |
| 77 | + |
| 78 | +主要信息查看的信息就这些: |
| 79 | + |
| 80 | +- Temperature:硬盘温度 |
| 81 | +- Data Units Read:磁盘累计读取量 |
| 82 | +- Data Units Written:磁盘累计写入量 |
| 83 | +- Power On Hours:通电小时数 |
| 84 | + |
| 85 | +懒得看的朋友,也可以直接复制所有信息丢给 AI 分析。 |
0 commit comments