Created
February 17, 2024 20:22
-
-
Save ntropy83/7b82fc9a1016f093dadd9d4c2608862d to your computer and use it in GitHub Desktop.
.conkyrc_nvidia.sh
This file contains 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/sh | |
if [ "$(cat /sys/class/drm/card0/device/power_state)" == "D0" ] | |
then | |
echo "- Usage: G $(nvidia-smi -q | grep 'Gpu' | cut -c '45-49'), M $(nvidia-smi -q | grep 'Memory' | grep '%' | cut -c '45-49'), E $(nvidia-smi -q | grep 'Encoder' | grep '%' | cut -c '45-49'), D $(nvidia-smi -q | grep 'Decoder' | grep '%' | cut -c '45-49') | |
Driver Version: $(nvidia-smi -q | grep 'Driver Version' | cut -zc '45-53') Temp: $(nvidia-smi -q | grep 'GPU Current Temp' | cut -c '45-46') °C | |
VRAM used/total: $(nvidia-smi -q | grep 'Used' | cut -zc '45-50') / $(nvidia-smi -q | grep 'Total' | cut -zc '44-52') | |
Power Draw: $(nvidia-smi -q | grep 'Power Draw' | cut -zc '45-52')" | |
else | |
echo "- standby" | |
fi | |
sleep 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment