One-command server control for Codex
SSH execution · GPU monitoring · Training tracker · File transfer
| 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 |
============================================================
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
============================================================
git clone https://github.com/MSWEIMZ/server-pilot.git ~/.codex/skills/my-server-sshcp ~/.codex/skills/my-server-ssh/scripts/server_config.example.json \
~/.codex/skills/my-server-ssh/scripts/server_config.jsonEdit server_config.json with your server info:
{
"host": "your-server.com",
"port": 22,
"username": "root",
"password": "your-password"
}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 60python 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- Python 3.8+
- paramiko — install explicitly in the active environment:
python -m pip install paramiko - Codex (optional) — works standalone too
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)
- The canonical source and configuration directory on this machine is
C:\Users\WEI\server-pilot; tool installations should link to it. - Set
host_key_policyglobally or per server:relaxedis the default (auto-accept, matching the former personal-use flow);accept-newsaves the first key and rejects later changes;strictaccepts only keys registered in the system store orscripts/known_hosts. - The dashboard listens on
127.0.0.1by 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.ps1for a dry run, then add-Applyto back up legacy directories/configurations and create Junctions.
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)
MIT