← 返回
效率工具 中文

mactop

Retrieve real-time hardware metrics from Apple Silicon Macs using mactop's TOON format. Provides CPU, RAM, GPU, power, thermal, network, disk I/O, and Thunderbolt bus information. Use when the user wants system stats, hardware monitoring, or performance metrics on Apple Silicon Macs.
使用 mactop 的 TOON 格式检索 Apple Silicon Mac 的实时硬件指标。提供 CPU、RAM、GPU、功耗、温度、网络、磁盘 I/O 及 Thunderbolt 总线信息。适用于用户需要获取 Apple Silicon Mac 的系统状态、硬件监控或性能指标的场景。
metaspartan
效率工具 clawhub v1.0.1 1 版本 99628.5 Key: 无需
★ 2
Stars
📥 2,642
下载
💾 132
安装
1
版本
#latest

概述

Mactop Skill

Execute mactop in headless TOON mode and parse the output for hardware metrics.

Prerequisites

  • mactop installed: brew install mactop
  • PATH includes /usr/sbin: Required for sysctl access

Usage

Get Full Metrics

mactop --format toon --headless --count 1

Parse Key Metrics

CPU Usage:

mactop --format toon --headless --count 1 | grep "^cpu_usage:" | awk '{print $2}'

RAM (used/total GB):

mactop --format toon --headless --count 1 | grep -E "^  (Used|Total):" | awk '{printf "%.1f", $2/1073741824}'

GPU Usage:

mactop --format toon --headless --count 1 | grep "^gpu_usage:" | awk '{print $2}'

Power (total/CPU/GPU):

mactop --format toon --headless --count 1 | grep -E "^  (TotalPower|CPUPower|GPUPower):" | awk '{print $2}'

Thermal State:

mactop --format toon --headless --count 1 | grep "^thermal_state:" | awk '{print $2}'

Temperature:

mactop --format toon --headless --count 1 | grep "^  SocTemp:" | awk '{print $2}'

Chip Info:

mactop --format toon --headless --count 1 | grep "^  Name:" | awk '{print $2}'

Network I/O (bytes/sec):

mactop --format toon --headless --count 1 | grep -E "^(  InBytesPerSec|  OutBytesPerSec):" | awk '{print $2}'

Thunderbolt Buses:

mactop --format toon --headless --count 1 | grep "^    Name:" | awk '{print $2}'

Options

OptionDescription
---------------------
--count NNumber of samples (default: 1)
--interval MSSample interval in milliseconds (default: 1000)

TOON Format

timestamp: "2026-01-25T20:00:00-07:00"
soc_metrics:
  CPUPower: 0.15
  GPUPower: 0.02
  TotalPower: 8.5
  SocTemp: 42.3
memory:
  Total: 25769803776
  Used: 14852408320
  Available: 10917395456
cpu_usage: 5.2
gpu_usage: 1.8
thermal_state: Normal
system_info:
  Name: Apple M4 Pro
  CoreCount: 12

Response Example

Format metrics in a readable box:

┌─ Apple M4 Pro ──────────────────────┐
│ CPU:   5.2%  |  RAM: 13.8/24.0 GB  │
│ GPU:   1.8%  |  Power: 8.5W total  │
│ Thermal: Normal  |  SoC: 42.3°C    │
└─────────────────────────────────────┘

Troubleshooting

  • "sysctl not found" → Add /usr/sbin to PATH
  • No output → Verify mactop is installed: which mactop

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-28 13:18 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 444 📥 226,121
productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,212
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,739