| name | system-monitor |
| description | Real-time system metrics monitoring (CPU, memory, disk, network, processes). Use when: user asks to check system status, cpu usage, memory usage, disk space, network traffic, running processes, or system performance. Supports macOS and Linux. Tools: top, htop, df, iostat, vm_stat, host, free, lsof, uptime. |
| metadata | {"openclaw":{"emoji":"📊","requires":{"bins":"[Truncated]"}}} |
System Monitor Skill
Monitor real-time system metrics including CPU, memory, disk, network, and processes.
When to Use
✅ USE this skill when:
- "Check system status"
- "CPU usage" / "How's the CPU doing?"
- "Memory usage" / "RAM usage"
- "Disk space" / "How much storage left?"
- "Network traffic" / "Network usage"
- "Running processes" / "Top processes"
- "System performance" / "System load"
Setup
Some tools may need installation via Homebrew:
brew install htop
brew install nettop
brew install iostat
Platform Detection
Detect the platform to use appropriate commands:
uname -s
CPU Usage
macOS
top -l 1 -n 0 | grep "CPU usage"
top -l 2 -n 0 | tail -1
vm_stat | head -5
Linux
top -bn1 | head -5
mpstat -P ALL 1 1
uptime
One-liner (cross-platform friendly)
top -l 1 -n 0 -s 0 | awk '/CPU usage/ {print}'
top -bn1 | grep "Cpu(s)"
JSON-friendly (scripting)
top -l 1 -n 0 -s 0 -stats pid,pcpu,pmem,comm
Memory Usage
macOS
vm_stat
top -l 1 -n 0 | grep "PhysMem"
hostinfo | grep "memory"
Linux
free -h
free -m
swapon -s
Memory Calculation (macOS)
vm_stat | awk '/Pages active/ {active=$3} /Pages wired/ {wired=$3} /Pages free/ {free=$3} END {print "Active: " active " Wired: " wired " Free: " free}'
Disk Space
macOS & Linux
df -h
df -h /
df -h /
df -i
df -h | sort -k5 -h
df -h -t local
Disk Usage (directory-level)
du -sh .
du -h --max-depth=1
du -h --max-depth=1 | sort -h
Network Statistics
macOS
ifconfig -a
lsof -i -n | head -20
lsof -i -n | grep LISTEN
nettop -P -L 1 -J bytes_in,bytes_out
Linux
ip -s link
ss -s
ss -tunap
Process List
macOS
top -o cpu -l 1 -n 15
top -o mem -l 1 -n 15
ps aux
ps -U $(whoami)
Linux
top -bn1 | head -12
top -bo %MEM -bn1 | head -12
pstree
ps -U $(whoami) --sort=-%mem
System Load
macOS
uptime
hostinfo | grep "load"
Linux
uptime
cat /proc/loadavg
Combined System Status
Quick Health Check
echo "=== CPU ===" && top -l 1 -n 0 | grep "CPU usage"
echo "=== Memory ===" && top -l 1 -n 0 | grep "PhysMem"
echo "=== Disk ===" && df -h / | tail -1
echo "=== CPU ===" && top -bn1 | head -5
echo "=== Memory ===" && free -h
echo "=== Disk ===" && df -h /
echo "=== Load ===" && uptime
Bundled Scripts
system-stats.sh
A combined system stats script for quick health checks:
#!/bin/bash
PLATFORM=$(uname -s)
echo "=== System Stats ==="
echo "Time: $(date)"
echo "Platform: $PLATFORM"
echo ""
if [ "$PLATFORM" = "Darwin" ]; then
echo "--- CPU ---"
top -l 1 -n 0 -s 0 | grep "CPU usage"
echo ""
echo "--- Memory ---"
top -l 1 -n 0 | grep "PhysMem"
vm_stat | head -5
echo ""
echo "--- Disk ---"
df -h / | tail -1
echo ""
echo "--- Load Average ---"
uptime
else
echo "--- CPU ---"
top -bn1 | head -5
echo ""
echo "--- Memory ---"
free -h
echo ""
echo "--- Disk ---"
df -h / | tail -1
Notes
- macOS uses
vm_stat for memory, Linux uses free
top output format differs between platforms
- Use
hostinfo on macOS for system overview
- Use
lsof or nettop instead of deprecated netstat
- For continuous monitoring, use
watch command or run top in loop