1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

GPU-Z Shared Memory Layout

Discussion in 'GPU-Z' started by W1zzard, Jul 9, 2008.

  1. SirReal New Member

    Joined:
    Jul 5, 2010
    Messages:
    3 (0.00/day)
    Thanks Received:
    1
    The structure just contains name-value pairs, and so does not limit itself to one GPU.
    For more details, I suggest you contact the author of GPU-Z.
     
  2. pengtianlei New Member

    Joined:
    Sep 25, 2012
    Messages:
    2 (0.00/day)
    Thanks Received:
    0
    how to get free video card memory

    Hello!I want to know, How can I get how much video card I have used.
    My application use C++ Language. I want to get the Free physical video card, like Gpu-Z.
    Do you have suggestion?
     
  3. Chevalr1c

    Chevalr1c

    Joined:
    Sep 3, 2010
    Messages:
    3,295 (2.13/day)
    Thanks Received:
    1,464
    Location:
    NL, Europe
    Sorry but what is that supposed to mean?
     
    Crunching for Team TPU
  4. pengtianlei New Member

    Joined:
    Sep 25, 2012
    Messages:
    2 (0.00/day)
    Thanks Received:
    0
    Video Memory

    Thanks for your reply.
    I mean, How can I get how much video memory I have used.

    Like Software GPU-Z.(Memory Usage (Dedicated))
     
  5. Brusfantomet

    Joined:
    Mar 23, 2012
    Messages:
    184 (0.19/day)
    Thanks Received:
    38
    Location:
    Norway
    I am guessing that its not possible to get someone to explain how GPU-z gets the temps, but is it possible for it to start in minimized mode ?.

    I am guessing that what SirReal says still holds true, one instance of GPU-z now gives you the temps of all your GPUs
     
  6. W1zzard

    W1zzard Administrator Staff Member

    Joined:
    May 14, 2004
    Messages:
    15,013 (3.90/day)
    Thanks Received:
    11,879
    There is not a single way, it depends on the card, OS, driver etc.

    GPU-Z has a -minimized command line parameter you can use.
     
    Brusfantomet says thanks.
  7. Brusfantomet

    Joined:
    Mar 23, 2012
    Messages:
    184 (0.19/day)
    Thanks Received:
    38
    Location:
    Norway
    ok, thank you
     
  8. Ganesh_AT New Member

    Joined:
    Dec 15, 2013
    Messages:
    4 (0.01/day)
    Thanks Received:
    0
    Edit: W1zzard has already answered this in the other thread here: http://www.techpowerup.com/forums/t...-gpu-z-shared-memory-update-frequency.195840/

    I am using the shared memory [ currently with a DLL built with the code here: https://github.com/JohnnyUT/GpuzShMem , but have a newer version coming up with that dependency removed, and using some code modified from here: http://www.techpowerup.com/forums/threads/gpu-z-shared-memory-class-in-c.164244/#post-2605403 ] in my freeware project 'Remote Sensor Monitor'.

    Details about the project can be found here:

    http://www.hwinfo.com/forum/Thread-Introducing-Remote-Sensor-Monitor-A-RESTful-Web-Server

    I am posting in this thread with reference to some 'discrepancies' I observed in the shared memory update frequency. I was assuming it could be polled every second. I have a Perl script running on a client machine accessing the GPU-Z shared memory values over HTTP based on this polling interval. A sample debug output of that script is below. The values in the CSV file lines are: 'lastUpdateTime' from GPU-Z shared memory converted to 'seconds' from 'milliseconds', GPU load and GPU power consumption. The line next to it has parameters from the client machine: Elapsed refers to the amount of time in seconds between the time the request to the shared memory was sent over the network to the time it took for the data to come back (this includes network delays etc.). Usually, it is between 10ms to 250ms, skewed towards lower delays. The SleepInterval number corresponds to the time after which the next request to the shared memory is placed on the network.

    Code:
    Enqueueing to CSV File : , 331202, 0.002799, 0.046480
    Elapsed: 0.022736, SleepInterval: 0.977264
    Enqueueing to CSV File : , 331202, 0.002799, 0.046480
    Elapsed: 0.015493, SleepInterval: 0.984507
    Enqueueing to CSV File : , 331204, 0.001460, 0.047216
    Elapsed: 0.025459, SleepInterval: 0.974541
    Enqueueing to CSV File : , 331204, 0.001460, 0.047216
    Elapsed: 0.010567, SleepInterval: 0.989433
    Enqueueing to CSV File : , 331207, 0.000000, 0.000000
    Elapsed: 0.01458, SleepInterval: 0.98542
    Enqueueing to CSV File : , 331207, 0.000000, 0.000000
    Elapsed: 0.056981, SleepInterval: 0.943019
    Enqueueing to CSV File : , 331207, 0.000000, 0.000000
    Elapsed: 0.097846, SleepInterval: 0.902154
    Enqueueing to CSV File : , 331209, 0.001490, 0.046605
    Elapsed: 0.104709, SleepInterval: 0.895291
    Enqueueing to CSV File : , 331209, 0.001490, 0.046605
    Elapsed: 0.019662, SleepInterval: 0.980338
    Enqueueing to CSV File : , 331212, 0.000000, 0.000000
    Elapsed: 0.016406, SleepInterval: 0.983594
    Enqueueing to CSV File : , 331212, 0.000000, 0.000000
    Elapsed: 0.018795, SleepInterval: 0.981205
    Enqueueing to CSV File : , 331212, 0.000000, 0.000000
    Elapsed: 0.018195, SleepInterval: 0.981805
    Enqueueing to CSV File : , 331214, 0.000000, 0.000000
    Elapsed: 0.019669, SleepInterval: 0.980331
    Enqueueing to CSV File : , 331214, 0.000000, 0.000000
    Elapsed: 0.019537, SleepInterval: 0.980463
    Enqueueing to CSV File : , 331217, 0.000000, 0.000000
    Elapsed: 0.027269, SleepInterval: 0.972731
    Enqueueing to CSV File : , 331217, 0.000000, 0.000000
    Elapsed: 0.020597, SleepInterval: 0.979403
    Enqueueing to CSV File : , 331217, 0.000000, 0.000000
    Elapsed: 0.019204, SleepInterval: 0.980796
    Enqueueing to CSV File : , 331219, 0.000000, 0.000000
    Elapsed: 0.224437, SleepInterval: 0.775563
    Enqueueing to CSV File : , 331219, 0.000000, 0.000000
    Elapsed: 0.022575, SleepInterval: 0.977425
    Enqueueing to CSV File : , 331222, 0.000000, 0.000000
    Elapsed: 0.022621, SleepInterval: 0.977379
    Enqueueing to CSV File : , 331222, 0.000000, 0.000000

    I would expect the update time provided by GPU-Z in the shared memory to closely follow 1 second skips, but I see the parameters being repeated multiple times and the update time skipping by 2 or 3 seconds. I am wondering why I am unable to access updated values on a more frequent basis. I did face a similar issue (though not this much skew) with HWiNFO, which I solved by setting the scan interval to 900ms in the HWiNFO software. Any similar feature (or, any way to ensure I can read GPU-Z shared memory updated values every second) would be awesome to have.
     
    Last edited: Dec 18, 2013
  9. eFMer New Member

    Joined:
    Dec 28, 2013
    Messages:
    1 (0.00/day)
    Thanks Received:
    0
    Is the shared memory on the first page still valid.

    I'm added GPUZ to TThrottle http://www.efmer.eu/boinc/

    GPUZ_RECORD data[MAX_RECORDS]; seem to align properly.

    The following record GPUZ_SENSOR_RECORD sensors[MAX_RECORDS];

    Starts at address xxxx 10 according to the debugger.
    name 0x0000000002270010 "U Core Clock" wchar_t [256]

    But it's actually starting at 0x000000000227000B

    I can move the pointer 4 bytes back, but I like to know why. The only thing I can think of is that the data structure is somehow different, but that doesn't explain why the date is aligned as it should.

    Code:
    #define MAX_RECORDS 128
    
    typedef struct GPUZ_RECORD
    {
        WCHAR key[256];
        WCHAR value[256];
    }GPUZ_RECORD;
    
    typedef struct GPUZ_SENSOR_RECORD
    {
        WCHAR name[256];
        WCHAR unit[8];
        UINT32 digits;
        double value;
    }GPUZ_SENSOR_RECORD;
    
    typedef struct GPUZ_SH_MEM
    {
        UINT32 version;            // Version number, 1 for the struct here
        volatile LONG busy;        // Is data being accessed?
        UINT32 lastUpdate;        // GetTickCount() of last update
        GPUZ_RECORD data[MAX_RECORDS];
        GPUZ_SENSOR_RECORD sensors[MAX_RECORDS];
    }GPUZ_SH_MEM, *LPGPUZ_SH_MEM;
    It seems the alignment fails on the double value;

    I changed it to BYTE bValue[8];
    That holds the 64 bit double.

    Code:
        double dValue;
        memcpy(&dValue, lpMem->sensors[2].bValue, sizeof dValue);
    This generates the right double, a bit awkward, but Visual studio aligns the whole block when using a double.
     
    Last edited: Dec 29, 2013

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

Share This Page