Skip to content

BDHU/gpuinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpuinfo

Crates.io version license dependency status CI

A small command-line tool used to query and monitor GPU status.

gpuinfo-screenshot

NOTE: We only support NVIDIA GPUs currently. All contributions are welcome! This is an ongoing project and there might be changes in the future. The tool is tested on Linux. It might also work on macOS and Windows with some features missing.

Usage

$ gpu-info

Common options:

  • -w, --watch: Prints GPU information to terminal every second
  • -i, --interval <seconds>: Prints GPU information to terminal at the given interval
  • -f, --format <text|json|csv>: Output format (default: text)
  • --no-color: Disable ANSI colors in text output
  • --no-header: Disable CSV header row
  • -g, --gpu <index>: Select a specific GPU by index
  • -v, --verbose: Verbose output (text)
  • -q, --quiet: Minimal output (text)

Examples:

# Watch with default text output
gpu-info --watch

# Output JSON for tooling
gpu-info --format json

# Output CSV without a header (useful for appending)
gpu-info --format csv --no-header

Installation

The crate is publicly available at crates.io:

cargo install gpuinfo

Output

Text output (default):

[0] RTX 4090 | SM8.9 | 12% | 2048/24576MB | 45C | Fan:30% | 120/450W | 2100MHz/10500MHz | Gen4x16 | python:512MB

  • [0]: GPU index
  • RTX 4090: GPU name
  • SM8.9: Compute capability
  • 12%: GPU utilization
  • 2048/24576MB: Memory used/total
  • 45C: Temperature
  • Fan:30%: Fan speed (if available)
  • 120/450W: Power usage/limit (if available)
  • 2100MHz/10500MHz: Graphics/memory clocks (if available)
  • Gen4x16: PCIe link info (if available)
  • python:512MB: Running processes and their GPU memory use

CSV output (with header by default):

index,name,uuid,gpu_util%,mem_util%,mem_used_mb,mem_total_mb,temp_c,power_w,power_limit_w,clock_graphics_mhz,clock_memory_mhz,fan%,pcie_gen,pcie_width,process_count

License

MIT License

About

A minimal command-line utility written in Rust for querying GPU status

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages