Skip to main content

Monitor GPUs on every SSH host defined in ~/.ssh/config.

Project description

Remo-GPU

Remo-GPU 是一个面向多主机的 GPU 监控工具:自动解析 ~/.ssh/config,通过 SSH 并发执行 nvidia-smi(或自定义命令),并以 Textual 卡片、Rich 表格、纯文本等方式展示指标。


🚀 Quick Start

# 临时运行(自动隔离环境)
uvx remo-gpu

# 或安装后使用
pip install remo-gpu
remo-gpu --interval 3

默认 UI 为 Textual;确保本地 ssh 可用、远程主机安装 nvidia-smi


✨ Features

  • 解析 ~/.ssh/config 及其 Include 指令,自动收集 Host 别名
  • 并发 SSH 查询(默认最多 8 台),实时展示 GPU 利用率/显存/温度
  • Textual 卡片式界面(默认)支持滚动、刷新 (r)、退出 (q)
  • Rich 彩色表格与纯文本模式可任选
  • 启动时探测不可连接主机,单独列出并跳过后续刷新
  • 自定义刷新间隔、SSH 参数、远程命令 (--remote-command)

🧭 Requirements

  1. Python ≥ 3.9
  2. 本机 ssh 可用,远程机器可免密登录
  3. 远程安装 nvidia-smi(或自定义命令)

⚙️ Common Options

python -m remo_gpu \
  --interval 3 \
  --timeout 8 \
  --hosts gpu-a gpu-b \
  --identity-file ~/.ssh/id_rsa \
  --ssh-option "-o StrictHostKeyChecking=no" \
  --ssh-option "-o UserKnownHostsFile=/dev/null"
  • --ui {textual,rich,plain}:切换 UI;默认 textual
  • --interval / --timeout:刷新间隔 / SSH 超时
  • --interval-once:只输出一次
  • --no-clear:纯文本模式禁用清屏
  • --remote-command:替换 nvidia-smi

🖥 UI Modes

# Textual(默认,可滚动卡片)
remo-gpu --interval 2

# Plain 纯文本
remo-gpu --ui plain --interval 2 --no-clear

🔧 Bash Version

若只需最小依赖,可直接运行 remo_gpu.sh

bash remo_gpu.sh \
  --interval 3 \
  --hosts gpu-a,gpu-b \
  --ssh-option StrictHostKeyChecking=no \
  --ssh-option UserKnownHostsFile=/dev/null
  • --ssh-option 会被转换为 ssh -o key=value
  • --once 仅输出一次结果
  • 兼容 macOS 自带 bash 3.2(如需关联数组请安装新版 bash)

💡 Tips

  • .ssh/config 中的 Host * 会被忽略,请为实际机器使用具体别名
  • 首次连接提示指纹时,可临时加 --ssh-option "-o StrictHostKeyChecking=no"
  • 调高刷新频率(更小 --interval)或增大 --concurrency 时注意远程负载

🤝 Contributing

欢迎提交 PR/Issue:可以扩展输出格式、增加 Prometheus 上报、或结合 watch / tmux / nvitop 等工具打造自定义面板。如果该项目对你有帮助,欢迎 Star ⭐️ 支持。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remo_gpu-0.1.3.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

remo_gpu-0.1.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file remo_gpu-0.1.3.tar.gz.

File metadata

  • Download URL: remo_gpu-0.1.3.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for remo_gpu-0.1.3.tar.gz
Algorithm Hash digest
SHA256 665e5f6ecbf73c14c3d0a8a5e3417d77fa8f52c01ff8dc27ad30c34c9cb28f0f
MD5 f602cba02408b2cf3259b3100ac7da88
BLAKE2b-256 9e9db27f82a7df023ed8ffe5e9f6f468085a7e25c53d38477126182ae92c8376

See more details on using hashes here.

File details

Details for the file remo_gpu-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: remo_gpu-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for remo_gpu-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc2c9ef84547a7272ac0ef0187763ff0d91898180d80f407bf2b3f1bb9d7ce1c
MD5 d7edcd8fdc2317962a2a5a6517144639
BLAKE2b-256 9bc1867ff7e0e2ab94951b7648755fcdd122c89fad06e81f19db9b590a4112a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page