It is currently September 16th, 2024, 7:50 pm

How to reset a WebParser measure return value?

Get help with creating, editing & fixing problems with skins
User avatar
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to reset a WebParser measure return value?

Post by jsmorley »

As far as Ping goes, I've never had any issue with it. Just be sure to ONLY use UpdateRate on it, not both UpdateRate and UpdateDivider. Any use of UpdateDivider can cause some weird "lag".

http://rainmeter.net/forum/viewtopic.php?p=107349#p107349
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to reset a WebParser measure return value?

Post by Yincognito »

So the best thing might be have the SysInfo test set some icon to red or some other indication when there is no connectivity, and green when there is. Then have a click on that icon by the user refresh the skin. That way it can be "on demand", and won't run amok.
Yep, except that SysInfo's test for connectivity, according to Rainmeter manual site :

INTERNET_CONNECTIVITY: Returns 1 if your computer is connected to the Internet, -1 if not. Note: This option value is only available on Windows Vista or later. On Windows XP, it will always return 1.

It seems that in this particular case, all the solutions which involve measuring something do have some "flaws" or are incomplete. The red icon check as I understand from the lines above would always return green on Windows XP, so basically the same thing as WebParser does (or does not). Having read somewhere on the forum that WebParser is dependant on the Internet Explorer settings makes me wonder if these issues (Windows XP always returning connected to the internet and WebParser remembering the connected state IP) are not somehow related.

Could we (again) blame Microsoft on this, LOL? Hm...

The way I see it, the road to go is MANUAL checking, just as you said before. But if you want the user to be somehow notified that he/she should perform the manual check, then the Ping solution seems the most reliable/complete. After all, even Windows (ALL VERSIONS, damn it) do sometimes incorrectly display internet connectivity status, so basically, you can't rely on the OS either. The only way to do it is testing (trial and error), and this is exactly what Ping does - not only the plugin, but the cmd command too. It does what every user does manually when trying to see if they are connected to the internet : they try to load some site. If the browser finally displays some 404 page, it's all clear : they're offline. Measuring some values (which are after all, provided by the OS) does not yield the correct results all the time. Ping does, if setting the timeout decently and/or pinging at least two sites. The drawback is that lag I was talking about earlier and the constant stress on the network (although minimal) when listening for a "response".

That's one of the reasons I included a latency measure/bar/meter on my network skin (even before finding out the WebParser issue) - double checking. The other reason was that even when connected, this could identify if the network is functioning at the optimal parameters.

P.S. The more I'm thinking about it, the more I believe IE ans Windows OS are related to the WebParser problem...

EDIT : Regarding IE/Windows being related to WebParser problem - I was not referring to the actual checking, which is clearly done in an independent way, but the "caching" of the result, the same way browser are caching site info.
Last edited by Yincognito on February 28th, 2015, 6:19 am, edited 1 time in total.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to reset a WebParser measure return value?

Post by Yincognito »

Any use of UpdateDivider can cause some weird "lag".
Got that - good to know the reason behing that "lag". Thanks.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth
User avatar
jsmorley
Developer
Posts: 22745
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: How to reset a WebParser measure return value?

Post by jsmorley »

There is a little CheckNet plugin I wrote that will work on XP as well.

http://rainmeter.net/forum/viewtopic.php?p=93547#p93547

It should be pretty reliable, as it actually opens a tiny UDP socket to your current DNS provider to test for internet connectivity.

The upside is that this means it isn't dependent on asking Windows "am I connected?", which has some issues with differences in how Windows manages that in different versions of the OS.

The downside is that it may not be able to distinguish "limited" internet connectivity, where for instance you are at a coffee shop, and are connected to their WiFi, but have not "logged in" to their service that gives you access to the wider internet.
User avatar
Yincognito
Rainmeter Sage
Posts: 8153
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: How to reset a WebParser measure return value?

Post by Yincognito »

Hm... could be just what it's needed to correct WebParser's data, while still being fast and light.

If I will decide to give up the latency check (which has other reasons to be as well - other than purely checking for connectivity), then I'll definitely use this little tool to do some "teamwork" with WebParser. Thanks for the suggestion!

Other than that, on a different subject : do you happen to know some plugins which will check for top network processes? I couldn't find one yet. I mean I found only one on this link :

http://rainmeter.net/forum/viewtopic.php?f=5&t=239 (the first link on the page, the one by sgtevmckay)

but I couldn't make this work yet and I'm not entirely sure that's what I need (the screenshot for this on customize.org makes me doubt that).

The thing is... it would be great if you could monitor the whole array of top processes in Rainmeter (CPU, Memory, Disk Usage and Network), pretty much the same as Windows Resource Monitor is doing, only with a much nicer interface and the ability to modify that interface. My next step in skin designing is the Top Processes area. I can do this for CPU (AdvancedCPU/TopProcesses plugins or the harder way using %ProcessorTime/%UserTime counters in PerfMon, which require some complicated computations), for memory (TopProcesses plugin or Process Private Working Set in PerfMon), for disk usage (I/O process counters in PerfMon - a little tricky, but should be at least a decent estimate most of the time), but I can't do it yet for network related top processes. A skin who does all four would kick ass, in my perspective. I don't know if it would be that appealing on DeviantArt, but for my usage, it would help identify bottlenecks in a split second...

So... is there any? Or should I wait for some plugin maker to make one? You probably know more than me regarding the availability of different types of plugins for Rainmeter, that's why I asked.
Profiles: Rainmeter ProfileDeviantArt ProfileSuites: MYiniMeterSkins: Earth