Skip to content

MSWEIMZ/server-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✈️ Server Pilot

One-command server control for Codex

SSH execution · GPU monitoring · Training tracker · File transfer

English | 中文


✨ Features

Feature Description
🖥️ SSH Commands Execute any command on your remote server
📊 GPU Monitor Real-time temperature, power, memory & utilization
🏋️ Training Tracker Auto-detect training processes with elapsed time & GPU memory
💻 System Overview CPU, memory, disk, load at a glance
📁 File Transfer Upload & download files via SFTP
🔄 Watch Mode Continuous monitoring with auto-refresh
📋 JSON Output Machine-readable output for scripts & automation

📸 Demo

============================================================
  Server Status Report
============================================================

📊 GPU:
  🔥 GPU 0: NVIDIA vGPU-32GB
     Temp: 56°C  |  Power: 258W / 320W
     Util: 100%  |  VRAM: [███████████████████░] 95% 31180/32760 MB

🏋️ Training:
  PID 177850  |  Elapsed: 05:14:49  |  CPU: 108%  |  VRAM: 3976 MB
     python train_efficientnet_m.py --mode full_voting
  PID 189739  |  Elapsed: 04:04     |  CPU: 90%   |  VRAM: 27188 MB
     python train_r2plus1d_l4_3d_improved.py --num_classes 16 ...

💻 System:
  23:56:53 up 210 days, load average: 5.77, 6.10, 5.31
  Mem: 755Gi total, 41Gi used, 53Gi free

============================================================

🚀 Quick Start

1. Install

git clone https://github.com/MSWEIMZ/server-pilot.git ~/.codex/skills/my-server-ssh

2. Configure

cp ~/.codex/skills/my-server-ssh/scripts/server_config.example.json \
   ~/.codex/skills/my-server-ssh/scripts/server_config.json

Edit server_config.json with your server info:

{
  "host": "your-server.com",
  "port": 22,
  "username": "root",
  "password": "your-password"
}

3. Use

Just talk to Codex naturally:

🗣️ "Check my server status"

🗣️ "How's the GPU doing?"

🗣️ "Is my training still running?"

Or run from terminal:

python scripts/server_monitor.py              # Full report
python scripts/server_monitor.py --gpu        # GPU only
python scripts/server_monitor.py --train      # Training only
python scripts/server_monitor.py --json       # JSON output
python scripts/server_monitor.py --watch      # Continuous (30s)
python scripts/server_monitor.py --watch --interval 60

🛠️ Remote Commands

python scripts/ssh_exec.py "nvidia-smi"
python scripts/ssh_exec.py --json "df -h"
python scripts/ssh_exec.py --upload ./model.pt /root/autodl-tmp/
python scripts/ssh_exec.py --download /root/logs/train.log ./train.log

📦 Requirements

  • Python 3.8+
  • paramiko — install explicitly in the active environment: python -m pip install paramiko
  • Codex (optional) — works standalone too

📁 Structure

server-pilot/
├── SKILL.md                          # Codex skill descriptor
├── README.md                         # English docs
├── README_CN.md                      # 中文文档
├── .gitignore
├── agents/
│   └── openai.yaml                   # Codex UI metadata
└── scripts/
    ├── ssh_exec.py                   # SSH command executor (upload/download/run)
    ├── server_monitor.py             # GPU & training monitor
    ├── task_mgr.py                   # Background task manager (tmux/screen/nohup)
    ├── file_ops.py                   # File ops: cat, ls, edit, search, sync, big-upload
    ├── server_config.json            # Your config (git-ignored)
    ├── server_config.example.json    # Example config
    └── web/
        ├── dashboard.py              # Web dashboard backend
        └── dashboard.html            # Dashboard frontend (SVG gauges, i18n, themes)

🔐 Secure use

  • The canonical source and configuration directory on this machine is C:\Users\WEI\server-pilot; tool installations should link to it.
  • Set host_key_policy globally or per server: relaxed is the default (auto-accept, matching the former personal-use flow); accept-new saves the first key and rejects later changes; strict accepts only keys registered in the system store or scripts/known_hosts.
  • The dashboard listens on 127.0.0.1 by default. A LAN bind requires explicit --bind 0.0.0.0 --allow-remote --token "long-random-token".
  • Run powershell -ExecutionPolicy Bypass -File scripts\migrate_local_installations.ps1 for a dry run, then add -Apply to back up legacy directories/configurations and create Junctions.

🤝 Contributing

Issues and PRs welcome!

  • Multi-server support
  • Training loss/accuracy log parsing
  • Web dashboard with real-time GPU gauges, training tracker, and system overview
  • Background task manager (tmux/screen/nohup)
  • File operations with large file resume upload/download
  • Slack / DingTalk alert on GPU overheat
  • One-click server setup (auto-install dependencies)

📄 License

MIT

About

One-command server control: SSH execution, GPU monitoring & training tracker for Codex

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors