Last active
December 6, 2024 19:19
-
-
Save davidrios/ac77f8e680909e3c825c7f397013041f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
type=$1 | |
case "$type" in | |
temp) | |
nvidia-smi --query-gpu temperature.gpu --format=csv,noheader,nounits | |
;; | |
core-clock) | |
nvidia-smi --query-gpu clocks.current.graphics --format=csv,noheader,nounits | |
;; | |
mem-clock) | |
nvidia-smi --query-gpu clocks.current.memory --format=csv,noheader,nounits | |
;; | |
utiliz) | |
nvidia-smi --query-gpu utilization.gpu --format=csv,noheader,nounits | |
;; | |
power) | |
nvidia-smi --query-gpu power.draw --format=csv,noheader,nounits | |
;; | |
fields) | |
nvidia-smi --help-query-gpu | |
;; | |
*) | |
nvidia-smi --query-gpu "$type" --format=csv,noheader,nounits | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment