Quantcast
Viewing all articles
Browse latest Browse all 1729

Help: Rainmeter Skins • Re: NetTotal - Reset once a month?

Ah there it is! lol
So, what exactly are these indexes for? Why does Rainmeter start a new one instead of just storing the info into the same one? Does it need to create a new In/Out index entry when it changes? Does it make it more flexible to do it this way? Just curious why it can't just have a single In/Out pair which gets updated with whatever the current index is?

Likely too complex to explain and has good reasons for it I suppose?
When Windows boots up, it builds a "network interface table" -- an internal master list of your network interfaces (and notice I did not say "network adapters"). MS refers to this as the "IfTable" (interface table). Each interface is assigned a sequential index number, starting with 1 and going to however many interfaces you have. MS refers to these index numbers as the "IfIndex" (interface index).

You will see this in the Rainmeter.log:

Code:

...DBUG (17:03:06.518) :  19: Name: Intel(R) Ethernet Connection (17) I219-LMDBUG (17:03:06.531) :      Alias: EthernetDBUG (17:03:06.546) :      Type=Ethernet(6), Hardware=Yes, Filter=NoDBUG (17:03:06.554) :      IfIndex=5, State=Disconnected, Status=Down(2)...
So in this example, my 19th interface is my ethernet adapter, which has been assigned IfIndex 5. You can get this from PowerShell too.

Code:

Get-NetAdapter -Name * | Format-Table -AutoSize
The problem, as you can guess, is while the ifTable is usually in a consistent order, it's not always in that order. Thus an interface that has an ifIndex of 21 can suddenly change to an ifIndex of 23. It might not even be consistent between reboots, not sure. If you turn on debug mode and look at the Rainmeter.log, you'll most likely see multiple dumps of network interfaces as they change over time.

In any case, and to answer your main question, Windows internally tracks traffic across each network interface by its ifIndex. Rainmeter taps into the ifTable where this information is stored and that is what you are seeing dumped out into the Rainmeter.stats file -- the cumulative traffic across each interface output in "In/Out" pairs, with the pair number being the ifIndex number.

And if your adapter's index number changes, the cumulative values that have been recorded to date in the stats file will suddenly change to some other interface's values. Thus, Rainmeter's cumulative NetIn/NetOut/NetTotal values are not reliable and can't be used in the way you intended. Which is what I warned you about 10 pages back on this thread, LOL.

Statistics: Posted by SilverAzide — Yesterday, 10:48 pm



Viewing all articles
Browse latest Browse all 1729

Trending Articles