It is currently October 26th, 2021, 6:47 pm

Net measure documentation for v4.5.3

Discussion about the documentation, main Rainmeter site and forums.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1632
Joined: March 23rd, 2015, 5:26 pm

Net measure documentation for v4.5.3

Post by SilverAzide »

Just wanted to point out the docs for the Net measure may need to be updated.
Interface, Default: 0
Identity of the network interface controller (NIC) to measure.

This can be defined in one of several ways:
  • The string value Best, which will automatically detect the active interface.
  • The name of the network interface controller. For example, Qualcomm AR938x Wireless Network Adapter.
  • The index number of the network interface controller. If set to 0, (default) all interfaces are measured.
If I recall correctly, the new default is actually "Best", and "0 (default) all interfaces are measured" is not even a thing anymore, right?
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net measure documentation for v4.5.3

Post by jsmorley »

SilverAzide wrote: September 28th, 2021, 1:07 am Just wanted to point out the docs for the Net measure may need to be updated.



If I recall correctly, the new default is actually "Best", and "0 (default) all interfaces are measured" is not even a thing anymore, right?
You are right. I'm on it... Thanks!
User avatar
SilverAzide
Rainmeter Sage
Posts: 1632
Joined: March 23rd, 2015, 5:26 pm

Re: Net measure documentation for v4.5.3

Post by SilverAzide »

jsmorley wrote: September 28th, 2021, 1:08 am You are right. I'm on it... Thanks!
It just occurred to me... if you do use Interface=0, which is actually Interface=Best, do you need DynamicVariables=1 on the measure? Seems like you would, right?
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net measure documentation for v4.5.3

Post by jsmorley »

SilverAzide wrote: September 28th, 2021, 1:12 am It just occurred to me... if you do use Interface=0, which is actually Interface=Best, do you need DynamicVariables=1 on the measure? Seems like you would, right?
Well, you don't strictly need DynamicVariables=1 on the measures, unless the active interface can change while the skin is running. I'd recommend it on any skin you want to distribute. There is no difference with "0" or "Best" in this regard.
User avatar
SilverAzide
Rainmeter Sage
Posts: 1632
Joined: March 23rd, 2015, 5:26 pm

Re: Net measure documentation for v4.5.3

Post by SilverAzide »

jsmorley wrote: September 28th, 2021, 1:17 am Well, you don't strictly need DynamicVariables=1 on the measures, unless the active interface can change while the skin is running. I'd recommend it on any skin you want to distribute. There is no difference with "0" or "Best" in this regard.
Ah, OK, gotcha! The reason I asked was I noticed the Illustro Network.ini uses default settings (i.e., Interface option not specified), so I wasn't sure if it needed DynamicVariables=1 or not. I guess it's not a yes-or-no answer in this case, as it depends on how (or whether) you want the skin to react. Maybe for Illustro it's best to just "keep it simple".
Gadgets Wiki GitHub More Gadgets...
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net measure documentation for v4.5.3

Post by jsmorley »

SilverAzide wrote: September 28th, 2021, 2:09 am Ah, OK, gotcha! The reason I asked was I noticed the Illustro Network.ini uses default settings (i.e., Interface option not specified), so I wasn't sure if it needed DynamicVariables=1 or not. I guess it's not a yes-or-no answer in this case, as it depends on how (or whether) you want the skin to react. Maybe for Illustro it's best to just "keep it simple".
I think it might be worth updating Illustro to use Interface=Best and DynamicVariables=1.
User avatar
jsmorley
Developer
Posts: 22374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Net measure documentation for v4.5.3

Post by jsmorley »

I would note that actually the way the Net measures work is:

In almost all cases, Interface should be set to "Best"
If Interface is not set, it defaults to "Best"
If Interface is explicitly set to "0", that still means "all"

I don't, and have never, trusted the results of "all" with the Net measures. Aside from being pretty much useless information (in my view), it has the potential to return double/triple the expected values, due to the oft-mentioned virtual / loopback / tunnel interfaces in Windows. The Net measures actually take some pains to try to avoid this spurious behavior, but I'm not convinced it is dependable.

So it's the one slight backwards compatibility issue with the change. If your skin explicitly has Interface=0 in it, I would really recommend changing that to Interface=Best. If you only have one adapter, there may not be any practical difference really, but I would do it just to be sure, especially if you are distributing your skin.

Again, this guidance is probably right if you are creating / distributing a skin that is intended to measure the single currently active interface. If you are looking to design a skin that supports multiple currently active interfaces, that is by its nature going to be a more advanced skin, and should be presented as such. You will need to create multiple SysInfo and / or Net measures that explicitly measures distinct interfaces, and this will require some effort by the end-user to find and use the "name / description" of the adapter instead of "Best" or any index number. I would recommend at least documenting how to use PowerShell to find the names, or maybe even have a RunCommand measure that does that for them, and just tell them to copy / paste from that.

I don't see Interface=0 playing any role in this. Even if the intent is really to measure the "total" of traffic across multiple currently active interfaces, I would still recommend creating distinct measures for each, and just using a Calc measure to add them together. I firmly believe this will be more reliable. Do keep in mind that when you distribute a skin, the system it may end up on may well be entirely different than the one you used to create it on.