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

Feature request: centralized database logging

Joined
Jul 13, 2015
Messages
3 (0.00/day)
Location
Seattle, WA
GPUZ is great as a standalone utility, but it could easily be enhanced to log data to a centralized database as well. Would you please consider adding this feature:

Settings:
  1. Database logging checkbox; when checked:
    1. Database type (maybe just a connection string and an icon link to connectionstrings.com for add'l info)
    2. Database location (server, instance name, etc.)
    3. Login, typically userid + pswd, but could include checkbox if using a network acct (e.g. ActiveDirectory)
    4. Database name (with default of GPUZ)
    5. Frequency of data pushes (realtime, 60s, hourly, etc.)
If need be, I could assist with the coding or send you a C# SQL class I often use for utilities of my own, complete with script to create the database and a login. If you're coding in Java, a C# translation isn't difficult, C++ is a bit more involved. My databases are SQL Server; if you prefer mysql, postgresql, etc., your mileage may vary. :)
 

W1zzard

Administrator
Staff member
Joined
May 14, 2004
Messages
27,049 (3.71/day)
Processor Ryzen 7 5700X
Memory 48 GB
Video Card(s) RTX 4080
Storage 2x HDD RAID 1, 3x M.2 NVMe
Display(s) 30" 2560x1600 + 19" 1280x1024
Software Windows 10 64-bit
Write some kind of wrapper that pulls the data from GPU-Z shared memory and writes it to your database?
 
Joined
Jul 13, 2015
Messages
3 (0.00/day)
Location
Seattle, WA
The exact method depends on how the GPUZ code is designed. I often use a C# class which is a 1-line addition to any .NET app, but the code could easily be ported to another language, e.g. C++ or Java. (I don't know what GPUZ uses.) My class uses a config file setting for database redirection, else it defaults to LOCALHOST. I could provide scripts to create a SQL Server database called GPUZ, a stored procedure to call to log stats, another sproc to query for logged stats, and a login+user to make the database connection. My class already has wrappers around the actual database calls, exception handling, and even some support classes for easy manipulation of returned recordsets (i.e. collection objects, and serializers for TXT, CSV, TSV, JSON, and HTML).

My class isn't needed, it's just convenient. In fact, most of the support classes aren't intended for high-performance usage. The core code, however, is robust and efficient.

The advantage of using a database is so the code can store data in a centralized location, keyed by machine name + timestamp, so it's easily queried for monitoring and reporting purposes.

Again, I only suggest SQL Server because there's a free version, it's reliable, and easy to maintain. (It's also better optimized for write/edit than mysql, though postgresql is as well, although I haven't coded with it for eons.)
 

Aquinus

Resident Wat-man
Joined
Jan 28, 2012
Messages
13,147 (2.94/day)
Location
Concord, NH, USA
System Name Apollo
Processor Intel Core i9 9880H
Motherboard Some proprietary Apple thing.
Memory 64GB DDR4-2667
Video Card(s) AMD Radeon Pro 5600M, 8GB HBM2
Storage 1TB Apple NVMe, 4TB External
Display(s) Laptop @ 3072x1920 + 2x LG 5k Ultrafine TB3 displays
Case MacBook Pro (16", 2019)
Audio Device(s) AirPods Pro, Sennheiser HD 380s w/ FIIO Alpen 2, or Logitech 2.1 Speakers
Power Supply 96w Power Adapter
Mouse Logitech MX Master 3
Keyboard Logitech G915, GL Clicky
Software MacOS 12.1
Write some kind of wrapper that pulls the data from GPU-Z shared memory and writes it to your database?
To the OP: This is the generic way of doing it, as it lets you do anything with the data whenever you want it which requires W1zz to do zero work. So to play devil's advocate, why would this need to exist in GPU-Z when it could be another application that simply reads shared memory? I like the idea of logging to a database but, most people aren't going to have a SQL server installed. If you wanted to do this right, I would support several different kinds out of the box (if they're installed,) but being able to fallback on something like SQLite incase nothing is available. Personally I like PostgreSQL and think it's one of the best options RDBs but, has a steeper learning curve than MySQL.

@W1zzard : Do you have any documentation on that shared memory for the OP and for the benefit of the thread if you do?
 
Joined
Jul 13, 2015
Messages
3 (0.00/day)
Location
Seattle, WA
Devil's advocate 2.0: why 2 apps? That'd be like having a separate app to log data in the 1st place. I'm simply suggesting a centralized storage facility using industry standards.

Does GPUZ have a plugin interface? That's a much better standard to follow.

2 apps sharing RAM... That sounds only slightly better than porcupines mating. :)
 
Top