360 Secure SkillHub
360 安全技能中心
当前公开展示的是 System Monitor。本作品已批准的版本仍可按原地址安装和更新。

System Monitor

通过 Python 脚本 monitor.py 提供系统指标监控:--status 查看即时状态,--watch 持续监测,可分别查看 CPU、内存、磁盘、网络与进程信息,支持 --alert 阈值告警和 --json 结构化输出。SKILL.md 仅给出命令行用法示例,未说明告警通知渠道与内部实现细节。

dinghaibin
dinghaibin
热度 0.00
最近更新 2026-05-11 17:47:26
分类:自动化依赖:代码执行应用场景:DevOps / 自动化脚本 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add dinghaibin-system-monitor
Metadata
name
system-monitor
description
Monitor system metrics like CPU, memory, disk, and network. Use when user needs to track server performance, set up alerts for high resource usage, monitor uptime, check process status, or create system health reports.

System Monitor

Monitor system metrics like CPU, memory, disk, and network.

Quick Start

# Check current status
python scripts/monitor.py --status

# Monitor continuously
python scripts/monitor.py --watch

Usage

python scripts/monitor.py [OPTIONS]

Options:
  --status        Show current system status
  --watch         Monitor continuously
  --interval SECS Check interval (default: 5)
  --cpu           Show CPU usage
  --memory        Show memory usage
  --disk          Show disk usage
  --network       Show network stats
  --processes     Show top processes
  --alert VALUE   Alert threshold (e.g., cpu:90)
  --json          Output as JSON

Examples

# Quick status check
python scripts/monitor.py --status

# Watch mode
python scripts/monitor.py --watch --interval 10

# Alert on high CPU
python scripts/monitor.py --watch --alert cpu:90

# Alert on low disk
python scripts/monitor.py --watch --alert disk:90

# JSON output for dashboards
python scripts/monitor.py --status --json

Alert Examples

# CPU above 90%
python scripts/monitor.py --watch --alert cpu:90

# Memory above 80%
python scripts/monitor.py --watch --alert memory:80

# Disk above 85%
python scripts/monitor.py --watch --alert disk:85

Metrics

  • CPU usage per core
  • Memory usage (used/free/total)
  • Disk usage per partition
  • Network I/O
  • Top processes by CPU/memory
  • Uptime