From 8915eef0734fcb4f5f41df563f15bd35928a8534 Mon Sep 17 00:00:00 2001 From: zlei9 Date: Sun, 29 Mar 2026 13:15:01 +0800 Subject: [PATCH] Initial commit with translated description --- SKILL.md | 20 ++++++++++++++++++++ _meta.json | 6 ++++++ package.json | 7 +++++++ scripts/monitor.sh | 25 +++++++++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 SKILL.md create mode 100644 _meta.json create mode 100644 package.json create mode 100644 scripts/monitor.sh diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..1a7f9e6 --- /dev/null +++ b/SKILL.md @@ -0,0 +1,20 @@ +--- +name: system_resource_monitor +description: "用于CPU负载、RAM、交换和磁盘使用的干净可靠的系统资源监视器。" +version: 1.0.0 +author: Yennefer & Geralt +--- + +# System Resource Monitor + +A specialized skill designed to provide concise, real-time server health reports. Unlike bloated alternatives, it uses native system calls for maximum reliability and speed. + +## Features +- **CPU Load**: Displays 1, 5, and 15-minute averages. +- **Memory**: Tracks both physical RAM and Swap usage. +- **Disk**: Monitors root partition capacity and percentage. +- **Uptime**: Shows how long your "horse" has been running. + +## Usage +Simply ask the agent for "system status", "resource usage", or "server health". +The skill executes the local `./scripts/monitor.sh` script. diff --git a/_meta.json b/_meta.json new file mode 100644 index 0000000..775ed9a --- /dev/null +++ b/_meta.json @@ -0,0 +1,6 @@ +{ + "ownerId": "kn7djtky87zsphjfss7j8b6cb18103c4", + "slug": "system-resource-monitor", + "version": "1.0.0", + "publishedAt": 1770880998112 +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..c90433c --- /dev/null +++ b/package.json @@ -0,0 +1,7 @@ +{ + "name": "system-resource-monitor", + "version": "1.0.0", + "description": "A clean, reliable system resource monitor for CPU load, RAM, Swap, and Disk usage.", + "main": "SKILL.md", + "author": "Yennefer & Geralt" +} diff --git a/scripts/monitor.sh b/scripts/monitor.sh new file mode 100644 index 0000000..59de539 --- /dev/null +++ b/scripts/monitor.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# System Resource Monitor Script v1.0.0 + +# Colors for better readability if supported +printf "\n\033[1;34m--- System Resource Report ---\033[0m\n" + +# Uptime +UPTIME=$(uptime -p) +printf "\033[1;32mUptime:\033[0m %s\n" "$UPTIME" + +# Load Average +LOAD=$(uptime | awk -F'load average:' '{ print $2 }' | sed 's/^ //') +printf "\033[1;32mSystem Load:\033[0m %s\n" "$LOAD" + +# RAM & Swap +MEM=$(free -h | awk '/^Mem:/ {print $3 " / " $2}') +SWAP=$(free -h | awk '/^Swap:/ {print $3 " / " $2}') +printf "\033[1;32mMemory Usage:\033[0m %s\n" "$MEM" +printf "\033[1;32mSwap Usage:\033[0m %s\n" "$SWAP" + +# Disk Usage +DISK=$(df -h / | awk 'NR==2 {print $3 " / " $2 " (" $5 ")"}') +printf "\033[1;32mDisk Usage:\033[0m %s\n" "$DISK" + +printf "\033[1;34m------------------------------\033[0m\n\n"