Skip to main content

Monitoring Caché Using WMI


WMI support is deprecated in release 2015.1 of Caché. InterSystems recommends the use of SNMP and the robust Caché SNMP interface (see the “Monitoring Caché Using SNMP” appendix of this guide) for monitoring Caché. See in a new tab for more information.

Windows Management Instrumentation (WMI) is a feature of the Windows operating system that provides a standardized way of collecting management information. It allows users and programmers to access management information from the operating system and other applications in a variety of ways, including scripts, programming languages, and management tools and applications. WMI is the Microsoft implementation of the Web-based Enterprise Management (WBEM) standard from the Distributed Management Task Force (DMTF).

Caché implements several WMI classes of management information. It includes both an Instance provider to allow queries of performance and management data, and an Event provider which signals significant events or errors that may occur in Caché. See the Windows Management Instrumentation (WMI)Opens in a new tab section of the MSDN Library for a description of how to query WMI classes and how to receive WMI events.

The interface description includes the following topics:

Configuring WMI in Caché

To prepare the Caché environment for collecting WMI information, complete the following two tasks:

Enable Monitoring and WMI

To use WMI to collect Caché information, you must enable WMI collection as well as enabling the Caché monitoring service. From the Management Portal perform the following steps:

  1. Navigate to System > Configuration > Monitor Settings in the Management Portal.

  2. If the first line in the setting box indicates that the Monitor service is disabled, perform the following steps:

    1. Click Edit to display the Edit Service page for the %Service_Monitor service.

    2. Select the Service enabled check box and click Save, which returns you to the Monitor Settings page.

  3. Select Yes from the WMI Enabled list and click Save.

Compile WMI Classes

The IscProc.mof file defines the InterSystems WMI classes. The file is installed in the WMI subdirectory of the manager’s directory install-dir\Mgr (where install-dir is the installation directory your instance). The following example uses C:\MyCache as the installation directory.

This text file describes the InterSystems management classes in Managed Object Format (MOF). You must compile these classes into the WMI repository on your system before you can use them. From a Windows command prompt, use the mofcomp.exe Microsoft tool to compile the classes as shown in the following example:

C:\>cd c:\MyCache\mgr\WMI

C:\MyCache\Mgr\WMI>mofcomp IscProv.mof
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: IscProv.mof
MOF file has been successfully parsed
Storing data in the repository...


Using WMI with Caché

Caché stores its WMI classes in the root\cache namespace in the WMI repository. Once you compile these WMI classes and they are in the WMI repository, you can access the management information using scripts, programming languages, or management tools.

Using a basic tool such as WMI CIM Studio (available as part of the WMI Administrative Tools from Microsoft) you can browse through all the classes in the root\cache namespace, list all properties for each class, and view the help text for each class which includes descriptions of each property. You can also query the Caché system for all instances of each class, which displays the live data from a running instance.

The Cache_DatabaseSystem class enumerates all instances of Caché installed on the system (from the Windows Registry), and shows which ones are running and connected (EnabledState=2). Other classes only show data for WMI-enabled instances of Caché.

Caché also signals WMI events, which you can receive using scripts, programs, or management tools. The WMI Administrative Tools include a basic WMI Event Viewer. The Cache_Event class is defined as a subclass of the __ExtrinsicEvent class; you can view its properties by navigating the __SystemClass hierarchy using WMI CIM Studio. The WMI Events are the same events defined as SNMP Notifications. You can find the most current list by inspecting the ISC-CACHE.MIB file in the SNMP directory of your Caché installation. See the “Monitoring Caché Using SNMP” chapter of this guide for details.

The current events signaled by Caché include:

Event Description
cacheStart Caché instance startup
cacheStop Caché instance shutdown
cacheDBExpand Database expansion successful
cacheDBOutOfSpace Database expansion close to limit (not enough free space for 10 more expansions or less than 50 MB free space)
cacheDBStatusChange Database read/write status change
cacheDBWriteFail Database write failure
cacheWDStop Write daemon stalling
cacheWDPanic Write daemon entering panic mode
cacheLockTableFull Lock table full (out of memory)
cacheProcessFail Caché process access violation
cacheECPTroubleDSrv ECP data server connection in trouble mode
cacheECPTroubleASrv ECP application server connection in trouble mode
cacheAuditLost System unable to record audit events
cacheLoggedError Writing severe error to the console log
cacheLicenseExceed License request exceeds available or allowed licenses
cacheAppAlert Generating an application alert by calling the %Monitor.Alert.External method

There are additional events if you are using Ensemble. See Using WMI with Ensemble for details.

The iscprov.dll handles all communications between WMI and Caché and implements both the Caché WMI instance provider and event provider. The Caché installation registers the file and puts it in the C:\Program Files\Common Files\InterSystems\Cache directory.

The WMI service loads the provider DLL when requests are made and may unload it after it has been idle for a period of time. When the DLL is loaded it initiates communication with Caché and starts a ^WMI server process in Caché. That server process is then terminated when the DLL is unloaded. Depending on how often your script or management application intends to collect information, you may want to change the default “lifetime” period for instance providers, which is only thirty seconds. Using the WMI CIM Studio from the \root namespace, expand the class hierarchy for __SystemClass, __CacheControl, and __ObjectProviderCacheControl. Change the value of the ClearAfter property to allow the Caché instance provider to remain loaded for a longer period.

Caché writes important messages from the ^WMI server process in the cconsole.log file. It also logs any errors that occur in the iscprov.dll (which implements the WMI Instance Provider and Event Provider for Caché) in the iscwmi.log file in the \WINDOWS\system32\WBEM\Logs\ directory.

Using WMI with Ensemble

Ensemble also stores its WMI classes in the root\cache namespace in the WMI repository. Once you compile the Ensemble WMI classes and they are in the WMI repository, you can manage them in the same manner as described in Using WMI with Caché.

The Ensemble_LogEvent class is defined as a subclass of the __ExtrinsicEvent class. Ensemble sends a WMI Ensemble_LogEvent instance whenever it posts an alert to the Ensemble Event Log.

Generating a WMI Documentation Text File

You can generate a text file of the classes and properties that InterSystems provides for WMI by using the doc entry point of the Caché ^WMIMOF routine. For example:

File: <IscProv.txt>

Press Enter to create the IscProv.txt file in the Mgr directory:

Creating doc file for WMI Classes ...
FeedbackOpens in a new tab