Crates.io | nvline |
lib.rs | nvline |
version | 0.1.0 |
source | src |
created_at | 2024-06-22 14:16:56.11448 |
updated_at | 2024-06-22 14:16:56.11448 |
description | A simple command line tool to record your gpu usage |
homepage | |
repository | https://github.com/drbh/nvline |
max_upload_size | |
id | 1280485 |
size | 33,332 |
your nvidia gpu usage timeline.
cargo install nvline
nvidia-smi
output to a filethe following command will record 100
lines of nvidia-smi
output every 1000
milliseconds to log1.jsonl
.
nvline --max-lines 100 --interval 1000 --file-path log1.jsonl
# 2024-06-21T04:20:58.576466Z INFO nvline: name=NVIDIA A10G device=0 used=4 percent=4/23028 (0.02%)
# 2024-06-21T04:20:59.635555Z INFO nvline: name=NVIDIA A10G device=0 used=4 percent=4/23028 (0.02%)
# 2024-06-21T04:21:00.691742Z INFO nvline: name=NVIDIA A10G device=0 used=4 percent=4/23028 (0.02%)
# 2024-06-21T04:21:01.751656Z INFO nvline: name=NVIDIA A10G device=0 used=4 percent=4/23028 (0.02%)
logfile looks like
{"driver_version":"545.23.08","index":0,"memory_free":22508,"memory_total":23028,"memory_used":4,"name":"NVIDIA A10G","temperature_gpu":30,"timestamp":1718943658}
{"driver_version":"545.23.08","index":0,"memory_free":22508,"memory_total":23028,"memory_used":4,"name":"NVIDIA A10G","temperature_gpu":30,"timestamp":1718943659}
{"driver_version":"545.23.08","index":0,"memory_free":22508,"memory_total":23028,"memory_used":4,"name":"NVIDIA A10G","temperature_gpu":30,"timestamp":1718943660}
{"driver_version":"545.23.08","index":0,"memory_free":22508,"memory_total":23028,"memory_used":4,"name":"NVIDIA A10G","temperature_gpu":30,"timestamp":1718943661}
nvline --help`
Usage: nvline [OPTIONS]
Options:
-m, --max-lines <MAX_LINES> Maximum number of lines to keep in the log file [default: 100]
-i, --interval <INTERVAL> Interval between log entries in milliseconds [default: 1000]
-f, --file-path <FILE_PATH> Path to the log file [default: gpu_log.jsonl]
-h, --help Print help
-V, --version Print version