← 返回
未分类 中文

Process Monitor Dashboard

Monitor system processes, resource usage, and performance metrics with real-time terminal dashboard.
使用实时终端仪表板监控系统进程、资源使用和性能指标
derick001
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 427
下载
💾 1
安装
1
版本
#latest

概述

Process Monitor Dashboard

What This Does

A real-time terminal dashboard for monitoring system processes and resource usage. Provides a live, updating view of CPU, memory, disk, network, and running processes—all within your terminal.

Key features:

  • Real-time CPU monitoring - Overall usage + per‑core breakdown
  • Memory dashboard - RAM usage, swap, detailed memory stats
  • Disk I/O & usage - Read/write rates, free space per filesystem
  • Network activity - Upload/download speeds, connections
  • Process list - Top processes by CPU/memory, with sorting options
  • Refresh control - Adjustable update interval (1–10 seconds)
  • Color‑coded alerts - Highlight high resource usage
  • Lightweight - Minimal overhead, runs in background

How To Use

Start the dashboard:

./scripts/main.py dashboard

Monitor with custom interval (3 seconds):

./scripts/main.py dashboard --interval 3

Get a single snapshot (no continuous updates):

./scripts/main.py snapshot

List top N processes by CPU:

./scripts/main.py top --by cpu --limit 10

List top N processes by memory:

./scripts/main.py top --by memory --limit 10

Monitor a specific process by PID:

./scripts/main.py monitor --pid 1234

Full command reference:

./scripts/main.py help

Commands

  • dashboard: Start interactive real‑time dashboard
  • --interval: Refresh interval in seconds (default: 2)
  • --simple: Simplified view (no per‑core/disk details)
  • --log: Also write metrics to a log file
  • snapshot: Print a one‑time system snapshot
  • --json: Output as JSON for scripting
  • top: Show top processes
  • --by: Sort by cpu, memory, disk, name (default: cpu)
  • --limit: Number of processes to show (default: 10)
  • --user: Filter by username
  • --json: Output as JSON
  • monitor: Monitor a specific process
  • --pid: Process ID to monitor (required)
  • --interval: Refresh interval (default: 2)
  • --watch: Watch for process creation/termination
  • stats: Show system‑wide statistics
  • --cpu: CPU details only
  • --memory: Memory details only
  • --disk: Disk details only
  • --network: Network details only
  • --json: Output as JSON
  • alert: Check for resource alerts
  • --threshold-cpu: CPU alert threshold % (default: 90)
  • --threshold-memory: Memory alert threshold % (default: 85)
  • --threshold-disk: Disk alert threshold % (default: 90)

Output Examples

Dashboard view (sample):

─────────────────────────────────────────────────────
 System Monitor | Refresh: 2s | 2026‑03‑16 10:30:00 UTC
─────────────────────────────────────────────────────
CPU:  ███████░░░ 72%   Memory:  █████████░ 92% (8.2/12 GB)
Core 0: 65%  Core 1: 78%  Core 2: 70%  Core 3: 75%

Top Processes (by CPU):
   PID USER     CPU% MEM% COMMAND
  1234 alice    45.2 12.3 python3 /app/server.py
  5678 bob      22.1  5.8 /usr/bin/node index.js
  9101 root     10.5  0.3 systemd-journal

Disk: /  █████░░░░ 52% free   Network: ▲ 1.2 MB/s ▼ 4.5 MB/s
─────────────────────────────────────────────────────

JSON snapshot (via --json):

{
  "timestamp": "2026-03-16T10:30:00Z",
  "cpu": {
    "total_percent": 72.5,
    "per_core": [65.2, 78.1, 70.3, 75.0],
    "load_average": [1.2, 1.5, 1.8]
  },
  "memory": {
    "total_gb": 12.0,
    "used_gb": 8.2,
    "percent": 68.3,
    "swap_used_gb": 0.5
  },
  "processes": [
    {"pid": 1234, "name": "python3", "cpu_percent": 45.2, "memory_percent": 12.3}
  ]
}

Installation Notes

Requires Python 3.6+ and psutil library. Install with:

pip install psutil

On most systems, psutil is available via package managers:

# Debian/Ubuntu
sudo apt install python3-psutil

# RHEL/CentOS
sudo yum install python3-psutil

# macOS
brew install psutil

Limitations

  • Terminal size - Dashboard optimized for terminals ≥ 80 columns
  • Refresh rate - Very fast intervals (<1s) may cause high CPU
  • Platform support - Best on Linux/macOS; Windows support limited
  • Process details - Some process information may require root
  • Historical data - No built‑in long‑term trending (single‑session only)
  • No remote monitoring - Only monitors the local system
  • No alert actions - Only displays warnings, doesn’t auto‑resolve issues

Security Considerations

  • Only reads system metrics (no writes or modifications)
  • Doesn’t require root/sudo for basic operation
  • No network listening or external connections
  • All data stays local; no telemetry
  • Process listing may reveal running applications (same as ps/top)

Examples

Basic dashboard (2‑second updates):

./scripts/main.py dashboard

Lightweight dashboard (simple view, 3‑second updates):

./scripts/main.py dashboard --simple --interval 3

Get a JSON snapshot for scripting:

./scripts/main.py snapshot --json > system.json

Find top 5 memory‑hungry processes:

./scripts/main.py top --by memory --limit 5

Monitor a specific web server:

./scripts/main.py monitor --pid $(pgrep -f "nginx") --interval 5

Check for resource alerts:

./scripts/main.py alert --threshold-cpu 95 --threshold-memory 90

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 19:12 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

API Endpoint Tester

derick001
支持多种HTTP方法、请求头和载荷的REST API端点测试CLI工具。
★ 1 📥 785
communication-collaboration

Multi-Chat Context Manager

derick001
用于按频道/用户存储和检索会话上下文的CLI工具。
★ 0 📥 836
content-creation

Docker Container Cleaner

derick001
CLI 工具,清理已停止的 Docker 容器、未使用的镜像、卷和网络,释放磁盘空间。
★ 0 📥 782