Skip to content

Instantly share code, notes, and snippets.

@verdimrc
Last active December 19, 2024 21:49
Show Gist options
  • Save verdimrc/794e3153ac56483d3063b6b57537f172 to your computer and use it in GitHub Desktop.
Save verdimrc/794e3153ac56483d3063b6b57537f172 to your computer and use it in GitHub Desktop.
watch-accel.sh
################################################################################
# NVIDIA
################################################################################
nvidia-smi -l
nvidia-smi -l 1
nvidia-smi -l 1 --format=csv --query-gpu=gpu_name,index,utilization.memory,memory.total,memory.reserved,memory.used,memory.free
nvidia-smi -l 1 --format=csv --query-gpu=gpu_name,index,utilization.memory,memory.total,memory.reserved,memory.used,memory.free 2>&1 | tee /tmp/haha.txt
declare -a ARGS=(
-l 1
--format=csv
--query-gpu=gpu_name,index,utilization.memory,memory.total,memory.reserved,memory.used,memory.free
)
nvidia-smi "${ARGS[@]}"
nvidia-smi "${ARGS[@]}" 2>&1 | tee /tmp/haha.txt
# pipx install nvitop
nvitop -U # Default interval is 2 seconds.
nvitop -U --interval 1
# pipx install gpustat
gpustat
gpustat --interval 1
################################################################################
# Habana Gaudi
################################################################################
hl-smi -Q utilization.aip -f csv -l 1
hl-smi -i 0000:10:1d.0 -Q timestamp,index,utilization.aip -f csv -l 1
hl-smi -Q timestamp,index,utilization.aip -f csv -l 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment