Code: Select all
while :; do echo "$(sudo cat /sys/class/drm/card0/device/gpu_busy_percent)"; sleep 1; done
Code: Select all
while :; do echo "$(sudo cat /sys/class/drm/card0/device/gpu_busy_percent)"; sleep 1; done
Linux hates me. Not even with root >.<Koentje wrote: ⤴Tue Mar 19, 2024 9:46 pm Does this work with sudo?
Code: Select all
while :; do echo "$(sudo cat /sys/class/drm/card0/device/gpu_busy_percent)"; sleep 1; done
Code: Select all
logansfury@OptiPlex-5040:~$ while :; do echo "$(sudo cat /sys/class/drm/card0/device/gpu_busy_percent)"; sleep 1; done
[sudo] password for logansfury:
cat: /sys/class/drm/card0/device/gpu_busy_percent: Operation not supported
cat: /sys/class/drm/card0/device/gpu_busy_percent: Operation not supported
cat: /sys/class/drm/card0/device/gpu_busy_percent: Operation not supported
cat: /sys/class/drm/card0/device/gpu_busy_percent: Operation not supported
^C
logansfury@OptiPlex-5040:~$
All I can think of is some diagnostic dependency? I had to install both i2c and ddcutil to get simple descriptive data about my monitors.
Code: Select all
sudo apt install radeontop
Code: Select all
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{printf $2}')
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
I haveKoentje wrote: ⤴Wed Mar 20, 2024 5:56 am Add this to your gpu bash script
Code: Select all
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{printf $2}') echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
${execgraph "cat /sys/class/drm/card0/device/gpu_busy_percent" 005500 009900 scale -t}
Code: Select all
default_graph_height = 12,
default_graph_width = 129,
Code: Select all
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{printf $2}')
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
I had mixed resultsKoentje wrote: ⤴Wed Mar 20, 2024 5:56 am Add this to your gpu bash script
Code: Select all
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{printf $2}') echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
Code: Select all
echo "\${color red}Graphics Pipe: \${color white}\${alignr}$gpu"
The bash script is the one you provided. The conkyrc just defines position and colors and executes the bash script
Code: Select all
conky.text = [[
${color1}GPU» ${hr}
${execpi 5 ./radeontop.sh}
]]
Code: Select all
#!/bin/bash
rm -f ./radeontop.dump
radeontop -l1 -d ./radeontop.dump > /dev/null
wait
sed -i 's/, /\n/g' ./radeontop.dump
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{print $2}')
vgt=$(cat ./radeontop.dump | grep 'vgt' | awk '{print $2}')
ta=$(cat ./radeontop.dump | grep 'ta' | awk '{print $2}')
sx=$(cat ./radeontop.dump | grep 'sx' | awk '{print $2}')
sc=$(grep -w 'sc' ./radeontop.dump | awk '{print $2}')
spi=$(cat ./radeontop.dump | grep 'spi' | awk '{print $2}')
pa=$(cat ./radeontop.dump | grep 'pa' | awk '{print $2}')
db=$(cat ./radeontop.dump | grep 'db' | awk '{print $2}')
cb=$(cat ./radeontop.dump | grep 'cb' | awk '{print $2}')
vram=$(cat ./radeontop.dump | grep 'vram' | awk '{print $2" "$3}')
gtt=$(cat ./radeontop.dump | grep 'gtt' | awk '{print $2" "$3}')
mclk=$(cat ./radeontop.dump | grep 'mclk' | awk '{print $2" "$3}')
sclk=$(cat ./radeontop.dump | grep 'sclk' | awk '{print $2" "$3}')
echo "\${color red}GPU brand: \${color white}\${alignr}Advanced Micro Devices, Inc. [AMD/ATI]"
echo "\${color red}GPU model: \${color white}\${alignr}Cape Verde PRO [Radeon HD 7750]"
echo "\${color red}Graphics Pipe: \${color white}\${alignr}$gpu"
echo "\${color red}Vertex Grouper + Tesselator: \${color white}\${alignr}$vgt"
echo "\${color red}Texture Addresser: \${color white}\${alignr}$ta"
echo "\${color red}Shader Export: \${color white}\${alignr}$sx"
echo "\${color red}Shader Interpolator: \${color white}\${alignr}$spi"
echo "\${color red}Scan Converter: \${color white}\${alignr}$sc"
echo "\${color red}Primitive Assembly: \${color white}\${alignr}$pa"
echo "\${color red}Depth Block: \${color white}\${alignr}$db"
echo "\${color red}Color Block: \${color white}\${alignr}$cb"
echo "\${color red}Virtual RAM: \${color white}\${alignr}$vram of 868mb"
echo "\${color red}GTT: \${color white}\${alignr}$gtt of 16005mb"
echo "\${color red}Memory Clock: \${color white}\${alignr}$mclk of 0.80ghz"
echo "\${color red}Shader Clock: \${color white}\${alignr}$sclk of 0.80ghz"
echo "\${execgraph "$(cat /sys/class/drm/card0/device/gpu_busy_percent)" 005500 009900 scale -t}"
I provided 2 scripts! The first one i made for you and the second one that i use myself...
Code: Select all
#!/bin/bash
rm -f ./radeontop.dump
radeontop -l1 -d ./radeontop.dump > /dev/null
wait
sed -i 's/, /\n/g' ./radeontop.dump
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{print $2}')
vgt=$(cat ./radeontop.dump | grep 'vgt' | awk '{print $2}')
ta=$(cat ./radeontop.dump | grep 'ta' | awk '{print $2}')
sx=$(cat ./radeontop.dump | grep 'sx' | awk '{print $2}')
sc=$(grep -w 'sc' ./radeontop.dump | awk '{print $2}')
spi=$(cat ./radeontop.dump | grep 'spi' | awk '{print $2}')
pa=$(cat ./radeontop.dump | grep 'pa' | awk '{print $2}')
db=$(cat ./radeontop.dump | grep 'db' | awk '{print $2}')
cb=$(cat ./radeontop.dump | grep 'cb' | awk '{print $2}')
vram=$(cat ./radeontop.dump | grep 'vram' | awk '{print $2" "$3}')
gtt=$(cat ./radeontop.dump | grep 'gtt' | awk '{print $2" "$3}')
mclk=$(cat ./radeontop.dump | grep 'mclk' | awk '{print $2" "$3}')
sclk=$(cat ./radeontop.dump | grep 'sclk' | awk '{print $2" "$3}')
echo "\${color red}GPU brand: \${color white}\${alignr}Advanced Micro Devices, Inc. [AMD/ATI]"
echo "\${color red}GPU model: \${color white}\${alignr}Cape Verde PRO [Radeon HD 7750]"
echo "\${color red}Graphics Pipe: \${color white}\${alignr}$gpu"
echo "\${color red}Vertex Grouper + Tesselator: \${color white}\${alignr}$vgt"
echo "\${color red}Texture Addresser: \${color white}\${alignr}$ta"
echo "\${color red}Shader Export: \${color white}\${alignr}$sx"
echo "\${color red}Shader Interpolator: \${color white}\${alignr}$spi"
echo "\${color red}Scan Converter: \${color white}\${alignr}$sc"
echo "\${color red}Primitive Assembly: \${color white}\${alignr}$pa"
echo "\${color red}Depth Block: \${color white}\${alignr}$db"
echo "\${color red}Color Block: \${color white}\${alignr}$cb"
echo "\${color red}Virtual RAM: \${color white}\${alignr}$vram of 868mb"
echo "\${color red}GTT: \${color white}\${alignr}$gtt of 16005mb"
echo "\${color red}Memory Clock: \${color white}\${alignr}$mclk of 0.80ghz"
echo "\${color red}Shader Clock: \${color white}\${alignr}$sclk of 0.80ghz"
echo "\${execgraph "echo $gpu" 005500 009900 scale -t}"
Im sorry If I'm frustrating you but this is all very new to me and I can't write any of my own code yet.Koentje wrote: ⤴Wed Mar 20, 2024 1:16 pmI provided 2 scripts! The first one i made for you and the second one that i use myself...
Duh...Code: Select all
#!/bin/bash rm -f ./radeontop.dump radeontop -l1 -d ./radeontop.dump > /dev/null wait sed -i 's/, /\n/g' ./radeontop.dump gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{print $2}') vgt=$(cat ./radeontop.dump | grep 'vgt' | awk '{print $2}') ta=$(cat ./radeontop.dump | grep 'ta' | awk '{print $2}') sx=$(cat ./radeontop.dump | grep 'sx' | awk '{print $2}') sc=$(grep -w 'sc' ./radeontop.dump | awk '{print $2}') spi=$(cat ./radeontop.dump | grep 'spi' | awk '{print $2}') pa=$(cat ./radeontop.dump | grep 'pa' | awk '{print $2}') db=$(cat ./radeontop.dump | grep 'db' | awk '{print $2}') cb=$(cat ./radeontop.dump | grep 'cb' | awk '{print $2}') vram=$(cat ./radeontop.dump | grep 'vram' | awk '{print $2" "$3}') gtt=$(cat ./radeontop.dump | grep 'gtt' | awk '{print $2" "$3}') mclk=$(cat ./radeontop.dump | grep 'mclk' | awk '{print $2" "$3}') sclk=$(cat ./radeontop.dump | grep 'sclk' | awk '{print $2" "$3}') echo "\${color red}GPU brand: \${color white}\${alignr}Advanced Micro Devices, Inc. [AMD/ATI]" echo "\${color red}GPU model: \${color white}\${alignr}Cape Verde PRO [Radeon HD 7750]" echo "\${color red}Graphics Pipe: \${color white}\${alignr}$gpu" echo "\${color red}Vertex Grouper + Tesselator: \${color white}\${alignr}$vgt" echo "\${color red}Texture Addresser: \${color white}\${alignr}$ta" echo "\${color red}Shader Export: \${color white}\${alignr}$sx" echo "\${color red}Shader Interpolator: \${color white}\${alignr}$spi" echo "\${color red}Scan Converter: \${color white}\${alignr}$sc" echo "\${color red}Primitive Assembly: \${color white}\${alignr}$pa" echo "\${color red}Depth Block: \${color white}\${alignr}$db" echo "\${color red}Color Block: \${color white}\${alignr}$cb" echo "\${color red}Virtual RAM: \${color white}\${alignr}$vram of 868mb" echo "\${color red}GTT: \${color white}\${alignr}$gtt of 16005mb" echo "\${color red}Memory Clock: \${color white}\${alignr}$mclk of 0.80ghz" echo "\${color red}Shader Clock: \${color white}\${alignr}$sclk of 0.80ghz" echo "\${execgraph "echo $gpu" 005500 009900 scale -t}"
Here is everything that operates the script afaik:
Code: Select all
conky.config = {
alignment = 'top_left',
gap_x = 56,
gap_y = 156,
xinerama_head = 1,
background = true,
border_width = 1,
cpu_avg_samples = 2,
default_color = 'gray',
default_outline_color = 'black',
default_shade_color = 'white',
color0 = '#ffffff',
color1 = '#ff0000',
double_buffer = true,
draw_borders = false,
draw_graph_borders = true,
draw_outline = true,
draw_shades = false,
extra_newline = false,
font = 'Neon 80s:size=10',
minimum_height = 260,
minimum_width = 356,
net_avg_samples = 2,
no_buffers = true,
out_to_console = false,
out_to_ncurses = false,
out_to_stderr = false,
out_to_x = true,
own_window = true,
own_window_class = 'Conky',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_type = 'desktop',
own_window_hints ='undecorated,sticky,skip_taskbar,skip_pager,below',
show_graph_range = false,
show_graph_scale = false,
stippled_borders = 0,
update_interval = 1.0,
uppercase = false,
use_spacer = 'none',
use_xft = true,
default_graph_height = 40,
default_graph_width = 350,
}
conky.text = [[
${color1}GPU» ${hr}
${execpi 5 ./radeontop.sh}
]]
Code: Select all
#!/bin/bash
rm -f ./radeontop.dump
radeontop -l1 -d ./radeontop.dump > /dev/null
wait
sed -i 's/, /\n/g' ./radeontop.dump
gpu=$(cat ./radeontop.dump | grep 'gpu' | awk '{print $2}')
vgt=$(cat ./radeontop.dump | grep 'vgt' | awk '{print $2}')
ta=$(cat ./radeontop.dump | grep 'ta' | awk '{print $2}')
sx=$(cat ./radeontop.dump | grep 'sx' | awk '{print $2}')
sc=$(grep -w 'sc' ./radeontop.dump | awk '{print $2}')
spi=$(cat ./radeontop.dump | grep 'spi' | awk '{print $2}')
pa=$(cat ./radeontop.dump | grep 'pa' | awk '{print $2}')
db=$(cat ./radeontop.dump | grep 'db' | awk '{print $2}')
cb=$(cat ./radeontop.dump | grep 'cb' | awk '{print $2}')
vram=$(cat ./radeontop.dump | grep 'vram' | awk '{print $2" "$3}')
gtt=$(cat ./radeontop.dump | grep 'gtt' | awk '{print $2" "$3}')
mclk=$(cat ./radeontop.dump | grep 'mclk' | awk '{print $2" "$3}')
sclk=$(cat ./radeontop.dump | grep 'sclk' | awk '{print $2" "$3}')
echo "\${color red}GPU brand: \${color white}\${alignr}Advanced Micro Devices, Inc. [AMD/ATI]"
echo "\${color red}GPU model: \${color white}\${alignr}Cape Verde PRO [Radeon HD 7750]"
echo "\${color red}Graphics Pipe: \${color white}\${alignr}$gpu"
echo "\${color red}Vertex Grouper + Tesselator: \${color white}\${alignr}$vgt"
echo "\${color red}Texture Addresser: \${color white}\${alignr}$ta"
echo "\${color red}Shader Export: \${color white}\${alignr}$sx"
echo "\${color red}Shader Interpolator: \${color white}\${alignr}$spi"
echo "\${color red}Scan Converter: \${color white}\${alignr}$sc"
echo "\${color red}Primitive Assembly: \${color white}\${alignr}$pa"
echo "\${color red}Depth Block: \${color white}\${alignr}$db"
echo "\${color red}Color Block: \${color white}\${alignr}$cb"
echo "\${color red}Virtual RAM: \${color white}\${alignr}$vram of 868mb"
echo "\${color red}GTT: \${color white}\${alignr}$gtt of 16005mb"
echo "\${color red}Memory Clock: \${color white}\${alignr}$mclk of 0.80ghz"
echo "\${color red}Shader Clock: \${color white}\${alignr}$sclk of 0.80ghz"
echo "\${execgraph "echo $gpu" 005500 009900 scale -t}"
Code: Select all
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
This made the graph box outline static, but there are no bars being displayedKoentje wrote: ⤴Wed Mar 20, 2024 2:13 pm Change the last line of the bash script into this
Code: Select all
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
hold up - I just saw a tiny green vertical line against the bottom right corner of the graph but instead of moving left and displaying the next value, its staying in the right corner and just overwriting itselfLogansfury wrote: ⤴Wed Mar 20, 2024 2:26 pmThis made the graph box outline static, but there are no bars being displayedKoentje wrote: ⤴Wed Mar 20, 2024 2:13 pm Change the last line of the bash script into this
Code: Select all
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
echo "\${execgraph \"echo $gpu\" 005500 009900 scale -t}"
Code: Select all
${execgraph "echo $(cat ./radeontop.dump | grep 'gpu' | awk '{print $2}')" 005500 009900 scale -t}"