It is currently March 29th, 2024, 3:15 pm

Network Download readings

Get help with creating, editing & fixing problems with skins
harmand
Posts: 5
Joined: July 24th, 2019, 9:54 am

Network Download readings

Post by harmand »

Searching the forum I managed to have RM show the NetIn download value in Mbps instead of MB/s

Code: Select all

[meterDownloadValue]
...
Text="%1 Mbps"
NumOfDecimals=1
Scale=131072
I noticed, however, that the value shown by RM is lower than the one showed in Task Manager (Perfomance tab, Ethernet graph).
I tried downloading a big file while keeping both TM and RM open: when TM was showing 19.2Mbps RM was showing 18Mbps. It looks like the value reported by RM keeps always about 1-1.5Mbps lower than the one reported by TM.

So I'm wondering:
- what's the reason for such a difference?
- which of the two readings is correct?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: Network Download readings

Post by SilverAzide »

The difference comes down to how you define a Megabyte, and this is reflected in the value you are using for Scale. Traditionally, a megabyte is 2^20 bytes, or 1048576 bytes. Some folks prefer a more literal definition, where a megabyte is 1000000 bytes. (This is how drive manufacturers report drive sizes, for example.) Your scale factor is converting bits to bytes and bytes to megabytes; i.e., 1048576/8 = 131072.

So it appears from your description that Task Manager is using 1000000 for converting bytes to megabytes. if you want the numbers to match exactly, try using a scale factor of 1000000/8, or 125000.
Gadgets Wiki GitHub More Gadgets...
harmand
Posts: 5
Joined: July 24th, 2019, 9:54 am

Re: Network Download readings

Post by harmand »

Thanks for your help and explanation.
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Network Download readings

Post by jsmorley »

It depends a bit on who you ask, but the official IEC definition is:

10002 Bytes is 1 MB or one Megabyte
10242 Bytes is 1 MiB or one Mebibyte

Particularly in computers, which live in a binary/base-2 world, the base-2 10242 definition is very often defined as a "Megabyte", it kinda depends on who's ox is being gored. Hard drive manufacturers almost always use the base-10 10002 definition, so they can (technically correctly) say they are selling you a 1 Terabyte drive. Of course Windows uses the 10242 definition, which is why you only have a total of 930 Gigabytes capacity shown in This PC.

Unless you tell it otherwise with the AutoScale or Scale options, Rainmeter defines things the same way Windows does. A Megabyte is 10242 or 1048576 Bytes.
User avatar
balala
Rainmeter Sage
Posts: 16110
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Network Download readings

Post by balala »

jsmorley wrote: July 26th, 2019, 3:19 pm It depends a bit on who you ask, but the official IEC definition is:

10002 Bytes is 1 MB or one Megabyte
10242 Bytes is 1 MiB or one Mebibyte

Particularly in computers, which live in a binary/base-2 world, the base-2 10242 definition is very often defined as a "Megabyte", it kinda depends on who's ox is being gored. Hard drive manufacturers almost always use the base-10 10002 definition, so they can (technically correctly) say they are selling you a 1 Terabyte drive. Of course Windows uses the 10242 definition, which is why you only have a total of 930 Gigabytes capacity shown in This PC.

Unless you tell it otherwise with the AutoScale or Scale options, Rainmeter defines things the same way Windows does. A Megabyte is 10242 or 1048576 Bytes.
Well, in fact a while ago, a Megabyte was usually equal to 220 = (210)2 bytes (third paragraph here), or a Kilobyte was 210 bytes. Although this approach seems to be deprecated, this is how I've learned this a few decades ago, back in the 90s (well, am I so old???? - yep, it seems I am).