WMI Script takes too long
- From: clay.cini@xxxxxxxxx
- Date: 31 Jan 2007 01:01:07 -0800
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
.
- Prev by Date: Re: Determine if disk drive is on SAN or local using WMI
- Next by Date: Re: Exchange Public Folders not returned in query
- Previous by thread: Determine if disk drive is on SAN or local using WMI
- Next by thread: Re: Exchange Public Folders not returned in query
- Index(es):
Relevant Pages
|