Skip to content

Commit 8336d16

Browse files
committed
docs: 快速查询 Mac 磁盘信息
1 parent 089da6b commit 8336d16

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

.vitepress/config/sidebar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ const life: DefaultTheme.SidebarItem[] = [
8383
{ text: 'macOS 允许安装任何来源软件', link: '/life/mac-app-corruption-issue.md' },
8484
{ text: 'Mac Dock Bar 易用性调整', link: '/life/mac-dock-bar.md' },
8585
{ text: 'Homebrew 安装与使用', link: '/life/homebrew-guide.md' },
86+
{ text: '快速查询 Mac 磁盘信息', link: '/life/mac-query-disk-info.md' },
8687
],
8788
},
8889
{

life/mac-query-disk-info.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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

Comments
 (0)