Submit a ticketCall us

WebinarUpcoming Webinar: Easily Automate Backups and Simplify Log Message Management

Backing up your network configuration and logging data are a few steps to helping keep your network safe. In this in-depth webinar, we’ll show you how these tasks can be automated to save your IT team time while maintaining accurate archives of your data.

Register now.

Home > Success Center > Server & Application Monitor (SAM) > SAM - Knowledgebase Articles > 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

Tags

Classifications

Public