[waybar] Fix GPU power draw path.
This commit is contained in:
parent
26472739be
commit
b134a13c1c
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ if (( $hwmon_nr_amd >= 0 )); then
|
||||||
hwmon_path="/sys/class/hwmon/hwmon$hwmon_nr_amd"
|
hwmon_path="/sys/class/hwmon/hwmon$hwmon_nr_amd"
|
||||||
usage=$(cat "$hwmon_path/device/gpu_busy_percent")
|
usage=$(cat "$hwmon_path/device/gpu_busy_percent")
|
||||||
vram=$(awk '{ print int($1/1024/1024) }' "$hwmon_path/device/mem_info_vram_used")
|
vram=$(awk '{ print int($1/1024/1024) }' "$hwmon_path/device/mem_info_vram_used")
|
||||||
power=$(head -c -7 "$hwmon_path/power1_average")
|
power=$(head -c -7 "$hwmon_path/power1_input")
|
||||||
elif which nvidia-smi &> /dev/null; then
|
elif which nvidia-smi &> /dev/null; then
|
||||||
usage=$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits)
|
usage=$(nvidia-smi --query-gpu=utilization.gpu --format=csv,noheader,nounits)
|
||||||
vram=$(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits)
|
vram=$(nvidia-smi --query-gpu=memory.used --format=csv,noheader,nounits)
|
||||||
|
|
Loading…
Reference in a new issue