Re: Question about WMI connection and concurrent use



Manfred,
To find the answer to your threading questions why not try using Process
Explorer from sysinternals.com. It will show you the threads in use for any
instance. Monitor WMI to see how many threads it is using and then connect
you application.

My guess is that it will release one thread per remote host connection as it
runs it query semi-synchronously. You can change hat to run the fully
asynchronous which will release the call and allow program continuation.
There is a earning about security issues with async calls in WMI. I have
not read the security issue in detail so you might want to visit that.

You r environment is one of a WMI proxy so I would start with the calling
workstation and see how many WMI threads are release to be sure it will work
as intended. You may have to "remote" your process with an object on the
management server that can have multiple instances in order to gain maximum
performance.

You can also use WMI to query a process for it's thread information. This
may be easier than using API calls. Set up an event monitor on the thread
creation and deletion and look at the thread info.

--
Jim Vierra

"Manfred Braun" <manfred.braun@xxxxxxx(NOSPAM)> wrote in message
news:A577C305-8DAC-440D-AD27-78DCAEFBDE51@xxxxxxxxxxxxxxxx
> Hi All,
>
> [Even I posted this sometimes ago via "managed newsgroups" {I am universal
> msdn abonnement and pay for support}, I could not get an answer or any
> notifications. This is my third attempt. If my question is not to
> understand
> - bear with me for my english - but I could give additional
> information/explanations. On the other hand, I cannot image, that this is
> really unclear and not to understand/to explain by the experts].
>
> I'll use one wmi connection by several concurrently running threads to one
> server. I've already made a lot of outgoing calls from different threads
> [I
> am using the .Net framework],
> but that's another scenario.
> Only my management server is allowed to connect network devices via snmp.
> So
> I'll use this server as a proxy to ask network devices. In this case, my
> local workstation will open a wmi connection to the system management
> server
> and advise it to contact box x1, box x2, and so on [useing additional
> WBemObjectSet objects]. I know all this to handle, but:How many threads
> can
> this handle, or do I need
> multiple connections?? Are the calls internally serialized or handled by
> multiple threads?
>
> I made already a similar thing, using this management servers WMI Ping
> Provider, and found this extremly slow, but could not find the reason.
>
> I could not find anaything in the SDK, wether scripting nor COM API. I am
> using the .Net Framework to build my tool, not scripts.
>
> Any help would be really very welcomed!
>
> Best regards,
> Manfred Braun
>
> [Hopefully I get it managed this time to post it as a top-level entry;I am
> afraid, only this level is watched for "managed newsgroups" ??]
>


.



Relevant Pages

  • Re: Question about WMI connection and concurrent use
    ... My only server, which is allowed to make snmp queries [which I call the ... is one connection able to serve multiple outgoing ... Monitor WMI to see how many threads it is using and then ... > management server that can have multiple instances in order to gain ...
    (microsoft.public.win32.programmer.wmi)
  • Error using WMI in 32 bit app in 64 bit OS
    ... I'm getting an error when setting up my WMI connection. ... The WMI calls are part of a plugin that runs as a 32 bit process. ... HRESULT hres; ... // Error handling and cleanup ...
    (microsoft.public.win32.programmer.wmi)
  • RE: Error using WMI in 32 bit app in 64 bit OS
    ... I was under the impression that the WMI namespace should be "ROOT\\WMI" ... I'm getting an error when setting up my WMI connection. ... HRESULT hres; ...
    (microsoft.public.win32.programmer.wmi)
  • Re: check for presence of a registry key on remote computers
    ... > also error handle the WMI connection, take a look here for an example: ... > Microsoft MVP Scripting and WMI, ... > Administration scripting examples and an ONLINE version of the 1328 page ...
    (microsoft.public.scripting.vbscript)