fludd Posted October 28, 2020 Share Posted October 28, 2020 (edited) Hi there! Just a quick feature request here: It would be great, if you added a RAM usage widget. I don't know, if this software is written in C++ or anything else, but you could use this to get the values and create a widget just like the cpu percentage widget. It might even help you in the quest of the search for the cpu usage problems in the icue software. Just create an instance of the object below and call the needed functions as few times as possible to save clock cycles. // system_stats.h #pragma once #include "TCHAR.h" #include "pdh.h" #include "windows.h" class SystemStats { public: SystemStats(); int currentCpuUsage(); int currentRamUsageInPercent(); int freeMemoryInPercent(); private: PDH_HQUERY cpuQuery; PDH_HCOUNTER cpuTotal; }; // system_stats.cpp #include "system_stats.h" SystemStats::SystemStats() { PdhOpenQuery(NULL, NULL, &cpuQuery); PdhAddEnglishCounter(cpuQuery, L"\\Processor(_Total)\\% Processor Time", NULL, &cpuTotal); PdhCollectQueryData(cpuQuery); } int SystemStats::currentCpuUsage() { PDH_FMT_COUNTERVALUE counterVal; PdhCollectQueryData(cpuQuery); PdhGetFormattedCounterValue(cpuTotal, PDH_FMT_DOUBLE, NULL, &counterVal); return (int)counterVal.doubleValue; } int SystemStats::currentRamUsageInPercent() { MEMORYSTATUSEX memInfo; memInfo.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&memInfo); return memInfo.dwMemoryLoad; } int SystemStats::freeMemoryInPercent() { return 100 - currentRamUsageInPercent(); } Edited October 28, 2020 by fludd Link to comment Share on other sites More sharing options...
Zone55555 Posted February 23, 2021 Share Posted February 23, 2021 +1 for this. I just set up my new K100 and iCue Nexus today and was kind of shocked there wasn't a memory usage widget. Or if there is, it's well hidden. :) Link to comment Share on other sites More sharing options...
Daddy Cool Posted August 26 Share Posted August 26 Three years later and not much happening with widgets. Do Corsair expecting third party developers to make the Nexus get going? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now