Help - Search - Members - Calendar
Full Version: WMI Watcher Performance Ticket
Desktop Sidebar Forums > Customizations > Panel Announcements
GoMa
I've finally completed the first version of the WMI Watcher panel (a year after it was supposed to be released biggrin.gif). This version should still be considered beta because the panel is very complicated and I have not tested it enough to say it's ready.
This panel allows you to monitor any object from the WMI (Windows Management Instrumentation) inside the Performance panel.
The WMI contains numerous types of system data, such as memory, performance, network adapters, batteries, running processes, printer queue, and much more. Each of these is represented by an object that has many properties. The panel allows you to monitor these objects and properties. For example, you might monitor the IPAdress property of the Win32_NetworkAdapterConfiguration object to see your current IP address.

Requirements:
- Desktop Sidebar version 1.05 build 116 or better.
- .NET Framework 2.0 Redistributable.

Download and Installation:
Download the file from the Extension Exchange page.
Double click it to install the panel in Desktop Sidebar. Then close and restart Desktop Sidebar. Now, right click a Performance panel (or add one using the Add Panel dialog box), and click Panel Properties. In the Panel Properties dialog box, click Add. Choose WMI Watcher from the list. Configure the panel to your liking and click OK.

Version 1.0, Released Oct. 8, 2006, Features:
- Monitors any WMI object that is available on your computer.
- Can monitor remote computers as well as the local computer.
- Has the ability to filter the objects to display only the instances and properties you wants.
- Three different views: List, Text and Chart. The List view can display multiple objects at the same time.
- Predefined settings are available for common uses of the panel.
- Import/export settings to make sure you don't lose the configuration.
- "Advanced Mode" to manually configure the queries.
- Configurable refresh rate.

Notes:
- The most useful objects are in the root\CIMV2 namespace (it's the default), and their names start with Win32_****. There are WMI objects for performance counters, their names are Win32_PerfFormattedData_****.
- When adding this performance ticket to your sidebar you might notice an increase in memory usage and processor time consumption. This is natural because reading the WMI is a rather resource intensive task. Hopefully, however, there is no memory leak - meaning the panel releases the memory it uses over time.
- I recommend considering the refresh rate and setting it to the highest useful value. Refreshing the panel too often will cause a noticable performance hit.
- If you have any ideas for adding predefined settings that can be useful to other people, simply Export your settings and send them to me, and I will add them to the default installation.

IPB Image
silkshadow
Sweet, thanks GoMa!
olgerd
When I add WMI Watcher error message appears: Cannot create panel WmiWatcher.
Click to view attachment
olgerd
I'm using WinXP 64-Bit. May be it causes this problem?
GoMa
Perhaps that's the problem. I'll check it out when I have time.
Patrick
I would like to see some the model name of my harddisks.. How? (for instance: seagate 1234xm, maxtor XL1200, etc..)
XsCode
Just tried installing your plugin, no errors or anything, but it's not showing up in the panel list. Using v1.05 Build 116

GoMa
This is "performance ticket", which means that in order to add it you need a Performance panel on your sidebar. From the first post of this page:
QUOTE
After installation close and restart Desktop Sidebar. Now, right click a Performance panel (or add one using the Add Panel dialog box), and click Panel Properties. In the Panel Properties dialog box, click Add. Choose WMI Watcher from the list. Configure the panel to your liking and click OK.
XsCode
Right, I found it in the performance panel section, but i get the same error as olgerd but i'm running 32bit XP
GoMa
I'll check into it.
Eagle2005
how do i get to the WMI Properties dialog box?

i was able to get it to appear on the plugins window, but how do i add the panel to the sidebar?
GoMa
See my post 3 posts above your one. smile.gif
PeterPanino
Tried to install it in Vista - got this error message:

Click to view attachment
Ken
QUOTE(PeterPanino @ May 8 2007, 07:57 PM) *

Tried to install it in Vista - got this error message:

Click to view attachment

You will get this with most of/if not all of the addon panels. This is due to User Accessce Control (UAC) being on.
To turn it off to install a panel do this:
Open a command Prompt- type msconfig
This will bring up a window- goto Tools tab- scroll down to Disable UAC- click on it
Click Launch- then reboot
Install the panel(s) you want
Then repeat the above, but you want to Enable UAC

TheGleep
I've got it installed and starting to get some results, but I have a question about filtering.

Do you have any documentation (or pointers to docs) that describes how filtering works - or should work?

In particular, I'm looking for partial matches in string values...like "*Adapter*"

Thanks!

Edited: Strike that - I found it. To future users, allow me to recommend "WMI Explorer" from http://www.ks-soft.net/hostmon.eng/wmi/index.htm

To do a "like" query (what I was looking for above), use "%" as a wildcard - "like '%Adapter%'" instead of "like '*Adapter'"

And I have a suggestion...since WMI provides "MAX" values, it would be nice to tie charts into these values...drawing the "min" and "max" values from WMI queries, instead of by-hand. For example, Memory, Network, Disk use, and CPU use can all be done using this plug-in - and adding the ability to draw "min" and "max" values from wmi queries makes it easier to create these graphs/charts.

I've two other suggestions - just to make your brain explode:
1) it would be nice to provide math from values - like the two instances of "Physical Memory" that I have (one for each card) to get "total physical memory"
2) (this is the one that will *really* hurt) It would *ALSO* be nice to embed query output within queries - so the "CPU" meter query would lookup the CPU ID from another WMI location - and the configuration could be part of the installation, but work for anybody.

IMO, the final result should support multi-core processors; a graph to summarize *all* CPU activity, or a graph to summarize processor {n}...I hope that makes sense to someone other than me!

Comments from everybody else on this one?
GoMa
I get your drift, TheGleep. If your trial of WMI Explorer runs out, you could use the built-in tool in Windows. Albeit being a bit less user-friendly, it still does the job. In Start -> Run, type wbemtest and click OK. When you click Connect, the namespace you'll want to type in is root\cimv2.
Regarding your suggestions: first of all, thanks for the feedback, I really appreciate it. Your ideas are great, and will take the panel to even greater possibilities. Problem is, what I'd like right now is making the panel less complicated. Currently it's almost impossible for an average Joe to install this panel and know what s/he's supposed to do with it. I've been thinking of writing a tutorial for the panel.
Both of your ideas can be implemented in one added feature, which is custom scripting of the panel. If I'd allow you to implement the logic you want in, say, a C# mini script, you can do whatever you want, including adding different values together, querying classes based on other values, etc - the possibilities here are endless. The feature will be very advanced. Perhaps I could add an "Insanely Advanced Controls" button along with the "Advanced Controls" one. biggrin.gif
TheGleep
I've been thinking about this a bit, since I made my post. Here's what I'd suggest (All suggestions are for "ChartView" view type only):

Take away the "Objects" tab, and put an "Object" button that pulls up another dialog just like what's on the "Objects" tab...turn the "objects" tab into another dialog box. Put a button on the "General" tab to allow the user to select the object/objects to report on.

For "Minimum Value" and "Maximum" value, put a radio-button next to the spin controll, and add an "object" button and some way to show what object was selected (like, maybe the "select object" button label shows what the current selection is.

That at least covers the issue of graph ranges.

As for the "merged" type of query...I have a couple of ideas to bounce around:
* The querying language looks a lot like SQL - could the query allow for summarizing
* We could specify the "object" is a "summary" - like "sum this value from all instances of this class" - would probably be a radio button or something.

Does that spark any notions to make life easier?
GoMa
Thanks for your suggestions.
First of all, regarding your first post suggesting support for individual CPU graphs as well as one that sums them together, you can already do that. The Name property of the Win32_PerfFormattedData_PerfOS_Processor object represents the id of the CPU (starting from 0 upwards), and there is one instance which has the Name of _Total.
The query you're seeing is a WQL query, which is a limited version of SQL geared towards the WMI. When you first posed your requests, I delved into WQL a bit further to see if doing that was possible, but didn't find a way to do it. The normal SQL keywords do not seem to work in WQL.

Where do you see the minimum and maximum values in the WMI? I couldn't find them.
The "sum this value from all instances" option sounds pretty easy, but would be a bit limiting - say a user one day wants to do an average of all the values. What do I do then? That's why I thought of making the scripting controls.
TheGleep
QUOTE(GoMa @ Jul 30 2007, 09:36 PM) *

Thanks for your suggestions.
First of all, regarding your first post suggesting support for individual CPU graphs as well as one that sums them together, you can already do that. The Name property of the Win32_PerfFormattedData_PerfOS_Processor object represents the id of the CPU (starting from 0 upwards), and there is one instance which has the Name of _Total.
The query you're seeing is a WQL query, which is a limited version of SQL geared towards the WMI. When you first posed your requests, I delved into WQL a bit further to see if doing that was possible, but didn't find a way to do it. The normal SQL keywords do not seem to work in WQL.

Where do you see the minimum and maximum values in the WMI? I couldn't find them.
The "sum this value from all instances" option sounds pretty easy, but would be a bit limiting - say a user one day wants to do an average of all the values. What do I do then? That's why I thought of making the scripting controls.


I'm not trying to be argumentative, here, just in case I come across that way.

Do *all* PerfFormattedData items have a _Total entry?

I can't say that I see "minimum" values anywhere in WMI, but if "maximum" exists, there's a possibility for "minimum" to exist, so we might as well plan for it. (In practice, it'd probably just be "0" in a spin-control). As for "Maximum", there are many places - depending on the metric...bandwidth under network settings, VisibleMemory (or something like that) for memory...I don't know what it would be for disks, but I know it's there.

And, last, I forgot to say that I like the scripting idea - but I'd rather it be an "advanced users" thing because it's *SO* complex. Common behaviors should be easily configured. Maybe "Sum" "average" "Min" "max" and "mean"? The normal statistical functions provided without needing to dig into scripting - but provide a scripted option of some sort for those who need it?

How do you think you'd go about putting the scripting in?

Well - I just came across another instance to take into account; sample differencing...

For some reason, the BytesTotalPersec property of Win32_PerfRawData_Tcpip_NetworkInterface is a transmission *total* rather than a "cooked" value...so to get the current bytes/second, we need to get the number, wait a second, get the number again...

Just more fun to add to the approach, eh? smile.gif *my* recommendation to make this easy for the user would be:
* In the selection of how to interpret multiple values, include "time-average" options - like "Time Average (1 second)" and "Time Average (3 seconds)"...and so on...of course, "Time Average (Custom)" makes sense, but requires yet *another* input field for how often to sample. And the value in parenthesis, of course, determines how long a delay between samples. I'm not sure how this would be implemented if you did a script option...but I'm open to new ideas!
PeterPanino
Is it possible, with this plugin, to display CPU and motherboard temperature? (Vista, Asus P5K, Intel DualCore).
GoMa
Use the SpeedFan panel to display temperatures.
polp
Hallo all,
can anybody help me, what exactly should I choose in WMI lists od available "monitors" to see HDD activity? I have choosen this plugin becouse Vista problem of existing plugins, and was sucessfull to "choose" CPU, but HDD still not working.

Also, how do I "specify" which CPU monitor is to which CPU when having dual core CPUs? When I choose twice pre-set CPU setiings, both are showing different values (so it might be working properly), but I am not sure if I am monitoring both CPUs or not :-)

thanks a lot!

Pavel
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.