EDIT:
===WARNING! DOING THIS MAY CAUSE A MEMORY LEAK DUE TO OVERWRITING FILES ON A TMPFS. MAKE SURE YOU EXPLICITLY DELETE ANY FILES ON THE TMPFS BEFORE WRITING TO THEM.===
Also kernel 5.6 allows seeing the Vcore reported by the CPU itself, as well as Icore, VSoC, and ISoC. I will post updated versions below.
Most of my issues are resolved, so I’m making a possibly final post here summarizing what I did, in case any other newbies come across this that are in the same boat as I was last week.
I won’t close it though, in case anyone wants to add info about glances or amdgpu, or has suggestions on how to make this more efficient, etc., as there are still some minor issues.
A lot of what I wrote in earlier posts will be duplicated here, so it’s all in one place, and no one will have to read all of my verbal diarrhea from the entire thread.
Okay, so…
First off, I added an entry to my fstab, so I have a place to store my sensors output in memory for parsing, and therefore don’t have to call sensors multiple times per refresh interval:
# /mnt/sensordata
tmpfs /mnt/sensordata tmpfs rw,size=1M,noexec,nodev,nosuid,uid=user1,mode=1700 0 0
Next, I’ve written a bash script to snag and store the data on the ramdisk:
===WARNING! DO NOT DO THIS OR YOU MAY CAUSE A MEMORY LEAK===
Summary
#!/bin/bash
sensors > /mnt/sensordata/sensors-output.txt
cat /mnt/sensordata/sensors-output.txt | grep 'k10temp-pci-00c3' -A3 | grep 'Tdie' | awk '{print $2}' | cut -c 2-5 > /mnt/sensordata/cpu-core-temp.txt
STRCPUVOLTUNITS=$(cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'in0' | awk '{print $3}')
FLOATCPUVOLTS=$(cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'in0' | awk '{print $2}')
if [ "${STRCPUVOLTUNITS}" == "mV" ];
then echo "scale=2; $(echo "${FLOATCPUVOLTS}")/1000" | bc > /mnt/sensordata/cpu-volts.txt;
else echo "${FLOATCPUVOLTS}" > /mnt/sensordata/cpu-volts.txt;
fi
cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'fan1' | awk '{print $2}' > /mnt/sensordata/cpu-fans.txt
echo "scale=1; $(cat /mnt/sensordata/cpu-fans.txt)"/20 | bc > /mnt/sensordata/cpu-fans-percent.txt
cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'fan6' | awk '{print $2}' > /mnt/sensordata/intake-fans.txt
echo "scale=1; $(cat /mnt/sensordata/intake-fans.txt)"/16.4 | bc > /mnt/sensordata/intake-fans-percent.txt
cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'fan2' | awk '{print $2}' > /mnt/sensordata/exhaust-fan.txt
echo "scale=1; $(cat /mnt/sensordata/exhaust-fan.txt)"/20.6 | bc > /mnt/sensordata/exhaust-fan-percent.txt
cat /mnt/sensordata/sensors-output.txt | grep 'it8665-isa-0290' -A23 | grep 'fan3' | awk '{print $2}' > /mnt/sensordata/hdd-fans.txt
echo "scale=1; $(cat /mnt/sensordata/hdd-fans.txt)"/24.2 | bc > /mnt/sensordata/hdd-fans-percent.txt
cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/gpu_busy_percent > /mnt/sensordata/gpu-core-usage.txt
cat /mnt/sensordata/sensors-output.txt | grep 'amdgpu-pci-0a00' -A5 | grep 'edge' | awk '{print $2}' | cut -c 2-5 > /mnt/sensordata/gpu-core-temp.txt
echo "0" > /mnt/sensordata/gpu-core-volts.txt
echo "scale=0; $(cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/hwmon/hwmon?/freq1_input)"/1000000 | bc > /mnt/sensordata/gpu-core-frequency.txt
echo "scale=0; $(cat /mnt/sensordata/gpu-core-frequency.txt)"/12 | bc > /mnt/sensordata/gpu-core-frequency-percent.txt
echo "scale=0; $(cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/hwmon/hwmon?/freq2_input)"/1000000 | bc > /mnt/sensordata/gpu-vram-frequency.txt
echo "scale=0; $(cat /mnt/sensordata/gpu-vram-frequency.txt)"/15 | bc > /mnt/sensordata/gpu-vram-frequency-percent.txt
echo "scale=0; $(cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/drm/card?/device/mem_info_vram_used)"/1048576 | bc > /mnt/sensordata/gpu-vram-used.txt
echo "scale=0; $(cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/drm/card?/device/mem_info_vram_total)"/1048576 | bc > /mnt/sensordata/gpu-vram-total.txt
echo "scale=1; $(cat /mnt/sensordata/gpu-vram-used.txt)"\*100/"$(cat /mnt/sensordata/gpu-vram-total.txt)" | bc > /mnt/sensordata/gpu-vram-used-percent.txt
echo "scale=1; $(cat /sys/devices/pci0000\:00/0000\:00\:03.1/0000\:0a\:00.0/hwmon/hwmon?/pwm1)/2.55" | bc > /mnt/sensordata/gpu-fan-percent.txt
===END WARNING===
Next, the current state of my .conkyrc.
Summary
conky.config={
alignment="top_left",
minimum_width=460,
maximum_width=460,
minimum_height=1049,
border_inner_margin=4,
default_bar_height=4,
default_bar_width=226,
default_color="FFFFFF",
default_graph_height=14,
default_graph_width=226,
xinerama_head=1,
double_buffer=true,
draw_shades=false,
draw_graph_borders=true,
show_graph_scale=true,
gap_x=1454,
gap_y=0,
font="Sans Serif:style=Bold:size=8",
own_window=true,
own_window_argb_value=128,
own_window_argb_visual=true,
own_window_colour="000000",
own_window_hints="undecorated,below,sticky,skip_taskbar,skip_pager",
own_window_transparent=false,
own_window_type="panel",
update_interval=3,
uppercase=false,
use_xft=true,
};
conky.text=[[
SYSTEM ${hr 5}
${alignc}'${nodename}'
${alignc}${exec lsb_release -d | cut -f 2}
${alignc}linux ${kernel}
${alignc}Uptime: ${uptime_short}
CPU, GPU, & MEM${hr 5}
CPU${goto 36}Frequency${goto 104}Usage${goto 233}|${goto 240}PROCESSES${alignr}${processes}
0${goto 36}${freq 1} MHz${goto 104}${cpugraph cpu1 12,94 181818 16A085}${goto 200}${cpu cpu1}${goto 222}%${goto 233}|${goto 240}${top name 1}${alignr}${top cpu 1}%
1${goto 36}${freq 2} MHz${goto 104}${cpugraph cpu2 12,94 181818 16A085}${goto 200}${cpu cpu2}${goto 222}%${goto 233}|${goto 240}${top name 2}${alignr}${top cpu 2}%
2${goto 36}${freq 3} MHz${goto 104}${cpugraph cpu3 12,94 181818 16A085}${goto 200}${cpu cpu3}${goto 222}%${goto 233}|${goto 240}${top name 3}${alignr}${top cpu 3}%
3${goto 36}${freq 4} MHz${goto 104}${cpugraph cpu4 12,94 181818 16A085}${goto 200}${cpu cpu4}${goto 222}%${goto 233}|${goto 240}${top name 4}${alignr}${top cpu 4}%
4${goto 36}${freq 5} MHz${goto 104}${cpugraph cpu5 12,94 181818 16A085}${goto 200}${cpu cpu5}${goto 222}%${goto 233}|${goto 240}${top name 5}${alignr}${top cpu 5}%
5${goto 36}${freq 6} MHz${goto 104}${cpugraph cpu6 12,94 181818 16A085}${goto 200}${cpu cpu6}${goto 222}%${goto 233}|${goto 240}${top name 6}${alignr}${top cpu 6}%
6${goto 36}${freq 7} MHz${goto 104}${cpugraph cpu7 12,94 181818 16A085}${goto 200}${cpu cpu7}${goto 222}%${goto 233}|${goto 240}${top name 7}${alignr}${top cpu 7}%
7${goto 36}${freq 8} MHz${goto 104}${cpugraph cpu8 12,94 181818 16A085}${goto 200}${cpu cpu8}${goto 222}%${goto 233}|
8${goto 36}${freq 9} MHz${goto 104}${cpugraph cpu9 12,94 181818 16A085}${goto 200}${cpu cpu9}${goto 222}%${goto 233}|${goto 240}MEMORY${alignr}${mem} / ${memmax} (${memperc}%)
9${goto 36}${freq 10} MHz${goto 104}${cpugraph cpu10 12,94 181818 16A085}${goto 200}${cpu cpu10}${goto 222}%${goto 233}|${alignr}${memgraph 10,226 181818 16A085}
10${goto 36}${freq 11} MHz${goto 104}${cpugraph cpu11 12,94 181818 16A085}${goto 200}${cpu cpu11}${goto 222}%${goto 233}|${goto 240}${top_mem name 1}${alignr}${top_mem mem_res 1}
11${goto 36}${freq 12} MHz${goto 104}${cpugraph cpu12 12,94 181818 16A085}${goto 200}${cpu cpu12}${goto 222}%${goto 233}|${goto 240}${top_mem name 2}${alignr}${top_mem mem_res 2}
12${goto 36}${freq 13} MHz${goto 104}${cpugraph cpu13 12,94 181818 16A085}${goto 200}${cpu cpu13}${goto 222}%${goto 233}|${goto 240}${top_mem name 3}${alignr}${top_mem mem_res 3}
13${goto 36}${freq 14} MHz${goto 104}${cpugraph cpu14 12,94 181818 16A085}${goto 200}${cpu cpu14}${goto 222}%${goto 233}|${goto 240}${top_mem name 4}${alignr}${top_mem mem_res 4}
14${goto 36}${freq 15} MHz${goto 104}${cpugraph cpu15 12,94 181818 16A085}${goto 200}${cpu cpu15}${goto 222}%${goto 233}|${goto 240}${top_mem name 5}${alignr}${top_mem mem_res 5}
15${goto 36}${freq 16} MHz${goto 104}${cpugraph cpu16 12,94 181818 16A085}${goto 200}${cpu cpu16}${goto 222}%${goto 233}|${goto 240}${top_mem name 6}${alignr}${top_mem mem_res 6}
Overall CPU Usage${goto 200}${cpu}${goto 222}%${goto 240}GPU Core Usage${alignr}${exec "cat /mnt/sensordata/gpu-core-usage.txt"}%
${cpugraph cpu0 30,226 181818 16A085}${alignr}${execgraph "cat /mnt/sensordata/gpu-core-usage.txt" 30,226 181818 16A085 100}
CPU Temperature${goto 194}${exec "cat /mnt/sensordata/cpu-core-temp.txt"}°C${goto 240}GPU Temperature${alignr}${exec "cat /mnt/sensordata/gpu-core-temp.txt"}°C
${execgraph "cat /mnt/sensordata/cpu-core-temp.txt" 30,226 181818 16A085 100}${alignr}${execgraph "cat /mnt/sensordata/gpu-core-temp.txt" 30,226 181818 16A085 100}
CPU Voltage${goto 198}${exec "cat /mnt/sensordata/cpu-volts.txt"}V${goto 240}GPU Voltage${alignr}placeholder V
${execgraph "cat /mnt/sensordata/cpu-volts.txt" 30,226 181818 16A085 1.60}${alignr}${execgraph "echo "0"" 30,226 181818 16A085 100}
CPU Fans${goto 176}${exec "cat /mnt/sensordata/cpu-fans.txt}${goto 204}RPM${goto 240}GPU Fans${alignr}${exec "cat /mnt/sensordata/gpu-fan-percent.txt"}%
${execgraph "cat /mnt/sensordata/cpu-fans-percent.txt" 30,226 181818 16A085 100}${alignr}${execgraph "cat /mnt/sensordata/gpu-fan-percent.txt" 30,226 181818 16A085 100}
Intake Fans${goto 176}${exec "cat /mnt/sensordata/intake-fans.txt"}${goto 204}RPM${goto 240}GPU Frequency${alignr}${exec "cat /mnt/sensordata/gpu-core-frequency.txt"}MHz
${execgraph "cat /mnt/sensordata/intake-fans-percent.txt" 30,226 181818 16A085 100}${alignr}${execgraph "cat /mnt/sensordata/gpu-core-frequency-percent.txt" 30,226 181818 16A085 100}
Exhaust Fan${goto 176}${exec "cat /mnt/sensordata/exhaust-fan.txt"}${goto 204}RPM${goto 240}VRAM Frequency${alignr}${exec "cat /mnt/sensordata/gpu-vram-frequency.txt"}MHz
${execgraph "cat /mnt/sensordata/exhaust-fan-percent.txt" 30,226 181818 16A085 100}${alignr}${execgraph "cat /mnt/sensordata/gpu-vram-frequency-percent.txt" 30,226 181818 16A085 100}
HDD Fans${goto 176}${exec "cat /mnt/sensordata/hdd-fans.txt"}${goto 204}RPM${goto 240}VRAM Usage${alignr}${exec "cat /mnt/sensordata/gpu-vram-used.txt"} / ${exec "cat /mnt/sensordata/gpu-vram-total.txt"}MiB (${exec "cat /mnt/sensordata/gpu-vram-used-percent.txt"}%)
${execgraph "cat /mnt/sensordata/hdd-fans-percent.txt" 30,226 181818 16A085 100}${alignr}${execgraph "cat /mnt/sensordata/gpu-vram-used-percent.txt" 30,226 181818 16A085 100}
DISKS${hr 5}
${goto 233}|
/dev/sdd${goto 100}${fs_used /} / ${fs_size /} (${fs_used_perc /}%)${goto 233}|
${fs_bar /}${goto 233}|
${goto 233}|
NETWORK ${hr 5}
${alignc}Intel Corporation I211 Gigabit Network Connection (rev 03)
Down${goto 186}${downspeed enp8s0}${goto 240}Up${alignr}${upspeed enp8s0}
${downspeedgraph enp8s0 30,226 181818 16A085}${alignr}${upspeedgraph enp8s0 30,226 181818 16A085}
Total${goto 186}${totaldown enp38s0}${goto 240}Total${alignr}${totalup enp8s0}
]]
To automate starting the script and conky at boot, I’ve created a couple systemd services and associated timers. These units are placed in /etc/systemd/system. The timer has to have the same file name as the service (but with the “.timer” extension instead), in order for it to find the service file automatically, without specifically pointing to it.
First, the one that calls the sensordata.sh script. The reason this was not working earlier is because I didn’t RTFM and had to add AccuracySec= to the [Timer] section. Otherwise, the default accuracy of timers is only 1 minute intervals. @vlycop gave me the solution here (Thanks again dude!):
Summary
I played around with different OnUnitActiveSec= and AccuracySec= values until it would run without throwing Start request repeated too quickly and start-limit-hit errors. I wanted to get the interval down to 2 seconds but that wasn’t working out, so I’m sticking with 3. YMMV. One caveat is if you set AccuracySec= too low it can mess with your idle efficiency as your CPU has to wake too often (according to what I read anyway).
systemd unit files here:
Summary
Contents of store-temporary-sensor-data.timer:
[Unit]
Description=Timer for refreshing stored sensor data
[Timer]
OnBootSec=16sec
OnUnitActiveSec=2990ms
AccuracySec=10ms
[Install]
WantedBy=timers.target
Contents of store-temporary-sensor-data.service:
[Unit]
Description=Get and store temporary sensor values
[Service]
Type=simple
ExecStart=/bin/bash /home/user1/.sensordata.sh
RemainAfterExit=false
[Install]
WantedBy=multi-user.target
Contents of conky.timer:
[Unit]
Description=Conky auto-start timer
[Timer]
OnBootSec=20sec
[Install]
WantedBy=timers.target
Contents of conky.service:
[Unit]
Description=Conky
Wants=store-temporary-sensor-data
[Service]
User=user1
Type=simple
ExecStart=/usr/bin/conky --display=:0
RemainAfterExit=false
[Install]
WantedBy=multi-user.target
The --display=:0 argument was necessary, otherwise conky would throw a can't open display error. If you get this error, and need to find out the right number to punch in there, you can run echo $DISPLAY in the terminal.
User=user1 is necessary so the service doesn’t run as root, and can find your .conkyrc
So that’s it! Hopefully this wall of text helps someone else down the road, or they found it informative at the very least. That’ll make be feel better about beating my head against a wall on this for days 
A couple “issues” I’m still having:
- My network downspeed total isn’t displaying correctly
- I can’t find where to snag my GPU core voltage.
/sys/class/drm/card1/device/hwmon/hwmon?/in0_inputis my VDDCI/AUX (memory controller) voltage, andin1_inputdoes not exist. This might be due to the fact that I’m running a modified VBIOS with a tweaked init regulator section in the VOI table, or it might just not be supported on Hawaii, not sure…I’ll have to test with the stock BIOS later maybe. - Not sure how efficient this is. If anyone has any other methods, or tips to clean up the script or config, I’ll take 'em. There’s a lot of cat’s , greps, and echoes flying around and I’m guessing I could compress it into an
awkorsedone-liner if I had a clue what I was doing. Note that I tried to use head/tail in the conky config instead ofexec "cat /mnt/sensordata/..."to grab the numbers out of the .txt files, but that was causing it to print extra newline chars. Maybe there’s a way to store the data in the .txt file without a newline char but I haven’t looked into it yet.