resource-analysis
БесплатноБез исполняемых скриптовНе проверенAnalyze system resource usage data from sosreport archives, extracting memory statistics, CPU load averages, disk space utilization, and process information…
Об этом скилле
Resource Analysis Skill
This skill provides detailed guidance for analyzing system resource usage from sosreport archives, including memory, CPU, disk space, and process information.
When to Use This Skill
Use this skill when:
- Analyzing the
/sosreport:analyzecommand's resource analysis phase - Investigating performance issues or resource bottlenecks
- Identifying resource exhaustion problems
- Correlating resource usage with system failures
Prerequisites
- Sosreport archive must be extracted to a working directory
- Path to the sosreport root directory must be known
- Understanding of Linux resource management
Key Resource Data Locations in Sosreport
Memory Information:
sos_commands/memory/free- Memory usage snapshotproc/meminfo- Detailed memory statisticssos_commands/memory/swapon_-s- Swap usageproc/buddyinfo- Memory fragmentation
CPU Information:
sos_commands/processor/lscpu- CPU architecture and featuresproc/cpuinfo- Detailed CPU informationsos_commands/processor/turbostat- CPU frequency and power states (if available)uptime- Load averages
Disk Information:
sos_commands/filesys/df_-al- Filesystem usagesos_commands/block/lsblk- Block device informationsos_commands/filesys/mount- Mounted filesystemsproc/diskstats- Disk I/O statistics
Process Information:
sos_commands/process/ps_auxwww- Process list with detailssos_commands/process/top- Process snapshot (if available)proc/[pid]/- Per-process information
Implementation Steps
Step 1: Analyze Memory Usage
Parse free command output:
# Check if free output exists if [ -f sos_commands/memory/free ]; then cat sos_commands/memory/free fiExtract memory metrics:
# Parse /proc/meminfo for detailed stats if [ -f proc/meminfo ]; then grep -E "^(MemTotal|MemFree|MemAvailable|Buffers|Cached|SwapTotal|SwapFree|Dirty|Slab):" proc/meminfo fiCalculate memory usage percentage:
- Total memory = MemTotal
- Used memory = MemTotal - MemAvailable
- Usage percentage = (Used / Total) * 100
- Parse from
freeoutput or calculate frommeminfo
Check for memory pressure indicators:
# Look for OOM events in logs grep -i "out of memory\|oom killer" sos_commands/logs/journalctl_--no-pager 2>/dev/null # Check swap usage if [ -f sos_commands/memory/swapon_-s ]; then cat sos_commands/memory/swapon_-s fiIdentify memory issues:
- Memory usage > 90% → Critical
- Memory usage > 80% → Warning
- Heavy swap usage (>50% swap used) → Performance issue
- OOM killer events → Critical memory exhaustion
Step 2: Analyze CPU Usage
Extract CPU information:
# Get CPU count and model if [ -f sos_commands/processor/lscpu ]; then grep -E "^(CPU\(s\)|Model name|Thread|Core|Socket|CPU MHz):" sos_commands/processor/lscpu fiCheck load averages:
# Parse uptime for load averages if [ -f uptime ]; then cat uptime fi # Or from proc/loadavg if [ -f proc/loadavg ]; then cat proc/loadavg fiInterpret load averages:
- Load average format: 1-min, 5-min, 15-min
- Compare with CPU count from lscpu
- Load > CPU count → System overloaded
- Load >> CPU count (2x or more) → Critical overload
Check for CPU throttling:
# Look for thermal throttling in logs grep -i "throttl\|temperature\|thermal" sos_commands/logs/journalctl_--no-pager 2>/dev/null | head -20Identify CPU issues:
- 1-min load > 2x CPU count → Critical
- 5-min load > CPU count → Warning
- Thermal throttling present → Hardware/cooling issue
Step 3: Analyze Disk Usage
Parse df output for filesystem usage:
if [ -f sos_commands/filesys/df_-al ]; then # Skip header and special filesystems, show only regular filesystems grep -v "^Filesystem\|tmpfs\|devtmpfs\|overlay" sos_commands/filesys/df_-al | grep -v "^$" fiIdentify full or nearly-full filesystems:
# Extract filesystems with usage > 85% if [ -f sos_commands/filesys/df_-al ]; then awk 'NR>1 && $5+0 >= 85 {print $5, $6, $1}' sos_commands/filesys/df_-al | grep -v "tmpfs\|devtmpfs" fiCheck disk I/O errors:
# Look for I/O errors in logs grep -i "i/o error\|read error\|write error\|bad sector" var/log/dmesg 2>/dev/null grep -i "i/o error\|read error\|write error" sos_commands/logs/journalctl_--no-pager 2>/dev/null | head -20Analyze block devices:
if [ -f sos_commands/block/lsblk ]; then cat sos_commands/block/lsblk fiIdentify disk issues:
- Filesystem > 95% full → Critical
- Filesystem > 85% full → Warning
- I/O errors prese
Установить resource-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл resource-analysis?
Analyze system resource usage data from sosreport archives, extracting memory statistics, CPU load averages, disk space utilization, and process information from the sosreport directory structure to diagnose resource exhaustion, performance bottlenecks, and capacity issues
Как установить скилл resource-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл resource-analysis запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic