用 ioreg 查询硬件注册表信息
读取 I/O Kit 注册表中的电池循环次数、USB 设备详情和传感器数值。
运行 `ioreg -rn AppleSmartBattery` 查看电池信息,或 `ioreg -p IOUSB -w0` 列出带属性的 USB 设备。
01命令
命令
$ ioreg -rn AppleSmartBattery | grep -i cycle02作用说明
ioreg 输出实时的 I/O Kit 注册表——支撑所有硬件的驱动对象树。`-r -n <名称>` 会以匹配的节点为根输出(如 AppleSmartBattery、IOUSBHostDevice),`-l` 可显示全部属性。电池节点包含 CycleCount(循环次数)、DesignCapacity(设计容量)和 Temperature(温度)等键,因此 ioreg 是不装第三方软件查看电池健康度的经典方式。
03风险
!注意: 注册表数值由驱动上报,很多键没有官方文档——异常读数只能当线索,不能当结论。
04撤销
✓无需撤销——该命令不会改变持久状态。
05来源
- Introduction to I/O Kit Fundamentals依据: Apple's documentation of the I/O Kit registry — the object tree ioreg exposes.
最后验证: 2026-09-17 · 分类: 系统与设置