Submit a ticketCall us

Don’t fall victim to a ransomware attack
Backups are helpful, but sometimes that’s not enough to protect your business against ransomware. At our live webcast we will discuss how to protect against ransomware attacks with SolarWinds® Patch Manager and how to leverage log data to detect ransomware. Register now for our live webcast.

Home > Success Center > Server & Application Monitor (SAM) > Windows Service Monitor returns 'Invalid Query'

Windows Service Monitor returns 'Invalid Query'

Overview

The Windows Service Monitor fails with one of the following errors:

  • Invalid query
  • Invalid class

 

The following Windows Management Instruments (WMI) classes are used by SAM for Windows Service Monitor:

  • Win32_Service - To monitor the status of the service.
  • Win32_PerfRawData_PerfProc_Process - To monitor the use of resources (CPU and memory).
  • Win32_Process

As part of the resolution, you may need to rebuild the performance counters. Information is provided in the resolution steps.

 

Environment

  • All versions of Windows
  • All versions of SAM

Cause 

The issue is caused when the following Windows Management Instruments (WMI) class is missing:

Win32_PerfRawData_PerfProc_Process 

Resolution

Reregister PerfMonCounters and WMI classes:

  1. Open an elevated CMD
  2. Reregister the PerfMonCounters and WMI Classes.

a. Open an elevated CMD window on the target system.

b. Go to the following directory:

-c:\windows\sysWOW64\

c. Type the following commands:

lodctr /R
wmiadap.exe /f

  1. If the WMI class is still missing, ensure that the following is not set and enabled in the registry:
KEY: “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\PerfProc\Performance”
Field: “Disable Performance Counters”
Value: 1
  1. If the entry is found and the value set to 1, set it to 0 and reboot the system.

You may also need to rebuild the performance counters. For information and instructions for rebuilding performance counters, see this Microsoft KB Article for Windows 2008: https://support.microsoft.com/en-us/...008-r2-systems

Please note: This is a third party link that may change.

 

* Please Note: This workaround has resolved this Error Message for a number of customers but if the above solution does not work on your Device we will require you to reach out to Microsoft for further troubleshooting as to why the class is not being provided by WMI. 

 

 

Last modified
01:33, 26 Jun 2017

Tags

Classifications

Public