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:analyze command'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 snapshot
proc/meminfo - Detailed memory statistics
sos_commands/memory/swapon_-s - Swap usage
proc/buddyinfo - Memory fragmentation
CPU Information:
sos_commands/processor/lscpu - CPU architecture and features
proc/cpuinfo - Detailed CPU information
sos_commands/processor/turbostat - CPU frequency and power states (if available)
uptime - Load averages
Disk Information:
sos_commands/filesys/df_-al - Filesystem usage
sos_commands/block/lsblk - Block device information
sos_commands/filesys/mount - Mounted filesystems
proc/diskstats - Disk I/O statistics
Process Information:
sos_commands/process/ps_auxwww - Process list with details
sos_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
fi
Extract 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
fi
Calculate memory usage percentage:
- Total memory = MemTotal
- Used memory = MemTotal - MemAvailable
- Usage percentage = (Used / Total) * 100
- Parse from
free output or calculate from meminfo
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
fi
Identify 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
fi
Check 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
fi
Interpret 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 -20
Identify 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 "^$"
fi
Identify 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"
fi
Check 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 -20
Analyze block devices:
if [ -f sos_commands/block/lsblk ]; then
cat sos_commands/block/lsblk
fi
Identify disk issues:
- Filesystem > 95% full → Critical
- Filesystem > 85% full → Warning
- I/O errors present → Hardware issue
- Root filesystem full → System stability risk
Step 4: Analyze Process Information
Parse ps output:
if [ -f sos_commands/process/ps_auxwww ]; then
# Show header
head -1 sos_commands/process/ps_auxwww
fi
Find top CPU consumers:
# Sort by CPU usage (column 3), show top 10
if [ -f sos_commands/process/ps_auxwww ]; then
tail -n +2 sos_commands/process/ps_auxwww | sort -k3 -rn | head -10
fi
Find top memory consumers:
# Sort by memory usage (column 4), show top 10
if [ -f sos_commands/process/ps_auxwww ]; then
tail -n +2 sos_commands/process/ps_auxwww | sort -k4 -rn | head -10
fi
Check for zombie processes:
# Look for processes in Z state
if [ -f sos_commands/process/ps_auxwww ]; then
grep " Z " sos_commands/process/ps_auxwww || echo "No zombie processes found"
fi
Count processes by state:
# Count processes by state (R=running, S=sleeping, D=uninterruptible, Z=zombie, T=stopped)
if [ -f sos_commands/process/ps_auxwww ]; then
tail -n +2 sos_commands/process/ps_auxwww | awk '{print $8}' | cut -c1 | sort | uniq -c
fi
Identify process issues:
- Zombie processes present → Parent process not reaping children
- Many processes in D state → I/O bottleneck
- Single process using >80% memory → Memory leak or expected behavior
- Many processes using high CPU → CPU contention
Step 5: Correlate Resource Usage with Issues
Cross-reference with logs:
- If high memory usage, check for OOM events in logs
- If high disk usage, check for disk full errors
- If high load, check for performance-related errors
Identify resource exhaustion patterns:
- Memory exhaustion → OOM killer → Service crashes
- Disk full → Write failures → Application errors
- CPU overload → Timeouts → Request failures
Build timeline:
- When did resource issues start?
- Correlate with log timestamps
- Identify triggering event when log entries or metric changes indicate a clear cause
Step 6: Generate Resource Analysis Summary
Create a structured summary with the following sections:
Memory Summary:
- Total memory
- Used memory (GB and %)
- Available memory
- Swap usage (GB and %)
- Memory pressure indicators (OOM events)
CPU Summary:
- CPU count and model
- Load averages (1-min, 5-min, 15-min)
- Load per CPU
- CPU issues (throttling, overload)
Disk Summary:
- Filesystems and usage percentages
- Full or nearly-full filesystems
- I/O errors count
- Most full filesystem
Process Summary:
- Total process count
- Top CPU consumers (top 5)
- Top memory consumers (top 5)
- Zombie process count
- Processes in uninterruptible sleep (D state)
Critical Resource Issues:
- List issues by severity
- Provide evidence (file paths, metrics)
- Suggest remediation
Error Handling
Missing resource files:
- If
free is missing, parse proc/meminfo directly
- If
ps is missing, check proc/ for process information
- Document missing data in summary
Parsing errors:
- Handle different output formats (free -h vs free -m)
- Account for locale differences in number formats
- Validate data before calculations
Incomplete data:
- Some sosreports may not include all resource files
- Indicate which metrics are unavailable
- Work with available data only
Output Format
The resource analysis should produce:
RESOURCE USAGE SUMMARY
======================
MEMORY
------
Total: {total_gb} GB
Used: {used_gb} GB ({used_pct}%)
Available: {available_gb} GB ({available_pct}%)
Buffers: {buffers_gb} GB
Cached: {cached_gb} GB
Swap Total: {swap_total_gb} GB
Swap Used: {swap_used_gb} GB ({swap_used_pct}%)
Status: {OK|WARNING|CRITICAL}
Issues:
- {memory_issue_description}
CPU
---
Model: {cpu_model}
CPU Count: {cpu_count}
Threads/Core: {threads_per_core}
Load Averages: {load_1m}, {load_5m}, {load_15m}
Load per CPU: {load_1m_per_cpu}, {load_5m_per_cpu}, {load_15m_per_cpu}
Status: {OK|WARNING|CRITICAL}
Issues:
- {cpu_issue_description}
DISK USAGE
----------
Filesystem Size Used Avail Use% Mounted on
{filesystem} {size} {used} {avail} {pct}% {mount}
Nearly Full Filesystems (>85%):
- {mount}: {pct}% full ({available} available)
I/O Errors: {count} errors found in logs
Status: {OK|WARNING|CRITICAL}
Issues:
- {disk_issue_description}
PROCESSES
---------
Total Processes: {total}
Running: {running}
Sleeping: {sleeping}
Zombie: {zombie}
Uninterruptible: {uninterruptible}
Top CPU Consumers:
1. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM
2. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM
3. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM
Top Memory Consumers:
1. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU
2. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU
3. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU
Status: {OK|WARNING|CRITICAL}
Issues:
- {process_issue_description}
CRITICAL RESOURCE ISSUES
------------------------
{severity}: {issue_description}
Evidence: {file_path}
Impact: {impact_description}
Recommendation: {remediation_action}
RECOMMENDATIONS
---------------
1. {actionable_recommendation}
2. {actionable_recommendation}
DATA SOURCES
------------
- Memory: {sosreport_path}/sos_commands/memory/free
- Memory: {sosreport_path}/proc/meminfo
- CPU: {sosreport_path}/sos_commands/processor/lscpu
- Load: {sosreport_path}/uptime
- Disk: {sosreport_path}/sos_commands/filesys/df_-al
- Processes: {sosreport_path}/sos_commands/process/ps_auxwww
Examples
Example 1: Memory Analysis
# Parse free command output
$ cat sos_commands/memory/free
total used free shared buff/cache available
Mem: 16277396 8123456 2145678 123456 6008262 7654321
Swap: 8388604 512000 7876604
# Interpretation:
# - Total RAM: ~16 GB
# - Used: ~8 GB (50%)
# - Available: ~7.6 GB (47%)
# - Swap used: ~500 MB (6%)
# Status: OK - healthy memory usage
Example 2: Disk Full Detection
# Find filesystems > 85% full
$ awk 'NR>1 && $5+0 >= 85' sos_commands/filesys/df_-al
/dev/sda1 50G 45G 5G 90% /
/dev/sdb1 100G 96G 4G 96% /var/log
# Critical: Root filesystem at 90%, /var/log at 96%
# Action required: Clean up disk space
Example 3: High Load Investigation
# Check load averages
$ cat uptime
14:23:45 up 10 days, 3:42, 2 users, load average: 8.45, 7.23, 6.12
# With lscpu showing 4 CPUs:
# Load per CPU: 2.1, 1.8, 1.5
# System is overloaded (load > 2x CPU count)
Tips for Effective Analysis
- Context matters: High resource usage isn't always bad - consider the workload
- Look for trends: Compare 1-min, 5-min, 15-min loads to see if issues are growing
- Correlate metrics: High load + high memory + disk full = multiple issues
- Check ratios: Usage percentages are more meaningful than absolute values
- Validate findings: Cross-reference with log analysis for confirmation
- Consider capacity: Does the system have enough CPU, memory, and disk for its workload?
Common Resource Patterns
- Memory leak: Steadily increasing memory usage, eventual OOM
- Disk full: Application writes failing, log rotation issues
- CPU spike: Load average spike, potentially from runaway process
- I/O bottleneck: High load but low CPU usage, many D-state processes
- Swap thrashing: High swap usage, poor performance
- Zombie accumulation: Parent process bug not reaping children
Severity Classification
| Metric |
OK |
Warning |
Critical |
| Memory Usage |
< 80% |
80-90% |
> 90% |
| Swap Usage |
< 20% |
20-50% |
> 50% |
| Disk Usage |
< 85% |
85-95% |
> 95% |
| Load (per CPU) |
< 1.0 |
1.0-2.0 |
> 2.0 |
| Root FS Usage |
< 80% |
80-90% |
> 90% |
See Also
- Logs Analysis Skill: For finding resource-related errors in logs
- System Configuration Analysis Skill: For investigating service resource limits
- Network Analysis Skill: For network-related performance issues
1---2name: resource-analysis3description: 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 issues4---56# Resource Analysis Skill78This skill provides detailed guidance for analyzing system resource usage from sosreport archives, including memory, CPU, disk space, and process information.910## When to Use This Skill1112Use this skill when:13- Analyzing the `/sosreport:analyze` command's resource analysis phase14- Investigating performance issues or resource bottlenecks15- Identifying resource exhaustion problems16- Correlating resource usage with system failures1718## Prerequisites1920- Sosreport archive must be extracted to a working directory21- Path to the sosreport root directory must be known22- Understanding of Linux resource management2324## Key Resource Data Locations in Sosreport25261. **Memory Information**:27 - `sos_commands/memory/free` - Memory usage snapshot28 - `proc/meminfo` - Detailed memory statistics29 - `sos_commands/memory/swapon_-s` - Swap usage30 - `proc/buddyinfo` - Memory fragmentation31322. **CPU Information**:33 - `sos_commands/processor/lscpu` - CPU architecture and features34 - `proc/cpuinfo` - Detailed CPU information35 - `sos_commands/processor/turbostat` - CPU frequency and power states (if available)36 - `uptime` - Load averages37383. **Disk Information**:39 - `sos_commands/filesys/df_-al` - Filesystem usage40 - `sos_commands/block/lsblk` - Block device information41 - `sos_commands/filesys/mount` - Mounted filesystems42 - `proc/diskstats` - Disk I/O statistics43444. **Process Information**:45 - `sos_commands/process/ps_auxwww` - Process list with details46 - `sos_commands/process/top` - Process snapshot (if available)47 - `proc/[pid]/` - Per-process information4849## Implementation Steps5051### Step 1: Analyze Memory Usage52531. **Parse free command output**:54 ```bash55 # Check if free output exists56 if [ -f sos_commands/memory/free ]; then57 cat sos_commands/memory/free58 fi59 ```60612. **Extract memory metrics**:62 ```bash63 # Parse /proc/meminfo for detailed stats64 if [ -f proc/meminfo ]; then65 grep -E "^(MemTotal|MemFree|MemAvailable|Buffers|Cached|SwapTotal|SwapFree|Dirty|Slab):" proc/meminfo66 fi67 ```68693. **Calculate memory usage percentage**:70 - Total memory = MemTotal71 - Used memory = MemTotal - MemAvailable72 - Usage percentage = (Used / Total) * 10073 - Parse from `free` output or calculate from `meminfo`74754. **Check for memory pressure indicators**:76 ```bash77 # Look for OOM events in logs78 grep -i "out of memory\|oom killer" sos_commands/logs/journalctl_--no-pager 2>/dev/null7980 # Check swap usage81 if [ -f sos_commands/memory/swapon_-s ]; then82 cat sos_commands/memory/swapon_-s83 fi84 ```85865. **Identify memory issues**:87 - Memory usage > 90% → Critical88 - Memory usage > 80% → Warning89 - Heavy swap usage (>50% swap used) → Performance issue90 - OOM killer events → Critical memory exhaustion9192### Step 2: Analyze CPU Usage93941. **Extract CPU information**:95 ```bash96 # Get CPU count and model97 if [ -f sos_commands/processor/lscpu ]; then98 grep -E "^(CPU\(s\)|Model name|Thread|Core|Socket|CPU MHz):" sos_commands/processor/lscpu99 fi100 ```1011022. **Check load averages**:103 ```bash104 # Parse uptime for load averages105 if [ -f uptime ]; then106 cat uptime107 fi108109 # Or from proc/loadavg110 if [ -f proc/loadavg ]; then111 cat proc/loadavg112 fi113 ```1141153. **Interpret load averages**:116 - Load average format: 1-min, 5-min, 15-min117 - Compare with CPU count from lscpu118 - Load > CPU count → System overloaded119 - Load >> CPU count (2x or more) → Critical overload1201214. **Check for CPU throttling**:122 ```bash123 # Look for thermal throttling in logs124 grep -i "throttl\|temperature\|thermal" sos_commands/logs/journalctl_--no-pager 2>/dev/null | head -20125 ```1261275. **Identify CPU issues**:128 - 1-min load > 2x CPU count → Critical129 - 5-min load > CPU count → Warning130 - Thermal throttling present → Hardware/cooling issue131132### Step 3: Analyze Disk Usage1331341. **Parse df output for filesystem usage**:135 ```bash136 if [ -f sos_commands/filesys/df_-al ]; then137 # Skip header and special filesystems, show only regular filesystems138 grep -v "^Filesystem\|tmpfs\|devtmpfs\|overlay" sos_commands/filesys/df_-al | grep -v "^$"139 fi140 ```1411422. **Identify full or nearly-full filesystems**:143 ```bash144 # Extract filesystems with usage > 85%145 if [ -f sos_commands/filesys/df_-al ]; then146 awk 'NR>1 && $5+0 >= 85 {print $5, $6, $1}' sos_commands/filesys/df_-al | grep -v "tmpfs\|devtmpfs"147 fi148 ```1491503. **Check disk I/O errors**:151 ```bash152 # Look for I/O errors in logs153 grep -i "i/o error\|read error\|write error\|bad sector" var/log/dmesg 2>/dev/null154 grep -i "i/o error\|read error\|write error" sos_commands/logs/journalctl_--no-pager 2>/dev/null | head -20155 ```1561574. **Analyze block devices**:158 ```bash159 if [ -f sos_commands/block/lsblk ]; then160 cat sos_commands/block/lsblk161 fi162 ```1631645. **Identify disk issues**:165 - Filesystem > 95% full → Critical166 - Filesystem > 85% full → Warning167 - I/O errors present → Hardware issue168 - Root filesystem full → System stability risk169170### Step 4: Analyze Process Information1711721. **Parse ps output**:173 ```bash174 if [ -f sos_commands/process/ps_auxwww ]; then175 # Show header176 head -1 sos_commands/process/ps_auxwww177 fi178 ```1791802. **Find top CPU consumers**:181 ```bash182 # Sort by CPU usage (column 3), show top 10183 if [ -f sos_commands/process/ps_auxwww ]; then184 tail -n +2 sos_commands/process/ps_auxwww | sort -k3 -rn | head -10185 fi186 ```1871883. **Find top memory consumers**:189 ```bash190 # Sort by memory usage (column 4), show top 10191 if [ -f sos_commands/process/ps_auxwww ]; then192 tail -n +2 sos_commands/process/ps_auxwww | sort -k4 -rn | head -10193 fi194 ```1951964. **Check for zombie processes**:197 ```bash198 # Look for processes in Z state199 if [ -f sos_commands/process/ps_auxwww ]; then200 grep " Z " sos_commands/process/ps_auxwww || echo "No zombie processes found"201 fi202 ```2032045. **Count processes by state**:205 ```bash206 # Count processes by state (R=running, S=sleeping, D=uninterruptible, Z=zombie, T=stopped)207 if [ -f sos_commands/process/ps_auxwww ]; then208 tail -n +2 sos_commands/process/ps_auxwww | awk '{print $8}' | cut -c1 | sort | uniq -c209 fi210 ```2112126. **Identify process issues**:213 - Zombie processes present → Parent process not reaping children214 - Many processes in D state → I/O bottleneck215 - Single process using >80% memory → Memory leak or expected behavior216 - Many processes using high CPU → CPU contention217218### Step 5: Correlate Resource Usage with Issues2192201. **Cross-reference with logs**:221 - If high memory usage, check for OOM events in logs222 - If high disk usage, check for disk full errors223 - If high load, check for performance-related errors2242252. **Identify resource exhaustion patterns**:226 - Memory exhaustion → OOM killer → Service crashes227 - Disk full → Write failures → Application errors228 - CPU overload → Timeouts → Request failures2292303. **Build timeline**:231 - When did resource issues start?232 - Correlate with log timestamps233 - Identify triggering event when log entries or metric changes indicate a clear cause234235### Step 6: Generate Resource Analysis Summary236237Create a structured summary with the following sections:2382391. **Memory Summary**:240 - Total memory241 - Used memory (GB and %)242 - Available memory243 - Swap usage (GB and %)244 - Memory pressure indicators (OOM events)2452462. **CPU Summary**:247 - CPU count and model248 - Load averages (1-min, 5-min, 15-min)249 - Load per CPU250 - CPU issues (throttling, overload)2512523. **Disk Summary**:253 - Filesystems and usage percentages254 - Full or nearly-full filesystems255 - I/O errors count256 - Most full filesystem2572584. **Process Summary**:259 - Total process count260 - Top CPU consumers (top 5)261 - Top memory consumers (top 5)262 - Zombie process count263 - Processes in uninterruptible sleep (D state)2642655. **Critical Resource Issues**:266 - List issues by severity267 - Provide evidence (file paths, metrics)268 - Suggest remediation269270## Error Handling2712721. **Missing resource files**:273 - If `free` is missing, parse `proc/meminfo` directly274 - If `ps` is missing, check `proc/` for process information275 - Document missing data in summary2762772. **Parsing errors**:278 - Handle different output formats (free -h vs free -m)279 - Account for locale differences in number formats280 - Validate data before calculations2812823. **Incomplete data**:283 - Some sosreports may not include all resource files284 - Indicate which metrics are unavailable285 - Work with available data only286287## Output Format288289The resource analysis should produce:290291```bash292RESOURCE USAGE SUMMARY293======================294295MEMORY296------297Total: {total_gb} GB298Used: {used_gb} GB ({used_pct}%)299Available: {available_gb} GB ({available_pct}%)300Buffers: {buffers_gb} GB301Cached: {cached_gb} GB302Swap Total: {swap_total_gb} GB303Swap Used: {swap_used_gb} GB ({swap_used_pct}%)304305Status: {OK|WARNING|CRITICAL}306Issues:307 - {memory_issue_description}308309CPU310---311Model: {cpu_model}312CPU Count: {cpu_count}313Threads/Core: {threads_per_core}314315Load Averages: {load_1m}, {load_5m}, {load_15m}316Load per CPU: {load_1m_per_cpu}, {load_5m_per_cpu}, {load_15m_per_cpu}317318Status: {OK|WARNING|CRITICAL}319Issues:320 - {cpu_issue_description}321322DISK USAGE323----------324Filesystem Size Used Avail Use% Mounted on325{filesystem} {size} {used} {avail} {pct}% {mount}326327Nearly Full Filesystems (>85%):328 - {mount}: {pct}% full ({available} available)329330I/O Errors: {count} errors found in logs331332Status: {OK|WARNING|CRITICAL}333Issues:334 - {disk_issue_description}335336PROCESSES337---------338Total Processes: {total}339Running: {running}340Sleeping: {sleeping}341Zombie: {zombie}342Uninterruptible: {uninterruptible}343344Top CPU Consumers:345 1. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM346 2. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM347 3. {process_name} (PID {pid}): {cpu}% CPU, {mem}% MEM348349Top Memory Consumers:350 1. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU351 2. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU352 3. {process_name} (PID {pid}): {mem}% MEM, {cpu}% CPU353354Status: {OK|WARNING|CRITICAL}355Issues:356 - {process_issue_description}357358CRITICAL RESOURCE ISSUES359------------------------360{severity}: {issue_description}361 Evidence: {file_path}362 Impact: {impact_description}363 Recommendation: {remediation_action}364365RECOMMENDATIONS366---------------3671. {actionable_recommendation}3682. {actionable_recommendation}369370DATA SOURCES371------------372- Memory: {sosreport_path}/sos_commands/memory/free373- Memory: {sosreport_path}/proc/meminfo374- CPU: {sosreport_path}/sos_commands/processor/lscpu375- Load: {sosreport_path}/uptime376- Disk: {sosreport_path}/sos_commands/filesys/df_-al377- Processes: {sosreport_path}/sos_commands/process/ps_auxwww378```379380## Examples381382### Example 1: Memory Analysis383384```bash385# Parse free command output386$ cat sos_commands/memory/free387 total used free shared buff/cache available388Mem: 16277396 8123456 2145678 123456 6008262 7654321389Swap: 8388604 512000 7876604390391# Interpretation:392# - Total RAM: ~16 GB393# - Used: ~8 GB (50%)394# - Available: ~7.6 GB (47%)395# - Swap used: ~500 MB (6%)396# Status: OK - healthy memory usage397```398399### Example 2: Disk Full Detection400401```bash402# Find filesystems > 85% full403$ awk 'NR>1 && $5+0 >= 85' sos_commands/filesys/df_-al404/dev/sda1 50G 45G 5G 90% /405/dev/sdb1 100G 96G 4G 96% /var/log406407# Critical: Root filesystem at 90%, /var/log at 96%408# Action required: Clean up disk space409```410411### Example 3: High Load Investigation412413```bash414# Check load averages415$ cat uptime41614:23:45 up 10 days, 3:42, 2 users, load average: 8.45, 7.23, 6.12417418# With lscpu showing 4 CPUs:419# Load per CPU: 2.1, 1.8, 1.5420# System is overloaded (load > 2x CPU count)421```422423## Tips for Effective Analysis4244251. **Context matters**: High resource usage isn't always bad - consider the workload4262. **Look for trends**: Compare 1-min, 5-min, 15-min loads to see if issues are growing4273. **Correlate metrics**: High load + high memory + disk full = multiple issues4284. **Check ratios**: Usage percentages are more meaningful than absolute values4295. **Validate findings**: Cross-reference with log analysis for confirmation4306. **Consider capacity**: Does the system have enough CPU, memory, and disk for its workload?431432## Common Resource Patterns4334341. **Memory leak**: Steadily increasing memory usage, eventual OOM4352. **Disk full**: Application writes failing, log rotation issues4363. **CPU spike**: Load average spike, potentially from runaway process4374. **I/O bottleneck**: High load but low CPU usage, many D-state processes4385. **Swap thrashing**: High swap usage, poor performance4396. **Zombie accumulation**: Parent process bug not reaping children440441## Severity Classification442443| Metric | OK | Warning | Critical |444|--------|----|---------| ---------|445| Memory Usage | < 80% | 80-90% | > 90% |446| Swap Usage | < 20% | 20-50% | > 50% |447| Disk Usage | < 85% | 85-95% | > 95% |448| Load (per CPU) | < 1.0 | 1.0-2.0 | > 2.0 |449| Root FS Usage | < 80% | 80-90% | > 90% |450451## See Also452453- Logs Analysis Skill: For finding resource-related errors in logs454- System Configuration Analysis Skill: For investigating service resource limits455- Network Analysis Skill: For network-related performance issues