Computing.Net > Forums > Programming > WMI SPeed

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

WMI SPeed

Reply to Message Icon

Name: flam
Date: December 4, 2002 at 11:03:11 Pacific
OS: W2K
CPU/Ram: P4 1.6G
Comment:

Hello,

I am having some issues with how fast my VBScript is able to pull event log data over the network from my server using WMI. My server is not slow. It is a Pentium 4 1.6G and functioning only as a DC. The code below is section of concern. The variables s and l are the server name and log file type (eg system, application, etc) respectively. When I run this script against the locally connected server (so network speed is not an issue), I get a very very slow response, to a crawl, seems like data is just trickling in.

My question is this: When I execute the "Select * from Win32_NTLogEvent where LogFile=l" does the colLoggedEvents variable gets populated with the data right away or does it just create a connection to the object? It seems like it does not get all the data right away. So as I loop through the For Next loop, that is when it goes and gets the data. Am I right?

---Code---

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & s & "\root\cimv2")
Set colLoggedEvents = objWMIService.ExecQuery _
("Select * from Win32_NTLogEvent where LogFile='" & l & "'")

count = 1
For Each objEvent in colLoggedEvents
WScript.Echo(count & " " & objEvent.LogFile)
count = count + 1
Next

---End Code---



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: WMI SPeed

Check NIC speed and duplex settings www.computing.net/answers/programming/check-nic-speed-and-duplex-settings/18790.html

VC Program :Speed Optimization www.computing.net/answers/programming/vc-program-speed-optimization/5643.html

High speed dial-up www.computing.net/answers/programming/high-speed-dialup/9231.html