Monitoring InterSystems IRIS Using WMI
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).
InterSystems IRIS 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 InterSystems IRIS. See the Windows Management Instrumentation (WMI)
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:
To prepare the InterSystems IRIS environment for collecting WMI information, complete the following two tasks:
To use WMI to collect information, you must enable WMI collection as well as enabling the monitoring service. From the Management Portal perform the following steps:
If the first line in the setting box indicates that the Monitor service is disabled, perform the following steps:
to display the Edit Service
page for the %Service_Monitor
file defines the InterSystems WMI classes. The file is installed in the WMI subdirectory of the manager’s directory install-dir\Mgr
is the installation directory your instance). The following example uses C:\MyIris
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:
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...
InterSystems IRIS 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 InterSystems IRIS system for all instances of each class, which displays the live data from a running instance.
class enumerates all instances of InterSystems IRIS 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 InterSystems IRIS.
The current events signaled by InterSystems IRIS include:
handles all communications between WMI and InterSystems IRIS and implements both the InterSystems IRIS WMI instance provider and event provider. The InterSystems IRIS installation registers the file and puts it in the C:\Program Files\Common Files\Intersystems\IRIS
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 InterSystems IRIS and starts a ^WMI
server process in InterSystems IRIS. 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
, and __ObjectProviderCacheControl
. Change the value of the ClearAfter
property to allow the InterSystems IRIS instance provider to remain loaded for a longer period.
InterSystems IRIS 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 InterSystems IRIS
You can generate a text file of the classes and properties that InterSystems provides for WMI by using the doc
entry point of the InterSystems IRIS ^WMIMOF
routine. For example:
Creating doc file for WMI Classes ...