Created
August 6, 2020 16:04
-
-
Save nimaid/37906d370f0e616788752d9bbccb04df to your computer and use it in GitHub Desktop.
Nvidia Utilization Helper Functions
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 | |
| function gpu_usage_load() { | |
| echo $(nvidia-smi --query-gpu=utilization.gpu --format=csv | tail -1 | tr -d '\040\011\012\015') | |
| } | |
| function gpu_usage_mem() { | |
| echo $(nvidia-smi --query-gpu=utilization.memory --format=csv | tail -1 | tr -d '\040\011\012\015') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment