WMI Script takes too long

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi,

Long time listener, first time caller.....

We have 500+ Citrix servers and, quite frankly, we don't trust
Citrix.

We've had a few major productions outages due to the fact that the
Citrix Loadbalancer goes screwy and causes what's know as the Black
Hole Effect - a metaframe cannot report back its load and for some
reason, the load balancer thinks its free and dumps all new
connections on it

What i'm aiming to do is query the Active/Inactive TS sessions via the
PerfMon data. Problem is, it takes the script 5 secs do return the
value for one server. With 500 metaframes to query, it adds up.

I'm pretty sure its generally the WMI query across the network to a
remote box so i don't know if there is any further optimization that
can be done. If there is i'd love to know

The option would be to kick 20+ instances all at once against and
repeat. The batch file "start" would start new threads but can be a
little messy.

Can anyone suggest a better way to do this? I'm more than open to an
C# ideas as well

thanks
Clay

strComputer = "10.13.138.108"
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root
\cimv2")
Set colItems = objWMIService.ExecQuery("Select ActiveSessions,
InactiveSessions, TotalSessions from
Win32_PerfFormattedData_TermService_TerminalServices",,48)
For Each objItem in colItems
Wscript.Echo "ActiveSessions: " & objItem.ActiveSessions
Wscript.Echo "InactiveSessions: " & objItem.InactiveSessions
Wscript.Echo "TotalSessions: " & objItem.TotalSessions
Next

.



Relevant Pages

  • Re: Password Expiry Notice not taking effect in Citrix
    ... not on the citrix servers so I dont know what the difference is. ... the registry setting I can test it out and get back to you. ... The password policy is a bit unique/confusing for one main reason. ...
    (microsoft.public.win2000.group_policy)
  • Re: Need assitance with rules.
    ... I don't know much about Citrix so I am guessing here.... ... There are two preexisting ICA Protocols in ISA, ... When creating a server publishing rule one of those Citrix servers ... Would it be correct to create a custom protocol containing ports 81, ...
    (microsoft.public.isa)
  • Re: What job should I persue with new MCSE?
    ... Citrix servers, to "Citrix Administrator" for a project that is expected to ... >> (Switched jobs) ... > like saying McDonalds makes the best food in the world. ...
    (microsoft.public.cert.exam.mcse)
  • Re: Client Server Architecture versus Multi Tier Architecture
    ... Connection pooling and load balancing, etc. is being handled by Citrix and made easier. ... We have a C/S application with a major customer with 4-8 Citrix servers granting access to users from over 40 locations throughout the US with just one database server holding the data. ... our client is a "rich" client and it would have to go on a major diet. ...
    (borland.public.delphi.database.ado)
  • Linking List in Access 2003 - "People and Groups" Columns
    ... I have an Access 2003 database that is only being used to link a view ... in a SharePoint 2007 list that in turn is in a query to strip out the ... All fields come over and my query is rocking when I use Access ... When I open my db via Citrix, ...
    (microsoft.public.sharepoint.windowsservices)