Resource Analyze
SkillDocs & knowledgeComprehensively analyze system resource usage such as CPU, memory, and load to locate bottlenecks.
Available today. Use it from your connected AI after setup.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
Then ask your AI: use the Resource Analyze skill
What this skill tells your AI
The instructions your AI receives, as published by kubehan/promai in skills/resource-analyze/SKILL.md and read by ahel’s review.
当用户询问系统资源、服务器性能、卡顿原因或 CPU/内存异常时,使用此工作流。
步骤
1. 查询 CPU 使用率
使用 query_metrics 获取 CPU 使用率:
100 - (avg by (instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
如果需要查看每个 CPU 核的情况:
100 - (avg by (instance, cpu) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)
2. 查询内存使用率
(1 - (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes)) * 100
查看内存分布详情:
node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes
3. 查询系统负载
node_load1 / on (instance) count by (instance) (node_cpu_seconds_total{mode="system"})
4. 检查 Swap 使用
(1 - (node_memory_SwapFree_bytes / node_memory_SwapTotal_bytes)) * 100
5. 结果分析
| 指标 | 正常 | 需关注 | 严重 |
|---|---|---|---|
| CPU 使用率 | < 70% | 70-90% | > 90% |
| 内存使用率 | < 80% | 80-90% | > 90% |
| 负载/核心数 | < 1 | 1-2 | > 2 |
| Swap 使用 | < 10% | 10-50% | > 50% |
- 需关注:使用
exec执行top -bn1 | head -20查看进程详情 - 严重:使用
push_report推送紧急性能报告
Signals
- GitHub stars
- 124
- Forks
- 44
- Last commit
- Sep 2026
Advanced
- Item type
- skill
- Key
resource-analyze- Source
- github.com/kubehan/promai