techPowerUp! Forums

Go Back   techPowerUp! Forums > Our Software > GPU-Z

Reply
 
Thread Tools
Old Apr 12, 2012, 12:22 PM   #1
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

exe to read GPU-Z shared memory data?

(The original thread on this matter seems to have been locked, so I'm making a new one here.)


I would love to see someone make a command-line exe that will let you output GPU-Z data values into a shell window

I want to implement data from GPU-Z into MRTG graphs.


If you dont know MRTG... it will read data from SNMP, WMI or other sources, and create graphs.

MRTG requires 4 lines of data when sending values to it's script. (Info here, scroll down to 'External Monitoring Scripts')

Code:
number value 1
number value 2
system uptime (in human readable form)
system name
The two first lines is what's interesting. The two last lines are easy to create using windows shell commands. But for the sake of userfriendlyness, you could also let the exe generate the two last lines.

For example, you use various command line argument to select what graphics card you want to pull data from, and then you select what data will be used for value 1 and value 2
Code:
readgpu-z.exe /gpu:1 /sensor1:temp /sensor2:rpmpercent
would give you this result
Code:
85.0
41
1 day 4 hours 33 minutes 25 seconds
WorkStation03
It's very important there is only outputted raw numeric values on the two first lines, with . used for decimal point (not comma)

To create an exe that could be used for many other applications (and not only MRTG) perhaps just make it output a single value, and not pre-formatted for MRTG?

There already exists a similar command line exe for SpeedFan, and it would be so neat to have one for GPU-Z as well.
See my example graphs here...
Server: http://demux.net/mrtg/deckard/summary.html
Workstation: http://demux.net/mrtg/tyrell/summary.html



EDIT: GPU-Z would need an option for starting minimized (sys tray) so you can put GPU-Z in the startup folder.

Last edited by Irios; Apr 12, 2012 at 12:33 PM.
Irios is offline  
Reply With Quote
Old Apr 12, 2012, 08:02 PM   #2
JohnnyUT
5 Posts
 
Join Date: Jul 2008
Posts: 7 (0.00/day)
Thanks: 0
Thanked 4 Times in 4 Posts

Hi, I could write this for you. However, as far as I know, there is no possibility to select the GPU. An .exe file could just access the data that GPU-Z is currently displaying, which is the data of the currently selected GPU in GPU-Z.

@EDIT: Try to set "execution" to "minimized" in the "properties" of GPU-Z's link in the startup folder. This might work.
JohnnyUT is offline  
Reply With Quote
The Following User Says Thank You to JohnnyUT For This Useful Post:
Old Apr 12, 2012, 08:28 PM   #3
W1zzard
Benevolent Dictator
 
W1zzard's Avatar
 
Join Date: May 2004
Location: Stuttgart, Germany
Posts: 13,873 (4.17/day)
Thanks: 184
Thanked 10,454 Times in 3,219 Posts
Send a message via ICQ to W1zzard Send a message via AIM to W1zzard Send a message via MSN to W1zzard Send a message via Skype™ to W1zzard

System Specs

gpuz has a -card parameter that selects the card on startup.

e.g.
Code:
gpu-z.exe -card 1
the first card is 1, the second card is 2, and so on

for minimized, this should work:
W1zzard is offline  
Reply With Quote
Old Apr 12, 2012, 08:56 PM   #4
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

Quote:
Originally Posted by JohnnyUT View Post
Hi, I could write this for you. However, as far as I know, there is no possibility to select the GPU. An .exe file could just access the data that GPU-Z is currently displaying, which is the data of the currently selected GPU in GPU-Z.

@EDIT: Try to set "execution" to "minimized" in the "properties" of GPU-Z's link in the startup folder. This might work.
I didnt even take into consideration using start with the minimized argument as I figured it would simply minimize to the task bar, but I see that GPU-Z is actually minimized to the sys tray

So the contents of the shared memory depends on what gpu is active in the GUI hmmm
Maybe the developer could implement a feature that allows several GPUs to be active?

Or maybe this solution....
I've noticed you can have more than one instance of GPU-Z.
What happens if you have two instances of GPU-Z...? Would this program that reads the shared memory know the differences between these two instances if they have different process names (i.e. renamed the GPU-Z exe)? Maybe have a command line argument for the readgpu-z program so you can select the correct instance. (i.e. /instance:gpu-z-2.exe)

Does shared memory contain all the data being read from the gpu, or only the current tab?

I would be very grateful for help with this.
Also, I'm quite sure your program would be quite popular among MRTG Windows users
Irios is offline  
Reply With Quote
Old Apr 12, 2012, 09:32 PM   #5
JohnnyUT
5 Posts
 
Join Date: Jul 2008
Posts: 7 (0.00/day)
Thanks: 0
Thanked 4 Times in 4 Posts

As far as I can tell, there's only one shared memory "slot" and only data of one GPU fits into this slot at the same time. At least it has been like this 4 years ago. At this time I had 2 GPUs myself and I "fixed" this issue by running 2 GPU-Z instances at the same time and by periodically reading the data from the shared memory. It was totally random, which core's data was in the shared memory when I read it. However, since one GPU core had 900 Mhz and the other had 901 Mhz, I managed to distinguish the read data by this single difference.

I don't know if there is some special data value in GPU-Z's shared memory that uniquely identifies the GPU or core. Maybe W1zzard can tell us. If there was such a value, I could build some workaround that would work as follows:

-) Program A periodically reads from the shared memory and stores the data with the clearly identified GPU/core. This program has to run in the background.
-) Now you can call program B with a parameter indicating which GPU's value you want to output. This program gets the latest value from program A and produces the output that you want.

In the mean time, I've created the tool you asked for without multi GPU support. You can download it here:

http://www.file-upload.net/download-...dgpuz.zip.html

You have to put both, the .exe and the .dll file into the same folder, otherwise it won't work. If you encounter problems, you might be missing the required .NET Framework Runtime 4, which you can download for free here:

http://www.microsoft.com/download/en....aspx?id=17718

Feel free to ask if anything isn't working as intended.

Last edited by JohnnyUT; Apr 12, 2012 at 10:31 PM.
JohnnyUT is offline  
Reply With Quote
The Following User Says Thank You to JohnnyUT For This Useful Post:
Old Apr 12, 2012, 09:59 PM   #6
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

Holy cow, JohhnyUT, that was fast
Superthanks!

I'm doing some testing now, poking and probing your readgpuz.exe in a shell to see what comes out of it. And so far it's looking perfect

A minor cosmetic thing... I see you're truncating some of the values rather than doing a proper rounding.
For example VDCC 0,8750 becomes 0.87 in the output.
To be honest, dont be afraid of showing the whole value with all it's decimals.

Ok, for this thing to run you must have the whole .NET Framework Runtime 4 to be installed? I havent got a system here without this installed, so I'm not to able to test to see if it works without it.
(I'm working on a comprehensive FAQ/HOWTO on running MRTG on Windows, and this is useful information to put there.)
Irios is offline  
Reply With Quote
Old Apr 12, 2012, 10:11 PM   #7
JohnnyUT
5 Posts
 
Join Date: Jul 2008
Posts: 7 (0.00/day)
Thanks: 0
Thanked 4 Times in 4 Posts

Yeah, i truncated the output to 2 digits after the comma for simplicity, but i can adjust it to show all digits, if you like.

Yes, .NET Framework Runtime 4 is absolutely necessary, as the tool is programmed in C# for this specific version. However, as no special .NET 4 and 3 features are required, I could also drop the requirement to .NET 2, if requested. But it shouldn't be such a big deal, as .NET 4 is quite widespread.
JohnnyUT is offline  
Reply With Quote
Old Apr 12, 2012, 10:11 PM   #8
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

Runnnig readgpuz.exe without any arguments is done in a jiffy - but it takes quite a long time for the program to do it's job when you use arguments. Maybe a whole second or so. When grabbing a bunch of GPU-Z values sequentially in a bat file it takes a while to finish (and it it might create some timing issues when I'm running this script on a remote remotely system.)
Why does it take less time for it to output all the values in the summary compared to only outputting two values?


EDIT: ok thanks for the .NET info, much appreciated
Irios is offline  
Reply With Quote
Old Apr 12, 2012, 10:32 PM   #9
JohnnyUT
5 Posts
 
Join Date: Jul 2008
Posts: 7 (0.00/day)
Thanks: 0
Thanked 4 Times in 4 Posts

You are right, this is strange. I did some tests and the reason for the delay is the request for the system uptime. I managed to make the request faster, so now the delay should be gone. I changed the download link in the post above.
JohnnyUT is offline  
Reply With Quote
The Following User Says Thank You to JohnnyUT For This Useful Post:
Old Apr 12, 2012, 11:12 PM   #10
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

Yeah the delay is gone
I'm currently using your program on my system... gonna play some rounds of BF3 to get some pretty graphs.
I'll post some graphs in a little while to show what the results are.

A small note on using the minimze argument on GPU-Z... it only minimizes to the task bar, and not straight to the sys tray, like suspected.
Irios is offline  
Reply With Quote
Old Apr 13, 2012, 01:13 AM   #11
Irios
5 Posts
 
Join Date: Apr 2012
Posts: 6 (0.01/day)
Thanks: 3
Thanked 1 Time in 1 Post

Ok, here are some graphs.

http://demux.net/mrtg/tyrell/summary_gpu.html

Data is collected every 5 mins, and graphs are generated and updated automatically.
At the time of writing this, the script has only been running for two hours while playing some BF3 (without vertical sync to push the GPU a little harder than usual) and doing some websurfing, so there's not much stuff there.
This workstation is turned off at night - and while the system is off, the server automatically stops collecting data - that's why there are 'gaps' with zero values in the graphs.
('GPU Temp' data is provided by SpeedFan)

EDIT: Another page showing more stats from my workstation: http://demux.net/mrtg/tyrell/summary.html

Last edited by Irios; Apr 13, 2012 at 01:57 AM.
Irios is offline  
Reply With Quote
The Following User Says Thank You to Irios For This Useful Post:
Old Apr 13, 2012, 01:50 AM   #12
streetfighter 2
1000 Posts
 
streetfighter 2's Avatar
 
Join Date: Jul 2010
Location: Philly
Posts: 1,599 (1.51/day)
Thanks: 1,004
Thanked 765 Times in 539 Posts

System Specs

Cool thread.

I use the ADL SDK in my own monitoring tool. Check it out:
nVidia - http://developer.nvidia.com/nvapi
AMD - http://developer.amd.com/sdks/ADLSDK/Pages/default.aspx
streetfighter 2 is offline  
Reply With Quote
The Following User Says Thank You to streetfighter 2 For This Useful Post:
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GPU-Z Shared Memory Layout W1zzard GPU-Z 31 Jan 6, 2013 04:37 PM
GPU-Z.0.5.5.exe: Read from location 003d644a caused an access violation. Fa3Ixy GPU-Z 1 Sep 6, 2011 02:56 PM
C# Shared Memory GPU-Z symbiote_venom GPU-Z 0 Mar 30, 2011 07:54 AM
Lots of Shared Memory Questions John Phoenix Graphics Cards 33 May 17, 2010 09:49 AM
ATITool Shared Memory Info!? Smiko ATITool 2 Nov 13, 2005 07:51 AM


All times are GMT. The time now is 11:48 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
no new posts