[SOLVED] Available VRAM From SIV Plugin

Help with creating, editing & fixing problems with skins
User avatar

[SOLVED] Available VRAM From SIV Plugin

November 21st, 2017, 9:31 pm
StArL0rd84
   [227 posts]

Hi, i am experimenting with the plugin for SIV system monitoring software.
Things are going well and i can monitor the VRAM currently in use by my video card.
But for the bar meter i wan't to make, i need a max value.
My GPU has 8 gigs available, and SIV can detect this.
BUT, the way the plugin see's it, is in a long line which i suspect is a string and not a number value.
vram.png

1. Current = The current value [Default]
2. Average = The average value
3. Minimum = The minimum value
4. Maximum = The maximum value
5. String = Can use this when the measure is a pure string such as NodeName, Username etc...For numerical measures it gives you a comma separated string of the four values (Cur,Avg,Min,Max) as provided by SIV to my plugin. It can be used to see what SIV provides as raw input in case of problem or if you want to decode it yourself in Rainmeter in case of new measure format provided by SIV.

No option to just grab the available VRAM :(

The measure looks like this:

Code: Select all

[mgpuvram]
 Measure=Plugin
 Plugin=SIV
 SivKey=GPU-0-B
 Sensor=L
 SivType=String


I wonder if i could use RegExpSubstitute to extract the number eight from that line and discard everything else.
But then, would i even be able to use that number in a calc measure? Is it a sting, and not a real number?
Looked over the documentation for RegExpSubstitute, but it is just beyond my skills at this time.

https://forum.rainmeter.net/viewtopic.php?f=18&t=25097
Sadly the author is not active on his thread, so i thought i would give it a shot and ask here...
Last edited by StArL0rd84 on November 22nd, 2017, 4:10 pm, edited 1 time in total.
User avatar

Re: Available VRAM From SIV Plugin

November 22nd, 2017, 2:43 am
eclectic-tech
Rainmeter Sage   [2325 posts]

Try these 2 lines in the [mgpuvram] section:

Code: Select all

 RegExpSubstitute=1
 Substitute="^.*,(.*)\.(.*)$":"\1"
This will return the string "8". Then to convert the string to a number, simply put it in a Calc measure:

Code: Select all

[GPUNumber]
Measure=Calc
Formula=[mgpuvram]
The calc measure always returns the number value; the number value of the string measure [mgpuvram] is 8. [GPUNumber] measure's value is a number and can be used in other calculations.

Hope this helps.
User avatar

Re: Available VRAM From SIV Plugin

November 22nd, 2017, 4:09 pm
StArL0rd84
   [227 posts]

eclectic-tech wrote:Try these 2 lines in the [mgpuvram] section:

Code: Select all

 RegExpSubstitute=1
 Substitute="^.*,(.*)\.(.*)$":"\1"
This will return the string "8". Then to convert the string to a number, simply put it in a Calc measure:

Code: Select all

[GPUNumber]
Measure=Calc
Formula=[mgpuvram]
The calc measure always returns the number value; the number value of the string measure [mgpuvram] is 8. [GPUNumber] measure's value is a number and can be used in other calculations.

Hope this helps.


Thank you eclectic-tech, that worked. :thumbup:
Cant wait till i learn RegExpSubstitute, awesome tool.
And it's good to know i can treat string numbers in a calc measure.

Return to “Help: Rainmeter Skins”



Who is online

Users browsing this forum: No registered users and 3 guests