Eduardo Wada
Eduardo Wada

Reputation: 2647

WMI Query extremely slow

I'm trying to run a query that gets the windows service name corresponding to a process ID:

SELECT * FROM Win32_Service where ProcessId = {myID}

This query is expected to run for valid or invalid process IDs as my component may run on a windows service, or as part of the main application or even tests.

When I use run > wbemtest and test this query with a non existing pid it usually comes back instantly, but there's one machine where this takes 2 minutes.

I don't understand why this runs so much slower on that machine particularly, is there a way to diagnose what's causing this? How can it be fixed?

Upvotes: 1

Views: 1456

Answers (1)

Dominique
Dominique

Reputation: 17555

For investigating WMI issues, there are different places in the event viewer:

  • Windows Logs, Application and System
  • Application and Services Logs
    • Microsoft
      • Windows
      • WMI-Activity (in the View menu, you might need to switch on "Show Analytic and Debug logs)

A lot is described in this URL.

Upvotes: 0

Related Questions