Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

temps on Ryzen using zenpower module #8

Closed
moestv2dk opened this issue May 18, 2024 · 5 comments
Closed

temps on Ryzen using zenpower module #8

moestv2dk opened this issue May 18, 2024 · 5 comments

Comments

@moestv2dk
Copy link

It seems if you use the dkms zenpower you need to add the line below and add it to the print out.

if temp.SensorKey == "zenpower_tctl_input" || temp.SensorKey == "zenpower_tdie_input" {
vals["zenpower"] = int(temp.Temperature)
}

It is possible to add temp on tctl,tdie,tccd1and tccd2 .
i am not well versed in go but maybe it would be possible to do a CPU temp with "tctl Xc|tdie Xc| tccd1 Xc| tccd2 Xc" so it shows all the temps ?? as a tctl often are higher than the ccd's as the often rise on work load.

the temp.SensorKey values are
zenpower_tctl_input
zenpower_tdie_input
zenpower_tccdX_input ( X depends on the amount of ccd's you have like Ryzen 9 series and EPIC and Threadripper has 2+ CCD's ).

@nwg-piotr
Copy link
Owner

This could be done, but I have no way to test it. Would you like to cooperate?

@simonm
Copy link

simonm commented Nov 4, 2024

I found this issue for the same reason. I am happy to help test it, @nwg-piotr

@nwg-piotr
Copy link
Owner

nwg-piotr commented Nov 4, 2024

All right. I think adding and reordering sensors on each feature request makes no sense. Someone will always remain unhappy. What we need is a flag to make the program use a certain sensor. If given, the temperatures() function will skip the current lines (I leave them for backwards compatibility), and try to find a value on the desired sensor. We also need a flag to list sensors available through the gopsutil module.

To test, you'll need git and go packages installed.

  1. Clone the dev branch:
git clone https://github.com/nwg-piotr/gopsuinfo.git -b dev
cd gopsuinfo

We will use go run . instead of the gopsuinfo command.

  1. List available sensors with the -ls flag (I filter out whatever doesn't end with "_input"):
go run . -ls

It should display something like this:

acpitz_input (59°C)
amdgpu_edge_input (50°C)
amdgpu_junction_input (52°C)
amdgpu_mem_input (0°C)
amdgpu_edge_input (57°C)
nvme_composite_input (47.85°C)
nvme_sensor1_input (47.85°C)
nvme_sensor2_input (46.85°C)
k10temp_tctl_input (57°C)
  1. Try passing sensor names with the -ts flag:
go run . -c t -ts k10temp_tctl_input

Tell me what you think, and whether it works for you at all.

nwg-piotr added a commit that referenced this issue Nov 4, 2024
@simonm
Copy link

simonm commented Nov 5, 2024

Here you go:

$ git log -1
commit 77e2e90eacf0301faff4a1b6003f75b5ee4a0733 (HEAD -> dev, origin/dev)
Author: piotr <[email protected]>
Date:   Mon Nov 4 22:22:53 2024 +0100

And:

$ go run . -ls | while read line; do sensor=${line%% (*};  printf "%-22s: %s\n" $sensor $(go run . -c t -ts $sensor); done
acpitz_input          : 17℃
nvme_composite_input  : 45℃
nvme_sensor1_input    : 45℃
nvme_sensor2_input    : 52℃
nvme_composite_input  : 45℃
nvme_sensor1_input    : 45℃
nvme_sensor2_input    : 52℃
zenpower_tdie_input   : 54℃
zenpower_tctl_input   : 54℃
zenpower_tccd1_input  : 46℃
zenpower_tccd2_input  : 44℃
be2net_input          : 0℃
be2net_input          : 0℃
it8792_input          : 43℃
it8792_input          : 43℃
it8792_input          : 43℃

Looks good to me. Thank you @nwg-piotr

FYI - If I run without specifying the temp input, I get the same as before:

$ go run . -c t
-9223372036854775808℃

And, to show you I'm not running k10 and only zenpower:

$ lsmod | grep -E  'zen|k10'
zenpower               20480  0

@nwg-piotr
Copy link
Owner

Yes, if you don't provide a sensor name, the old code will be executed.

I tested at the office, and all looked good. I'll PR & merge later tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants