This information is useful to system administrators who need to monitor system health. This example shows how to locate system sensors, report their current states, and flag any sensors that have abnormal states.
The example uses only CIM_NumericSensor instances for simplicity. You can also query discrete sensors by substituting CIM_Sensor for CIM_NumericSensor. Determining which values constitute normal sensor state is hardware-dependent.
This example shows how to get the sensor states by starting from the Interop namespace and traversing associations from the managed server Scoping Instance. Locating Sensor State from the Base Server Scoping Instance shows the relationships of the CIM objects involved. For information about getting sensor states by using only the Implementation namespace, see Monitor State of All Sensors By Using Only the Implementation Namespace.
This pseudocode depends on the pseudocode in Make a Connection to the CIMOM and Identifying the Base Server Scoping Instance.