Desktopinfo version: 3.7.0
Windows version: 10.0.22621 (windows 11)
netpacketsrate have 2 bugs that I've found so far.
1st bug:
When transfer speed of network is too high i throws this error (1Gbps):
[e:EIntOverflow Integer overflow]
This happens when using MTU:1500 as a parameter.
Workaround for this is doing the conversion yourself:
NETPACKETSRATE=interval:1,chart:filled height:3 scale:linear series1:%1 color1: %darkgreen% series2:{{Neg(%2)}} color2: %darkred%,text:Net Rate,display:r: {{(%1*1500)*8}}[1.1B]bps s: {{(%2*1500)*8}}[1.1B]bps
2nd bug:
When measuring download speed it doesn't show the correct dl/ul speeds.
Uploading data works normally. See screenshots. (this bug has been tested on both windows 10, 11 and windows server 2019, it's there on all 3 OS's)
Note about screenshots uploaded. The transfer speed window is in Bytes and desktopinfo is configured for bits.
Here's also a rainmeter comparison I made for the 2nd bug mentioned (transfer rates are wrong)
Currently looking at a workaround for this one.
Trying out this for now and it's looking alright (even though i have to use 2s refresh timer instead of 1)
--
CMD=interval:2,file:powershell.exe,parameters:-File typeperf_in.ps1,read-as-csv:1,no-wait:2,set:nettxr,display:%2,hidden:1
CMD=interval:2,file:powershell.exe,parameters:-File typeperf_out.ps1,read-as-csv:1,no-wait:2,set:nettxs,display:%2,hidden:1
NETPACKETSRATE=interval:2,chart:filled height:3 scale:linear series1:{{%nettxr%}} color1: %darkgreen% series2:{{Neg(%nettxs%)}} color2: %darkred%,text:Net Rate,display:r: {{%nettxr%*8}}[1.1B]bps s: {{%nettxs%*8}}[1.1B]bps
-- typeperf_in.ps1 --
$result = (typeperf -sc 1 -si 1 "Network Interface(*)Bytes Received/sec")
Write-Host $result[1]
Write-Host $result[2]
-- typeperf_out.ps1 --
$result = (typeperf -sc 1 -si 1 "Network Interface(*)Bytes Sent/sec")
Write-Host $result[1]
Write-Host $result[2]
The powershell solution worked but was using too much cpu =)
So I ended up with this solution to get the correct transfer speeds instead.
WMI=interval:1,maxrows:1,namespace:rootcimv2,query:Win32_PerfFormattedData_Tcpip_NetworkInterface,set:nettxr,display:%BytesReceivedPerSec%,hidden:1
WMI=interval:1,maxrows:1,namespace:rootcimv2,query:Win32_PerfFormattedData_Tcpip_NetworkInterface,set:nettxs,display:%BytesSentPerSec%,hidden:1
NETPACKETSRATE=interval:1,chart:filled height:3 scale:linear series1:{{%nettxr%/1024}} color1: %darkgreen% series2:{{Neg(%nettxs%/1024)}} color2: %darkred%,text:Net Rate,display:r: {{%nettxr%*8}}[1.1b]bps s: {{%nettxs%*8}}[1.1b]bps
Don't think it works with multiple network interfaces though. But might be a good pointer in where to fetch the values properly for debugging =)
this is also the legacy 32 bit number issue. converted to 64 bit.
I haven't been able to reproduce your second issue. You seem to be comparing different things.
Ok.
Let me try to explain it a bit better.
This shows the wrong bandwidth usage:
NETPACKETSRATE=interval:1,mtu:1500,chart:filled height:3 scale:linear series1:{{%1}} color1: %darkgreen% series2:{{Neg(%2)}} color2: %darkred%,text:Net Rate,display:r: {{%1*8}}[1.1b]bps s: {{%2*8}}[1.1b]bps
This shows correct bandwidth usage:
WMI=interval:1,chart:filled height:2 scale:linear series1:{{%BytesReceivedPerSec%/100}} color1: %darkgreen% series2:{{Neg(%BytesSentPerSec%/100)}} color2: %darkred% row-id:10,namespace:rootcimv2,query:Win32_PerfFormattedData_Tcpip_NetworkInterface,row-text:Net Rate,display:%name%|r: {{%BytesReceivedPerSec%*8}}[1.1b]bps s: {{%BytesSentPerSec%*8}}[1.1b]bps|%chart%
Maybe I've misunderstood netpacketsrate somehow ?
ok I see what you're saying. which do you think is closer to the truth?
WMI is spot on when I've tested speedtest.net and transfers over LAN.
Netpacketsrate shows some increase in traffic but not correct. Often it shows too much traffic outbound while testing inbound f.ex. But oddly enough it can be correct sometimes like when transferring a large file over LAN. But speeds over router/internet is never correct.
I haven't been able to figure out why this is the case but I've noticed it no more than 1 machine and more than 1 Windows version (even server versions).
NETPACKETSRATE uses the old api call to GetIpStatistics.
I certainly can't vouch for it's accuracy. I notice it only measures IPv4.
Ah =)
I'm sticking with the WMI thingie i put together. Works like a charm =)
Thanks for looking ! and thanks for a great application =)
1st bug fixed in latest release.
2nd bug you don't have to bother with =) i'm happy with the wmi solution i posted above.
Thanks !