Show GPU frequencies in Conky

1

I want to show 3 GPU clocks on Conky. I can only find sources online to display one. The Graphics Clock, But as shown in my picture, there's a memory clock, and a processor clock that I'd like to add as well.. Does anyone know the name of the object I have to use to get these 2 items. Here's the line of code for the Graphics clock

Graphics Clock${alignr}${execi 1 nvidia-settings -query GPUCurrentClockFreqs | perl -ne 'print $1 if /GPUCurrentClockFreqs.*?: (\d+)./;'}MHz

I know I have to replace GPUCurrentClockFreqs with something, but I can't find out what it is.

enter image description here

Frantumn

Posted 2012-06-06T14:49:57.700

Reputation: 796

Answers

2

nvidia-settings -query all will list all parameters. Run nvidia-settings -query all|grep Freq or nvidia-settings -query all|grep Clock in a terminal and post here the result. Some of the parameters printed by those commands should help you. I don't have a nvidia gpu so I cannot run it myself

Edit: For the CPU frequency, you can get it through other means:

  • /proc/cpuinfo contains information for each core of your cpu

    You can run something like cat /proc/cpuinfo|grep -m 1 -i mhz|cut -d: -f 2|cut -c 2- and this will output the current frequency of the first core of your CPU.

  • The cpufreq-info command shows more frequency-related information, but it may not be installed on your system. Check your distro's package manager for a package named cpufreq-utils or something similar.

    You can run cpufreq-info |grep 'current CPU frequency'|cut -d' ' -f 7|head -n 1, and this will show you the current frequency of the first core

user49740

Posted 2012-06-06T14:49:57.700

Reputation: 2 850

why nvidia memfreq only show half of the real Mhz value? – ggnoredo – 2019-02-23T16:55:56.653

Thank you, this was actually very useful. Unfortunately, I still wasn't able to find the key word I wanted. I tried to grep words like mem, clock, GPU, Curr, and ended up with nothing. There MUST be a way to access this information. I mean the Nvidia-Settings GUI gets it somehow! – Frantumn – 2012-06-06T18:00:06.617

grep is case-sensitive. If you do grep clock you won't get anything. Either use grep Clock or grep -i clock [the -i switch makes it case-insensitive]. Also, nvidia-settings -query all|grep Clock should at least show the value of GPUCurrentClockFreqs – user49740 – 2012-06-06T18:01:21.630

Sorry for the misleading comment. I meant I got nothing specific to the memory, and processor clocks. I got results in general, but thank you :) – Frantumn – 2012-06-06T18:08:24.950

Well… You can get the CPU and the RAM clocks from other sources. For the CPU, you can do cat /proc/cpuinfo|grep -i mhz. This will output a line for each core of your CPU. For the RAM, I don't know where you can get it from. You should create a new question, 'How can I get my RAM frequency?' or something similar. I will update my answer shortly – user49740 – 2012-06-06T18:41:27.697

Forget I said that, I'm just thinking in the wrong spot. I know the numbers in Powermizer Information are related to GPU clocks, and not my CPU and RAM. – Frantumn – 2012-06-06T18:49:39.800

Then what would "Processor Clock" refer to, if not the frequency of your CPU? I haven't used PowerMizer so I do not know anything about it. You can also run a simple test: Open PowerMizer and a terminal, run one of the commands in my answer to get the current CPU frequency and compare it to what PowerMizer is saying – user49740 – 2012-06-06T18:52:03.073

I was able to get the Processor clock to mimmic the powermizer setting, the keyword was GPUCurrentProcessorClockFreqs

the keyword for Graphic Clock was GPUCurrentClockFreqs I'm not sure what the difference is, but they don't refer to my CPU as that freq is a seperate number. Now the only one I have to do is the memory one. – Frantumn – 2012-06-06T18:55:57.653

Intuition says that the keyword for memory is GPUCurrentMemoryClockFreqs. Try doing nvidia-settings -query all|grep Memory – user49740 – 2012-06-06T18:58:38.080

Yes, I tried that one. I think I'm on the right track with this, it's just a matter of finding the right word with Grep. I'll mark your answer as the solution since it led me to my working results. Thanks! :) – Frantumn – 2012-06-06T18:59:49.487

Thanks. You can also try nvidia-settings -query all|grep -i mem. From what I have read elsewhere, you can install nvclock and run nvclock -i to get some information about your GPU

– user49740 – 2012-06-06T19:03:37.230