Files
claude-code/skills/sysadmin-health/scripts/health-check.sh
OpenCode Test d9be8145f8 Refactor remaining skills with resources pattern and allowed-tools
- k8s-quick-status: Add scripts/quick-status.sh, allowed-tools
- sysadmin-health: Add scripts/health-check.sh, allowed-tools
- usage: Add scripts/usage_report.py, simplify SKILL.md
- programmer-add-project: Add allowed-tools

All skills now:
- Have executable scripts for main operations
- Use allowed-tools to restrict capabilities
- Have improved descriptions with trigger phrases
- Follow the "Skill with Bundled Resources" pattern

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 02:38:58 -08:00

46 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# Comprehensive Arch Linux health check
# Returns structured output for easy parsing
set -euo pipefail
echo "=== System Resources ==="
echo "--- Disk Usage ---"
df -h / /home 2>/dev/null || df -h
echo ""
echo "--- Memory ---"
free -h
echo ""
echo "--- Load ---"
uptime
echo ""
echo "=== Package Status ==="
echo "--- Pending Updates ---"
checkupdates 2>/dev/null | wc -l | xargs echo "Pacman updates:"
yay -Qua 2>/dev/null | wc -l | xargs echo "AUR updates:" || echo "AUR updates: N/A"
echo ""
echo "--- Orphaned Packages ---"
pacman -Qtdq 2>/dev/null | wc -l | xargs echo "Orphans:" || echo "Orphans: 0"
echo ""
echo "=== Service Status ==="
echo "--- Failed Services ---"
systemctl --failed --no-pager 2>/dev/null || echo "No failed services"
echo ""
echo "--- Failed User Services ---"
systemctl --user --failed --no-pager 2>/dev/null || echo "No failed user services"
echo ""
echo "=== Recent Errors ==="
journalctl -p err --since "24 hours ago" -n 10 --no-pager 2>/dev/null || echo "No recent errors"
echo ""
echo "=== Security ==="
echo "--- Recent Logins ---"
last -n 5 2>/dev/null || echo "No login history"