Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdhu/gpuinfo
A minimal command-line utility written in Rust for querying GPU status
https://github.com/bdhu/gpuinfo
command-line-tool cuda gpu nvidia nvidia-smi nvml rust rust-lang
Last synced: about 2 months ago
JSON representation
A minimal command-line utility written in Rust for querying GPU status
- Host: GitHub
- URL: https://github.com/bdhu/gpuinfo
- Owner: BDHU
- License: mit
- Created: 2021-05-30T03:49:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-06T04:01:16.000Z (over 3 years ago)
- Last Synced: 2024-10-10T19:20:44.053Z (2 months ago)
- Topics: command-line-tool, cuda, gpu, nvidia, nvidia-smi, nvml, rust, rust-lang
- Language: Rust
- Homepage: https://crates.io/crates/gpuinfo
- Size: 88.9 KB
- Stars: 18
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gpuinfo
[![Crates.io version](https://img.shields.io/crates/v/gpuinfo.svg?style=flat-square)](https://crates.io/crates/gpuinfo)
[![license](https://img.shields.io/github/license/BDHU/gpuinfo.svg?maxAge=86400)](LICENSE)
[![dependency status](https://deps.rs/repo/github/BDHU/gpuinfo/status.svg)](https://deps.rs/repo/github/BDHU/gpuinfo)
![CI](https://github.com/BDHU/gpuinfo/actions/workflows/github-action.yml/badge.svg)A small command-line tool used to query and monitor GPU status.
![gpuinfo-screenshot](gpuinfo.png)
NOTE: We only support NVIDIA GPU currently, AMD GPU is not yet supported. 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
-----```bash
$ gpu-info
```Options:
* `-w`, `--watch`: Prints GPU information to terminal every second
* `-i`, `--interval `: Prints GPU information to terminal according to given interval (integer seconds)NOTE: more options are to be added.
Installation
------------The crate is publicly available at [crates.io](https://crates.io/crates/gpuinfo):
```bash
cargo install gpuinfo
```Output
------> [0]: Tesla P100-SXM2-16GB | 60 | 0 % | 1544 / 16280 MB | 37°C | No running processes found
* `[0]`: PCI_BUS_ID of the GPU. Beware that CUDA might assign different device ID. Ensure `CUDA_DEVICE_ORDER` is assigned `PCI_BUS_ID` will guarantee both `gpu-info` and CUDA yield the same result
* `Tesla P100-SXM2-16GB`: Name of the GPU
* `60`: Major and minor number of the GPU
* `0 %`: Current GPU utilization rate
* `1544 / 16280 MB`: GPU device memory usage
* `37°C`: GPU temperature
* `No running processes found`: Currently running processes on the GPU (note: only processes the user have privilege to access are shown).License
-------[MIT License](LICENSE)