Quantcast
Channel: Rainmeter Forums
Viewing all articles
Browse latest Browse all 1409

Help: Rainmeter Skins • Re: Monterey skin question

$
0
0
Just wondering how to fix this sensor if it needs fixing. Maybe it represents something else?
It appears the code that provides data to that part of the Monitor skin is located in the [Monterey]\@Resources\Scripts\Widgets\Monitor.inc file:

Code:

[NetBytes]Measure=PluginPlugin=UsageMonitorCategory=Network InterfaceCounter=Bytes total/secMinValue=0MaxValue=100UpdateDivider=(#BatterySaverMode# = 0 ? 10 : 20)OnChangeAction=[!UpdateMeasure NetRounded][NetWidth]Measure=PluginPlugin=UsageMonitorCategory=Network InterfaceCounter=Current bandwidthMinValue=0MaxValue=100UpdateDivider=3600OnChangeAction=[!UpdateMeasure NetRounded][NetRounded]Measure=CalcFormula=Round(Clamp(NetBytes * 8 / NetWidth * 100, 0, 100),0)MinValue=0MaxValue=100IfCondition=(NetMeasure < #YellowStarts#)IfTrueAction=[!SetVariable NetColor #GreenColor#]IfCondition2=(NetMeasure >= #YellowStarts#) && (NetMeasure < #RedStarts#)IfTrueAction2=[!SetVariable NetColor #YellowColor#]IfCondition3=(NetMeasure >= #RedStarts#)IfTrueAction3=[!SetVariable NetColor #RedColor#]OnChangeAction=[!CommandMeasure NetAnimation "Stop [&ActionList]"][!CommandMeasure NetAnimation "Execute [&ActionList]"][NetMeasure]Measure=CalcFormula=#NetValue#MinValue=0MaxValue=100DynamicVariables=1[NetAnimation]Measure=PluginPlugin=ActionTimerActionList1=Repeat AddStep, 100, 10ActionList2=UpdateAddStep=[!SetVariable NetValue ([#NetValue]+([&NetRounded:]-[#NetValue])/2)][!UpdateMeasure NetMeasure]Update=[!SetVariable NetValue [&NetRounded:]][!UpdateMeasure NetMeasure]DynamicVariables=1
Didn't test the skin, but the first 2 measures make it clear that they retrieve their data from Windows Performance Monitor (perfmon.exe or perfmon.msc):
PerfMon Network.jpg
The screenshot above was taken at a close to maximum transfer rate over the WiFi, at around 10 MB/s (more or less the Bytes Total/sec, in this case). Yet, that amount, even multiplied by 8 as per the [NetRounded] Formula option in the above code in order to match the Bit (i.e. not Byte) unit for the bandwidth, still pales in comparison to the (total, since no Name option exists in those UsageMonitor measures to get data for a specific interface) Current Bandwidth value (in my case 10073628.410 * 8 = 80589027.280 divided to 1215752192 + 144400000.000 = 1360152192 to give 0.05925 or 5.925%).

If that's the case for you too, and the sum of the bandwidth of all your network interfaces in perfmon.exe dwarfs 8 times the bytes total per second for what is mostly a single active / transferring network interface, that would explain the result in the skin (didn't bother to check how and if other measures affect the value, but I reckon that if they do is not significant). The solution would be to add the proper Name option in the UsageMonitor measures (the equivalent of Instance in perfmon.exe, i.e. the bold-ed column headers at the top left in the screenshot) in order to indicate a single network interface to get data for, presumably the interface you're using to connect to the internet.

Statistics: Posted by Yincognito — Today, 2:54 am



Viewing all articles
Browse latest Browse all 1409

Trending Articles