Re: Question about WMI connection and concurrent use
- From: "Manfred Braun" <aa@xxxxx>
- Date: Fri, 20 May 2005 09:35:55 +0200
Hello Jim !
Why should I spawn external processes when a simple thread from the CLR does
it all with much less resources and even faster [I plan to query about 100
network boxes from within our country]. Since the event of .Net, I try do
make all my admin jobs in C#. Additionally, you can avoid a lot of runtime
errors [introduced in scripting at V5.1 with the "eval" and "execute"
statements], the CLR is MUCH more solid in handling this.
I have done this - not using a proxy server like in this case, but with
point to point wmi connections - to about 1.200 PCs from 1.200 different
threads within one application exe program and this works like a charm [this
was my "inventory overview", pulled it from that number of machines within 6
minutes!!!].
Best regards,
Manfred
"Jim Vierra" <jvierra@xxxxxxx> wrote in message
news:uqcrYwOXFHA.3184@xxxxxxxxxxxxxxxxxxxxxxx
> The issue from a programming perspective is - does the call return before
> it is complete?
>
> Using Shell.Exec you can start multiple scripts and wait on completion
> events. Each one should act as an independent client to the proxy. This
> may give you the effect you need. It should run multiple threads - one
for
> each host being queried. WMI is multi-threaded and has an asynchronous
> interface by definition.
>
> Try it. Start multiple ping scripts from one master script and watch them
> all run side-by-side.
>
>
> --
> Jim Vierra
>
> "Manfred Braun" <aa@xxxxx> wrote in message
> news:OJd4M9KXFHA.3032@xxxxxxxxxxxxxxxxxxxxxxx
> > Hello Jim
> >
> > and thanks for investigation.
> >
> > You would propably spent a lot of time making all the steps to follow
your
> > recommendations .......
> > Why not ask the experts, becaus they usually knows the answer????
> > I just shortly registered a new alias for the managed newsgroup -
> > according
> > to some recommendations from the msdn.general group and hope, the
request
> > will be read soon !!
> >
> > In my company, I have currently not the resources to follow all this
> > steps.
> > My only server, which is allowed to make snmp queries [which I call the
> > proxy] is blocked by huge load and some other long time taking admin
> > jobs[it
> > is also our management server].
> >
> > The only chance I see, is to build a similar environment with
simulation.
> > In
> > real life, there are many other WMI related task active, so I would
never
> > be
> > sure, what the number of threads is really telling me.
> >
> > Anyway if the proxy server does it's job synchronously or not is not my
> > main
> > interest. I need mainly to know if it makes sense to create multiple
> > connections from my management station, which starts the job, to the
proxy
> > server itself. Just, is one connection able to serve multiple outgoing
> > threads or if I have to create multiple connections. It is at all no
> > question about the best overall performance.
> >
> > I just hope, the managed newsgroups are of some help!
> > Thanks a lot and best regards,
> > Manfred
> >
> > "Jim Vierra" <jvierra@xxxxxxx> wrote in message
> > news:OjckkWJXFHA.1384@xxxxxxxxxxxxxxxxxxxxxxx
> >> 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" ??]
> >> >
> >>
> >>
> >
> >
>
>
.
- Follow-Ups:
- Re: Question about WMI connection and concurrent use
- From: Jim Vierra
- Re: Question about WMI connection and concurrent use
- References:
- Question about WMI connection and concurrent use
- From: Manfred Braun
- Re: Question about WMI connection and concurrent use
- From: Jim Vierra
- Re: Question about WMI connection and concurrent use
- From: Manfred Braun
- Re: Question about WMI connection and concurrent use
- From: Jim Vierra
- Question about WMI connection and concurrent use
- Prev by Date: Re: WMI and component services
- Next by Date: Re: Remotely installing filters and consumers
- Previous by thread: Re: Question about WMI connection and concurrent use
- Next by thread: Re: Question about WMI connection and concurrent use
- Index(es):
Relevant Pages
|