metaspartan

mactop

运维安全v1.0.1
作者:metaspartan更新于 2026-05-11共 2 个版本 · 最新版本发布于 2026-01-26@clawhub_metaspartan/mactop
监控告警服务器运维

据 AlphaMoat 统计,截至 2026-09,mactop 累计下载 3,284 次、获 2 个星标,在全部 5,078 个 AI 技能中排名第 3,458 位,在「运维安全」分类(264 个)中排名第 221 位。

累计安装
132
累计下载
3,284
星标
2
全站排名
#3,458
全站前 69% · 「运维安全」前 84%
平台累计安装累计下载星标评论
ClawHub ↗1023,0562-
SkillHub ↗1323,2842—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能通过 mactop 的无头 TOON 输出获取 CPU、内存、GPU、功耗、温度、网络、磁盘 I/O 和 Thunderbolt 信息;需要本机安装 mactop 与相关系统工具。指标可能暴露设备运行状况,仅在需要本机监控时使用,并避免向不可信对象分享摘要。 sysctl 访问需要 PATH 包含 /usr/sbin。

资料发布于 2026-10-29

可以用来做什么

  • 需要检查 Apple Silicon Mac 性能、功耗、温度或 I/O 状态的开发者与运维人员。

什么时候用

  • 确认目标是本机硬件监控且 mactop 已从可信来源安装;分享指标前检查是否包含敏感设备信息。

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

请读取这台 Mac 的 CPU、内存、GPU、温度和网络指标,并只在当前会话中总结。

月度数据趋势

累计下载3,284
2,1682,7683,3672026-03 · 累计下载 2,2512026-05 · 累计下载 2,6132026-06 · 累计下载 2,7302026-07 · 累计下载 2,9342026-08 · 累计下载 3,0042026-09 · 累计下载 3,28426-0326-09
星标2
1232026-03 · 星标 22026-05 · 星标 22026-06 · 星标 22026-07 · 星标 22026-08 · 星标 22026-09 · 星标 226-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,284—2
2026-083,004+2.4%2
2026-072,934+7.5%2
2026-062,730+4.5%2
2026-052,613—2
2026-032,251—2

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

2.8 KB · ClawHub v1.0.1
---
name: mactop
description: |
  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 Skill
展开全部(共 117 行)
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

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

### Parse Key Metrics

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

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

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

**Power (total/CPU/GPU):**
```bash
mactop --format toon --headless --count 1 | grep -E "^  (TotalPower|CPUPower|GPUPower):" | awk '{print $2}'
```

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

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

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

**Network I/O (bytes/sec):**
```bash
mactop --format toon --headless --count 1 | grep -E "^(  InBytesPerSec|  OutBytesPerSec):" | awk '{print $2}'
```

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

## Options

| Option | Description |
|--------|-------------|
| `--count N` | Number of samples (default: 1) |
| `--interval MS` | Sample 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`

「运维安全」分类下的热门技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。