闲社服务运行正常AI智能体自动化平台
m

Mactop 技能

技能标识:mactop

|

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.1
检测标记
后台标记通过
免费
免费获取
2
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Mactop 技能

Mactop 技能

在无头 TOON 模式下执行 mactop 并解析输出以获取硬件指标。

前提条件

  • - 已安装 mactop:brew install mactop
  • PATH 包含 /usr/sbin:访问 sysctl 所需

使用方法

获取完整指标

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

解析关键指标

CPU 使用率:
bash
mactop --format toon --headless --count 1 | grep ^cpu_usage: | awk {print $2}

RAM(已用/总计 GB):
bash
mactop --format toon --headless --count 1 | grep -E ^ (Used|Total): | awk {printf %.1f, $2/1073741824}

GPU 使用率:
bash
mactop --format toon --headless --count 1 | grep ^gpu_usage: | awk {print $2}

功耗(总计/CPU/GPU):
bash
mactop --format toon --headless --count 1 | grep -E ^ (TotalPower|CPUPower|GPUPower): | awk {print $2}

热状态:
bash
mactop --format toon --headless --count 1 | grep ^thermal_state: | awk {print $2}

温度:
bash
mactop --format toon --headless --count 1 | grep ^ SocTemp: | awk {print $2}

芯片信息:
bash
mactop --format toon --headless --count 1 | grep ^ Name: | awk {print $2}

网络 I/O(字节/秒):
bash
mactop --format toon --headless --count 1 | grep -E ^( InBytesPerSec| OutBytesPerSec): | awk {print $2}

雷雳总线:
bash
mactop --format toon --headless --count 1 | grep ^ Name: | awk {print $2}

选项

选项描述
--count N采样次数(默认:1)
--interval MS
采样间隔(毫秒,默认:1000) |

TOON 格式

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

响应示例

以可读框格式显示指标:

┌─ Apple M4 Pro ──────────────────────┐
│ CPU: 5.2% | RAM: 13.8/24.0 GB │
│ GPU: 1.8% | 功耗:8.5W 总计 │
│ 热状态:正常 | SoC:42.3°C │
└─────────────────────────────────────┘

故障排除

  • - sysctl 未找到 → 将 /usr/sbin 添加到 PATH
  • 无输出 → 验证 mactop 是否已安装:which mactop

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 mactop-1776384810 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 mactop-1776384810 技能

通过命令行安装

skillhub install mactop-1776384810

下载

⬇ 下载 mactop v1.0.1(免费)

文件大小: 1.65 KB | 发布时间: 2026-4-17 15:21

v1.0.1 最新 2026-4-17 15:21
- Improved and clarified usage instructions for retrieving and parsing hardware metrics with mactop.
- Simplified prerequisites and troubleshooting steps.
- Updated parsing examples for key metrics (CPU, RAM, GPU, power, thermal, network, Thunderbolt).
- Provided clearer TOON format and example output box.
- Removed clawdbot-specific setup and wrapper script references for broader applicability.
返回顶部