Download
Well, since this documentation comes in the plugin download package, you should already have the plugin itself. Anyway, if you need the download link, here it is: HWiNFO32 & HWiNFO64 plugin for Samurize (ext. link). Feel free to coment, share, etc.
When you download the plugin from that link, you should see the plugin itself (.dll file) and a folder called 'documentation' (with... well... this documentation)
What is HWiNFO32/64?
More info here: HWiNFO (ext. link)
What is Samurize?
More info here: Samurize (ext. link).
So, what do we have here?
A simple plugin (.dll file) that lets Samurize to read values from HWiNFO shared memory.
Why to try it?
Well. Samurize is great for hardware monitoring, we all know that. And you can expand its features through plugins that relays in other programs. Problem is that you need all those programs running in the background to keep Samurize reading the values.
You can also use a program that reads a lot of info and that have either shared memory or WMI support. However, they are not so easy to find. And when you find any of them, you'll probably realise that they tend to be a bit heavy, some are not freeware, some lacks on sensors and some of them even block access to some sensors.
Then I found HWiNFO, a free software that reads a lot of hardware sensors. I can tell it's one of the most complete software I have tried in that respect: number of sensors reported. It's also quite lightweight (specially in 'Sensors only' mode).
So, HWiNFO is a free, lightweight, hardware reporting/monitoring/benchmarking tool that has x86 and x64 versions (HWiNFO32 and HWiNFO64 respectively) and also with installable and portable versions. Furthermore, since version 3.83, the software has a shared memory feature. What does that mean? That you can read its sensors from another program. Here is where Samurize comes on.
And this is the documentation that will teach you how to install and use the plugin. The documentation itself should be pretty easy to use. Just four sections you can navigate with the above menu. Nothing special.
Thanks to
Before ending that section, I wish to thank some people that helped me creating this plugin:
- Martin Malik: he's the creator of the amazing HWiNFO software. He actually helped a lot telling me exactly how to read the shared memory.
- Tropical: moderator in the Samurize forums, he had a good C++ reference thread in the above-mentioned forums. So he helped me even though he may not know.
- Tommy_2Tall: user in the Samurize forums, he posted a very useful DLL template compatible with Samurize for Dev C++, the IDE I use.
Requirements
Of course, you need HWiNFO32 or HWiNFO64. And also Samurize. But there are a bit more requirements.
- Samurize: I only tested the plugin with Samurize 1.64.3 so I can't give any support to previous versions.
- HWiNFO:
- The plugin should be compatible with both x86 and x64 versions of HWiNFO since they use, as far as I know, the same share memory structure. I only tested it with HWiNFO64, though.
- You need version 3.83 or above. Previous versions didn't have the shared memory feature yet.
- Ensure that the 'Shared memory support' check is enabled in the 'Configure' window (I'm not 100% sure but I think this only applies if you use HWiNFO 3.96 or above, as previous versions had the shared memory feature always enabled; I'll try to confirm this with HWiNFO developer)
- Ensure that the 'Sensors' window is opened (or in the background/tray) and that the sensors you want to read are enabled in the Sensor Display Config (press 'Configure' button at the bottom of the sensors window to change what sensors do you want; more about this in the 'Tips' section).
Installation
Just drop the hwinfo64.dll (don't get confused with the '64' in the name, it should also work with HWiNFO32) in your /Samurize/plugins/ folder.
Yes, just that easy. Uninstallation is... yes, you guessed it. Delete the hwinfo64.dll inside your /Samurize/plugins/ folder.
First of all
Be sure that you meet the above-mentioned requirements (see previous section, 'How to install'). I'll try to explain step-by-step how to create a plugin meter and configuring it.
When you are ready, open your Samurize config file or make a new one. I found useless to provide a sample config file since every computer's hardware may (and will) vary and a meter using this plugin configured in my computer may not be valid in yours.
Using the plugin functions.
Once you're inside the config file, clic the 'Add meter', then select 'Plugins' and select 'hwinfo64.dll':
![[image not found]](img/step01.png)
Somewhere in your work area will appear this:
![[image not found]](img/step02.png)
Now in the right part of Samurize config tool, you will see this:
![[image not found]](img/step03.png)
As you can see, there are four available functions to select in the 'Select function to run' section.
GetAll
This step is optional but I strongly recommend to use GetAll before even trying the other functions. When you select it, a prompt will appear, asking you for a filename (note that if you specify a path, it must exist, as the plugin will not be able to create it):
![[image not found]](img/step04.png)
After configuring that filename, clic the 'Test Function' button. This function will create a plain text file with a list of your hardware and, what is more important, the ID numbers that identify each sensor and subsensor. It may sound a bit tricky or abstract but let's take a look at the HWiNFO sensors window:
![[image not found]](img/step05.png)
In this case, I'm showing only part of my HWiNFO sensors window, specifically my graphics card sensor set.
- The red squared part is the sensor set itself.
- The green squared part contains all the different sensors inside that sensor set.
- The blue squared part contains the sensor types (temperature, voltage, fan, usage) for each sensor.
Now let's compare it with the text file created by the GetAll function.
![[image not found]](img/step06.png)
You can see the parallelism, don't you?
GetLabel / GetValue / GetUnit
Now let's take the next step: showing labels, values and units with GetLabel, GetValue and GetUnit functions. Actually, I'll only show one of the functions; all have esentially the same structure, ask for the same number and kind of parameters. The only difference is the kind of value they return. For instance, GetLabel would return 'Vcore', GetValue would return '1.126' and GetUnit would return 'V'.
Those are the three parameters that the functions ask for when you select one of them:
![[image not found]](img/step07.png)
![[image not found]](img/step08.png)
![[image not found]](img/step09.png)
The first parameter, sensor index, corresponds to:
- The Sensor ID in the plain text file created by the GetAll function
- The red squared part in the HWiNFO sensors window screenshot.
The second parameter, subsensor type, corresponds to:
- The Subensor type in the plain text file created by the GetAll function
- The green squared part in the HWiNFO sensors window screenshot.
The third parameter, subsensor index, corresponds to:
- The Subsensor ID in the plain text file created by the GetAll function
- The blue squared part in the HWiNFO sensors window screenshot.
An example. According to the previous screenshots, if we want to show the GPU voltage, we will enter 10, 1 and 0 as parameters. If you input wrong parameters, the functions will return 'Invalid parameter'. If HWiNFO sensors window is not running, the functions will return either 'Invalid parameter' or 'Error: HWinfo32/64 sensors not running'
And that's all. Now it may seem tricky or even hard. I'll try to make the plugin more 'user-friendly' in future versions.
HWiNFO
These are some recommendations regarding to HWiNFO:
- Startup settings: I suggest to use HWiNFO in 'Sensors only' mode. It will be lighter, specially with version 3.96 and above, since 'Sensors only' mode was optimized to use a bit less resources.
To change this, when you first open HWiNFO, a dialog box should appear. At the bottom left part of that dialog box, the 'Sensors only' checkbox should appear.
Also in that first dialog box, a 'Configure' button will let you change settings like 'Auto start' (HWiNFO starts when Windows loads), 'Start minimized' (program automatically goes to tray when it starts) and that kind of stuff, you know. - Sensors window optimization: You can select what sensors to monitor. For instance, if you don't need to monitor voltages, I recommend you to disable the monitoring feature for those sensors. That's quite easy. Just open your HWiNFO sensors window and you'll have two options:
- Right clic on the sensor you want to disable. Then select 'Disable monitoring' in the contextual menu. Right clic again on that sensor and now select 'Hide'. In version 3.96 and above (I think) you can just select 'Hide' and the 'Disable monitoring' will also be disabled at the same time.
- Left clic on the 'Configure' button so the 'Sensor display config' window will appear, select the sensor you want to disable and uncheck the 'Show reading' checkbox (it's to the right part of the 'Sensor display config' window. This should disable both 'Show reading' and 'Sensor monitoring enabled' checkboxes at the same time.
- Scan interval: In the above-mentioned 'Sensor display config' window, you can also set the 'Scan interval'. I suggest you to use about 1000ms. Depending on CPU and how many sensors are being monitored, very low values will probably rise CPU usage too much.
This will decrease CPU and RAM usage. In my particular case, I'm hidding 53 values that I don't need and, although still showing about 30 values, CPU usage is minimal (0% most of the time, with very sporadic 'peaks' of 1%, according to what appears in Windows' task manager window). If I leave all sensors active, it ramps CPU usage up to 9% sometimes.
RAM usage is also very low, under 10 MB.
Samurize
These are some recommendations regarding to Samurize:
- GetAll function: If you have read the previous section, you have learnt to use GetAll function in order to create a file with sensor sets indexes, sensor types and sensor indexes. It's very useful, in order to know what parameters to use with GetLabel and GetValue functions. Just a couple of things to bear in mind.
- If you changed the HWiNFO active sensors (see the HWiNFO tips, second tip 'Sensors window optimization'), close and open HWiNFO, then delete the plain text file created with GetAll and create it again.
- Once you have the appropiate text file, just delete the meter that uses the GetAll function. If you test your config with Samurize itself, every meter using the GetAll function will continue appending (yes, appending!) the same info to the file again and again and again.
- Meters 'Refresh interval':
- If you are using the GetLabel function or the GetUnit function, you can set the 'Refresh interval' very high because the label itself will not change too much (you can change a sensor's label in HWiNFO sensors window, but this won't be happening too often, I suppose).
- If you are using the GetValue function, set the 'Refresh interval' equal to the 'Scan interval' you configured in HWiNFO to not waste resources. If you set it lower than 'Scan interval' in HWiNFO, you're wasting Samurize resources since it will try to refresh data that is not changed so quick by HWiNFO. If you set it higher than 'Scan interval' in HWiNFO, you're wasting HWiNFO resources since it's refreshing values quicker than Samurize.
- 'Error: HWinfo32/64 sensors not running': If you get this error and HWiNFO sensors window are running, you probably opened HWiNFO after opening Samurize (Client and/or Config). Just close Samurize (Client and/or Config) and reopen it.
License
The plugin is completely freeware. If anyone asks you for money to get the plugin, kill him/her. Just kidding. Insulting him/her should be enough and will work as well.
Warranty
Also want to make it clear: I provide the plugin 'as is'. That means, with no warranties. I can't assure that the thingy will be working flawlessly in your system. If your computer explodes while using this plugin, I'm really sorry, believe me, but I can't take any responsibility.
Joking apart, if you have any problem with the plugin itself (neither HWiNFO nor Samurize problems), ask for it in a polite way and, if it doesn't fall beyond my knowledge and possibilites, I'll try to help you.
To have support, just open a thread in the appropiate Samurize subforum. I'll make it easy: Samurize srcipt/plugin support subforum (ext. link)
And please, read the whole documentation before asking anything. I think it's quite fair.