Skip to main content

CLI tool to query GPU status remotely (based on nvidia-smi)

Project description

nvidia-smi-remote

pypi license

A CLI tool to display remote GPU status via SSH with colorful terminal output – showing GPU temperature, utilization, memory usage, and per-user process memory details. It’s like a remote version of nvidia-smi with enhanced readability!

This project is inspired by gpustat.

Quick Installation

Install from PyPI:

pip install nvidia-smi-remote

If you don’t have root privileges, try installing it in your user namespace:

pip install --user nvidia-smi-remote

To install the latest version from the master branch:

pip install git+https://github.com/ive2go/nvidia-smi-remote.git@master

NVIDIA Driver, nvidia-smi, and Python Requirements

  • NVIDIA Requirement: This tool requires NVIDIA GPUs and the nvidia-smi utility to be installed on the target systems.
  • Python Version: Python 3.8 or higher is recommended.
  • Dependencies:
    • paramiko – For SSH connectivity.
    • blessed – For terminal styling.
    • The nvidia-smi command (bundled with the NVIDIA driver installation).

Usage

nvidia-smi-remote is designed to query GPU information from remote servers via SSH. You can supply the remote server configuration either via a JSON configuration file or by setting the environment variable NVIDIA_SMI_REMOTE_CONFIG.

Basic Usage with Configuration File:

nvidia-smi-remote -r config.json

Basic Usage with Environment Variable:

export NVIDIA_SMI_REMOTE_CONFIG=/path/to/config.json
nvidia-smi-remote

Command-line Options:

  • -r, --remote-config : Path to the remote GPU server configuration JSON file (expects a list of server definitions).
  • -i, --interval : Update interval in seconds (watch mode). Set to 0 for a single output.
  • --no-header : Do not display the header (host, driver version, and time).
  • --no-color : Disable colored terminal output.
  • --used-only : Display only GPUs that have running processes.
  • --unused-only : Display only GPUs without any running processes.

Remote Configuration JSON Example:

[
  {
    "host": "remote.server.com",
    "port": 22,
    "username": "user",
    "password": "password"
  },
  {
    "host": "another.server.com",
    "username": "user",
    "key_filename": "/path/to/private/key"
  }
]

Default Display Example:

remote.server.com  2025-04-03 12:34:56  450.80.02
[0] GeForce RTX 3080   | 65°C,  50 % | 4000/10000 MB | user (1500MiB)
--------------------------------------------------------------------------------
  • Header: Displays the hostname, current timestamp, and driver version.
  • GPU Line: Shows GPU index, name, temperature, utilization, memory usage, and the aggregated memory usage per user.

Changelog

See CHANGELOG.md for a complete list of changes.

License

MIT License

Contact

For questions or suggestions, please contact the author at ive2go@naver.com.

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

nvidia_smi_remote-0.1.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

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

nvidia_smi_remote-0.1.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file nvidia_smi_remote-0.1.2.tar.gz.

File metadata

  • Download URL: nvidia_smi_remote-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.20

File hashes

Hashes for nvidia_smi_remote-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e3372f0d8766b8fcdf0f0d46bcd5b2ef8bb864498bb64bbe74aedfbed633b1ff
MD5 9b369fb8113bd2448e466676449d27d3
BLAKE2b-256 19ca5ec483ec05d2873263e174278f8eea1609577b32477bfe7556d437c35132

See more details on using hashes here.

File details

Details for the file nvidia_smi_remote-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for nvidia_smi_remote-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a0b9d470e93f43c1613a9fd3f5cf2fe73a5ce344c0d84075f442aba4f1dcdd5b
MD5 a8fb7792ef34f9c08f8917d110164142
BLAKE2b-256 f5fd9861af194f4d1a42ba4b17a6211980cef4db18bab4e1c8a6294b6c636303

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