It is currently April 19th, 2024, 9:23 am

NetIn/Out issue, perhaps I should switch to using PerfMon?

Get help with creating, editing & fixing problems with skins
Werelds
Posts: 7
Joined: August 27th, 2010, 2:09 pm

NetIn/Out issue, perhaps I should switch to using PerfMon?

Post by Werelds »

Here we go again, another issue.

Basically, the NetIn and Out measures seem to cut values off for no reason. I'll explain further in a sec, first here's the code:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureNetOut
Measure=NetOut
NetOutSpeed=10000000

[OutAbsolute]
Meter=STRING
MeasureName=MeasureNetOut
X=26
Y=19
FontColor=255,255,255,255
FontFace=Trebuchet MS
FontSize=9
ClipString=0
AntiAlias=1
AutoScale=1
Text="UL: %1"
That's the one for outgoing, incoming is near identical, slightly different X/Y offsets and it uses Net In obviously.

Now, the problem. I have a 120/10 connection (yes, that's in mbits). Naturally, that means I need to use 120,000,000 and 10,000,000 as respectively in and out limits (added the commas for readability, don't actually have them in code as you can see ;)). I've also tested with AutoScale on and off, doesn't make a difference to the actual value.

I tested these out by simply downloading from Usenet, since that easily maxes out my download, and uploading a 150 megabyte file to my FTP. Downloading went at 14 MByte/s like it should, however, according to the NetIn measure it was doing so at 7.7 M (with autoscale); obviously not correct, since 14 MByte is just under 120 Mbit. Similarly when uploading, I'd be doing so at 1.2 megabytes/s, which is just under 10 megabits/s, but NetOut would show 3.xM; 338721 without autoscale for example.

Now, I looked at the speeds a bit closer, and what it SEEMED like to me was that the FIRST digit/digits got cut off; i.e. the 7.7 should've been 117.7, the 3.3 should've been 9.33. Those values would've been almost exactly correct, or at least close enough to the actual speeds at those times.

If it was a matter of the window not being able to fit the content, I would understand, but I've got DL/UL: %1 as my strings, so there's plenty of room; if anything, it should cut off something at the END.

I've searched around a bit, and it seems NetIn/Out are unreliable, so I'll probably give it a try with PerfMon tomorrow, but any ideas?

I'll also post some screenshots tomorrow, so you can get an idea of what I mean :)
Werelds
Posts: 7
Joined: August 27th, 2010, 2:09 pm

Re: NetIn/Out issue, perhaps I should switch to using PerfMon?

Post by Werelds »

As promised, some screenshots.

Up / out:
Image

Down / in:
Image

So here's the deal. For the purpose of this test I turned off autoscale for clarity's sake, and I removed the NetOut/In speeds so that I can just get a plain reading.
Uploading at 1.3 megaBYTEs per second; that is rounded off from 1.25 though, but that essentially comes down to the maximum upload speed of my connection: 10 megaBITs. Rainmeter however shows the number 373098, as I understand that would be in bps (Text="UL %1bps" is what I use now for the record), so it's basically showing 373 kilobits, or converted to kilobytes 373098/8/1024 = 45.54. Nowhere near the 10 mbit or 1.2 megabytes.

Downloading is similar, doing it at 3.6 MB/s or 30.19 Mbps, it shows 1591924 or 1.5 Mbps. Converting properly results in 194 KB/s. I'm not maxing out my connection here, in fact I'm only at 25% capacity, but that's good for calculations atm.


Now, consider 373098 again, but put a 9 in front, making it 9373098. That makes it 9.3 Mbps or 1.1625 MB/s. Given that I've only set it to update once per second, that all of a sudden makes it more or less correct, considering that connection speeds always fluctuate a little bit.
Same goes for the download, take 1591924 and put a 3 in front, making it 31591924, or 31.5 Mbps. Converting that to MB/s results in 31591924 / 8 / 1024 / 1024 = 3.77 MB/s. Again, taking into account the plugin only updates once per second and that the speed will fluctuate a little, that is more or less accurate.

I've tested this through Filezilla for the screenshots, but regardless of whether I go through FTP, Usenet or just plain HTTP, it is never correct. When doing it through Usenet, thus getting over 100 megabits/second it even misses the first TWO numbers it seems.

What the hell is causing this? It can't be the window or something overlapping, because then AutoScale should fix that, but it doesn't. Moreover, the two string meters are virtually identical other than their measure source and positioning, so if it was being cut off, it would be cutting off at the beginning or the end of the string, not halfway in the middle. This is some error on the side of the NetIn/Out measures, and I can't figure out what it is.

Setting NetInSpeed/NetOutSpeed has no effect, nor does specifying the NIC number. Gonna try PerfMon now, see what kind of results that gives.


Any ideas? :P


Edit: now I'm totally lost. PerfMon also doesn't report the correct speed when used in Rainmeter, but if I use the Enigma network config or SDT or whatever, it is correct. My measures are identical to those in Enigma, only difference was in the meters where Enigma specifies 0 decimals :/
Checking in PerfMon.msc does show the correct values though. What the bloody hell is going here :D
poiru
Developer
Posts: 2872
Joined: April 17th, 2009, 12:18 pm

Re: NetIn/Out issue, perhaps I should switch to using PerfMon?

Post by poiru »

Can you post your skin between

Code: Select all

 tags?
Werelds
Posts: 7
Joined: August 27th, 2010, 2:09 pm

Re: NetIn/Out issue, perhaps I should switch to using PerfMon?

Post by Werelds »

I posted the relevant part in my first post, here it is as I used it for the test:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1

[MeasureNetOut]
Measure=NetOut

[OutAbsolute]
Meter=STRING
MeasureName=MeasureNetOut
X=26
Y=19
FontColor=255,255,255,255
FontFace=Trebuchet MS
FontSize=9
ClipString=0
AntiAlias=1
AutoScale=0
Text="UL: %1bps"
Identical code for NetIn, only difference being the measure and Y offset. I'm gonna try building it from scratch once I've cleaned the house a bit, starting by simply copying it from SDT I think.