HP Client Management Interface Technical Whitepaper
HP Client Management Interface Technical Whitepaper
HP Client Management Interface Technical Whitepaper
Table of Contents:
Introduction ........................................................................................................ 2 Background ........................................................................................................ 2 Benefits ............................................................................................................... 4 Flexible and Open........................................................................................... 4 Consistent ....................................................................................................... 4 Easy to Manage .............................................................................................. 4 Architecture ........................................................................................................ 4 Hardware Sensor Information ......................................................................... 6 Hardware Configuration Options ..................................................................... 7 System Health Events ...................................................................................... 8 Available Software Products ................................................................................ 8 HP Client Management Interface Software Providers ........................................ 8 HP BIOS Configuration for ProtectTools ............................................................ 9 HP Client Manager .......................................................................................... 9 HP System Software Manager ......................................................................... 9 Developing Custom Solutions ............................................................................... 9 Hardware Sensor Information ....................................................................... 10 MOF Definition ..................................................................................... 10 Property Details .................................................................................... 11 List of Sensors ....................................................................................... 12 Hardware Configuration Options ................................................................... 13 MOF Definition ..................................................................................... 13 Property Details .................................................................................... 15 System Health Events .................................................................................... 17 MOF Definition - HPBIOS_BIOSEvent...................................................... 17 Property Details - HPBIOS_BIOSEvent .................................................... 17 Monitoring Events ................................................................................. 19 List of Events ......................................................................................... 20 How to get the List of Hardware Events Supported on a Platform ............21 MOF Definition - HP_PlatformEvents ...................................................... 21 Property Details - HP_PlatformEvents ..................................................... 22 How to Fire a Test Hardware Event........................................................ 22
MOF Definition - FireTestEvent() ............................................................. 23 Parameters ........................................................................................... 23 Notes ................................................................................................... 24 Example Applications .................................................................................... 24 Retrieving BIOS Settings ........................................................................ 24 Changing the Ownership Tag ................................................................ 25 Changing the Boot Order ...................................................................... 26 Enabling Hyper-Threading .................................................................... 26 Setting BIOS Defaults ............................................................................ 27 Monitoring Events using Script ............................................................... 28 Enumerating Supported Sensors ............................................................ 29 Enumerating Supported Events .............................................................. 30 Receiving Events using Permanent Event Consumer ................................31 Firing a Test Event ................................................................................. 32 Security ............................................................................................................ 33 Preserving Password Integrity........................................................................ 33 Remote Execution .......................................................................................... 33 Use Dynamic Arguments ............................................................................... 33 HP Client Management Password Control ...................................................... 34 Configuring WMI Security.............................................................................. 35 Appendix A ...................................................................................................... 37 HP Client Management Interface BIOS Software Provider................................37 For More Information ........................................................................................ 38 Call to action ..................................................................................................... 38
Introduction
This white paper provides technical information on the HP Client Management Interface (HP CMI). HP CMI is an open architecture for gathering client computer inventory, monitoring health events, and managing BIOS configuration settings on HP business class client computers. This interface is included standard on select new models beginning with the HP Compaq dc7600 series and dx7200 series business desktops, and the HP xw4300 workstation. An HP CMI Software Provider SoftPaq is also available for legacy models and may be downloaded from HP.com. This document describes the business need which drove development of HP CMI, benefits of the interface, architectural details, examples of how HP CMI can be used to carry out various client management tasks, and the security model.
Background
Historically, it has been a challenge for customers to easily integrate HP client computers with systems management tools and applications they are using. The typical management software model relies on a software management agent installed on the client computer. This software agent exposes management instrumentation through a proprietary driver and hardware interface and
communicates with the systems management tool console. Often, the software agent must be updated and redeployed as new manageability features and new computer models are introduced.
This traditional management software model contains three tightly integrated components: the computer hardware to be instrumented, an operating system specific driver to surface the instrumentation, and a software agent to expose and communicate the instrumented data with the management software console. In most cases these software agents are further specialized by the manner they surface the instrumented data to applications. This approach has made integration of advanced management features into commercial management software slow, and development of feature-rich custom-developed management applications difficult to accomplish. Recognizing the need for a better solution, HP has developed the HP Client Management Interface. HP CMI provides a zero-footprint, programmatic interface built on industry standards that systems management tools and custom management applications can access to gather inventory information, health alerts, and manage BIOS configuration.
Benefits
HP business-class client computers equipped with HP Client Management Interface technology provide an unprecedented level of out-of-the-box management capability. HP CMI provides the following benefits:
Consistent
Provides a common interface to management information across HP businessclass client computers equipped with HP CMI. Provides a stable foundation to future hardware management features. Interface behavior is consistent between 32-bit and 64-bit versions of Windows, and the next version of the Windows operating system.
Easy to Manage
No software agent is required to access client computer inventory information, health status and manage BIOS configuration. New client computers seamlessly integrate into the managed environment without re-tooling management software. Leverages operating system policies for configuration and security.
Architecture
Systems management technology has matured in recent years with the widespread adoption of the Common Information Model (CIM) and Web-Based Enterprise Management (WBEM) as a vendor-neutral method for describing the myriad of management elements available across the enterprise from client systems to storage area networks. This trend has made management of enterprise resources easier, and systems management applications more powerful in their ability to interpret heterogeneous management information. Windows Management Instrumentation is Microsofts implementation of the WBEM initiative, and is available as a component of the operating system. WMI uses the CIM standard to represent systems, applications, networks, devices, and other
managed components. WMI can be used to automate administrative tasks in an enterprise environment. WMI features query-based information retrieval, relationship and data modeling, event subscription services, and access from any programming language capable of supporting Component Object Model (COM)1, such as C++, Visual Basic, or scripting languages under Windows Scripting Host.
Network Client
OS Hardware
HP Client Management Interface leverages WMI to surface management information directly from the hardware and system BIOS, and in doing so gains all the benefits associated with the WMI interface to management information.
1 Component Object Model is a specification developed by Microsoft. It provides the framework for technologies such as ActiveX.
HP CMI exposes three classifications of management information about the underlying hardware platform: Hardware sensor information This includes information about physical sensors within the client computer. The interface supports a wide variety of sensor types, including both numerical sensors such as fan speed (rpm) and sensors based on a physical state, such as the state of a case lock (open, closed). Sensor data is surfaced as an enumeration in WMI, which provides flexibility in the number and types of sensors reported from platform to platform. Hardware configuration options Instrumentation information related to configuring hardware options includes a multitude of features. These features are exposed in both a general and specialized manner to systems management applications. As with sensor data, hardware configuration options are surfaced as an enumeration in WMI, which provides flexibility in the number and types of sensors reported from platform to platform. System health events System health events are dynamically surfaced based on triggered hardware events. WMI provides a convenient, low-bandwidth mechanism for management information consumers to subscribe to these hardware events and be notified in real-time. These events can be monitored at the local client computer or by a remote console.
HP_BIOSStateSensor
Management Class
Description Examples of state-based sensors would include POST warnings, physical switches, or solenoids. Defines the category of sensors that return numerical measurements.
HP_BIOSNumericSensor
HP_BIOSString
HP_BIOSInteger HP_BIOSEnumeration
HP_BIOSOrderedList HP_BIOSPassword
HP_BIOSSettingInterface
Device failures
Configuration changes
HP Client Manager
HP Client Manager provides centralized hardware management of HP business PCs, notebooks and workstations. Features include the ability to get in-depth hardware inventory information, monitor system health status, run diagnostic tests, remotely install drivers, and manage BIOS settings updates without visiting each client computer. Beginning with version 6.1, HP Client Manager takes advantage of HP CMI exposed features and capabilities.
10
Property Details
Class Property Name Description Description Name identifying the sensor being reported. Typically this will follow the format <device>_<device number> (ex: Fan_01). A textual description of the sensor. This may indicate which entity this sensor monitors in a form-factor that could have multiple sensors of the same type. The type of the Sensor, e.g. Voltage or Temperature Sensor. If the type is set to "Other," then the OtherSensorType can be used to further identify the type, or if the Sensor has numeric readings, then the type of the Sensor can be implicitly determined by the Units. A description of the different Sensor types is as follows: A Temperature Sensor measures the environmental temperature. Voltage and Current Sensors measure electrical voltage and current readings. A Tachometer measures speed/revolutions of a device. For example, a Fan Device can have an associated Tachometer which measures its speed. A Counter is a general purpose Sensor that measures some numerical property of a Device. A Counter value can be cleared, but it never decreases. A Switch Sensor has states like Open/Close, On/Off, or Up/Down. A Lock has states of Locked/Unlocked. Humidity, Smoke Detection, and Air Flow Sensors measure the equivalent environmental characteristics. A Presence Sensor detects the presence of a physical element. A string describing the Sensor type. Used when the SensorType property is set to "Other." Indicates the current status(es) of the element. Various operational statuses are defined. Many of the enumeration's values are self-explanatory. However, a few are not and are described in more detail. "Stressed" indicates that the element is functioning, but needs attention. Examples of "Stressed" states are overload, overheated, etc. "Predictive Failure" indicates that an element is functioning nominally but predicting a failure in the near future. "In Service" describes an element being configured, maintained, cleaned, or otherwise administered. "No Contact" indicates that the monitoring system has knowledge of this element, but has never been able to establish communications with it. "Lost Communication" indicates that the ManagedSystemElement is known to exist and has been contacted successfully in the past, but is currently unreachable. "Stopped" and "Aborted" are similar, although the former
SensorType
OtherSensorType OperationalStatus
11
Class Property
Description implies a clean and orderly stop, while the latter implies an abrupt stop where the element's state and configuration may need to be updated. "Dormant" indicates that the element is inactive or quiesced. "Supporting Entity in Error" describes that this element may be "OK" but that another element, on which it is dependent, is in error. An example is a network service or endpoint that cannot function due to lower layer networking problems. "Completed" indicates the element has completed its operation. This value should be combined with either OK, Error, or Degraded so that a client can tell if the complete operation passed (Completed with OK), or failed (Completed with Error). Completed with Degraded would imply the operation finished, but did not complete OK or report an error. "Power Mode" indicates the element has additional power model information contained in the Associated PowerManagementService association.
PossibleStates
PossibleStates enumerates the string outputs of the Sensor. For example, a "Switch" Sensor may output the states "On," or "Off." Another implementation of the Switch may output the states "Open," and "Close." Another example is a NumericSensor supporting thresholds. This Sensor can report the states like "Normal," "Upper Fatal," "Lower Non-Critical," etc. A NumericSensor that does not publish readings and thresholds, but stores this data internally, can still report its states. The current state indicated by the Sensor. This is always one of the "PossibleStates. The base unit of the values returned by this Sensor. All the values returned by this Sensor are represented in the units obtained by (BaseUnits * 10 raised to the power of the UnitModifier). For example, if BaseUnits is Volts and the UnitModifier is -6, then the units of the values returned are MicroVolts. The unit multiplier for the values returned by this Sensor. All the values returned by this Sensor are represented in the units obtained by (BaseUnits * 10 raised to the power of the UnitModifier). For example, if BaseUnits is Volts and the Unit Modifier is -6, then the units of the values returned are MicroVolts. The current value indicated by the sensor.
CurrentState BaseUnits
UnitModifier
CurrentReading
List of Sensors
The following section lists the sensors supported on most HP business-class client models. Some sensors may be discontinued and new ones may be introduced to
12
support new features. A query to enumerate this class instances will give a comprehensive list of sensors supported on a system. An example script, Enumerating Supported Sensors is provided later in this paper to demonstrate this.
State Sensors
Time & Date Not Set Memory Size Error DIMM Configuration Warning CPU fan not detected Rear Chassis fan not detected Front Chassis fan not detected Power Supply fan not detected The computer cover has been removed Front Audio Not Connected Front USB Not Connected SMART Hard Drive detects imminent failure Microcode Update Error Memory not configured correctly for proper MEBx execution (no longer applicable for newer platforms)
Numeric Sensors
CPU Thermal Index Chassis Thermal Index (Ambient) CPU Fan Speed Front Chassis Fan Speed Rear Chassis Fan Speed Power Supply Fan Speed Accelerometer (Notebooks only) Ambient Light Sensor (Notebooks only)
13
class HP_BIOSString : HP_BIOSSetting { [read] uint32 MinLength; [read] uint32 MaxLength; }; class HP_BIOSInteger : HP_BIOSSetting { [read] uint32 LowerBound; [read] uint32 UpperBound; [read] uint32 IntValue; }; class HP_BIOSEnumeration : HP_BIOSSetting { [read] string CurrentValue; [read] uint32 Size; [read] string PossibleValues[]; }; class HP_BIOSOrderedList : HP_BIOSSetting { [read] uint32 Size; [read, ArrayType("orderlist")] string Elements[]; }; class HP_BIOSPassword : HP_BIOSSetting { [read] uint32 MinLength; [read] uint32 MaxLength; [read] string SupportedEncoding[]; [read] uint32 IsSet; }; [abstract, singleton] class HP_BIOSSettingInterface { [implemented] void SetBIOSSetting( [out, ValueMap {"0","1","2","3","4","5","6"}, Values {"Success","Not Supported","Unspecified Error", "Timeout","Failed","Invalid Parameter","Access Denied"}] uint32 Return, [in] string Name, [in] string Value, [in, optional] string Password); [implemented] void SetSystemDefaults( [out: ToSubclass ToInstance, [out, ValueMap {"0","1","2","3","4","5","6"}, Values {"Success","Not Supported","Unspecified Error", "Timeout","Failed","Invalid Parameter","Access Denied"}] uint32 Return, [in, optional] string Password); };
In the MOF definition provided, notice that all of the class properties are read only. These classes do not support update dynamic instance updates via the WMI _Put method. To change any of the instances requires using the methods surfaced from
14
the HP_BIOSSetingInterface class. Example scripts to demonstrate the use of this class are provided later in this paper.
Property Details
Class Property Name Description This property contains the human readable name for the BIOS setting. This text should be similar to what is exposed through the F10 Computer Setup application. Setting names are unique in nature, as this value is used to identify the entity to change or update in calls through calls to the SetBIOSSetting() method. This property contains a string representation of the intended BIOS setting. List entities are separated by commas. Enumeration selections are designated by the presence of an asterisk character. (ex: *Enable, Disable denotes a setting is enabled in an enumeration setting.) This property provides a string representation of the setting hierarchy that encapsulates this instance data. Each level of the hierarchy is separated by a backslash. This hierarchy will usually follow the appearance and grouping of items within F10 Computer Setup. Value indicating if this setting is supported by the interface method HP_BIOSSettingInterface.SetBIOSSetting(). A value of 1 indicates that this particular setting instance cannot be changed, otherwise the property is 0. Flag indicating this component should be visible within a BIOS configuration user interface application. This property field is used by utilities such as HP BIOS Configuration for ProtectTools to filter elements that are not applicable to a given platform. A value of 1 indicates that attempts to modify this setting will require interactive acknowledgement during the next system startup. Otherwise, the property is 0. This property is provided for future compatibility. This property provides an ordering sequence for the instances being enumerated through WMI. It is used in conjunction with the Path property to help generate UI representations of the BIOS setting data. The values are for all instances, are arranged in ascending order, and gaps in the sequence are acceptable. In the event that multiple setting instances share the same Sequence value, or the value is NULL, the Path and Name information is used to determine order. Prerequisites This property array allows the system BIOS to define prerequisite conditions that affect the use of the current instance. This property is provided for future compatibility.
Value
Path
IsReadOnly
DisplayInUI
RequiresPhysicalPresence
Sequence
15
Description This property identifies the minimum string length allowed when modifying this BIOS setting. Otherwise, the value is zero. This property defines the maximum string length in characters. This property defines the lower limit when modifying this setting. This property defines the upper limit when modifying this setting. This property contains an integer representation of the string stored in the Value base class property. This property contains the string representation of the current active state for this BIOS setting. This property contains a string array representing the possible setting states. This property contains a string array representing the ordered list of elements. The first entry (Element[0]) represents the first item in the ordered list. The value contained in this property denotes the number of elements contained within a corresponding array property. This field is used in conjunction with either the Elements or PossibleValues array properties. This property contains an array of strings representing the encoding tags the BIOS supports for denoting a password parameter string. Encoding tags are used to denote the format of a password string that is being passed into the BIOS and follow the syntax <tag/>, where tag is defined by the array element entries. kbd denotes a string in hexadecimal format containing keyboard scan code input. This feature should be supported by all BIOS implementations. An example of a password structured in this format would be <kbd/>321539191E1F1F11181320, which is my password in US keyboard scan codes. This field provides the ability to surface new BIOS capabilities in defining password argument syntax without changing the interface design. As new elements are added to this array, new encoding features such as parameter encryption will be introduced.
Size
SupportedEncoding
IsSet
This property indicates whether a particular password setting instance is currently set (1) or blank (0). Use this property to determine that state of a password setting, since the Value property for a password instance will always be blank.
16
Severity
17
Class Property
Description by this element has been lost. "Critical Failure" (25) - The element is non-functional and recovery MAY NOT be possible. "Major Failure" (20) - The element is failing. It is possible that some or all of the functionality of this component is degraded or not working. "Minor Failure" (15) - All functionality is available but some MAY be degraded. "Degraded/Warning" (10) - The element is in working order and all functionality is provided. However, the element is not working to the best of its abilities. For example, the element may not be operating at optimal performance or it may be reporting recoverable errors. "OK" (5) - The element is fully functional and is operating within normal operational parameters and without error. "Unknown" (0) - The implementation cannot report on Severity at this time.
Status
Indicates the current status(es) of the element. Various operational statuses are defined. Many of the enumeration's values are self-explanatory. However, a few are not and are described in more detail. "Stressed" indicates that the element is functioning, but needs attention. Examples of "Stressed" states are overload, overheated, etc. "Predictive Failure" indicates that an element is functioning nominally but predicting a failure in the near future. "In Service" describes an element being configured, maintained, cleaned, or otherwise administered. "No Contact" indicates that the monitoring system has knowledge of this element, but has never been able to establish communications with it. "Lost Communication" indicates that the ManagedSystemElement is known to exist and has been contacted successfully in the past, but is currently unreachable. "Stopped" and "Aborted" are similar, although the former implies a clean and orderly stop, while the latter implies an abrupt stop where the element's state and configuration may need to be updated. "Dormant" indicates that the element is inactive or quiesced. "Supporting Entity in Error" describes that this element may be "OK" but that another element, on which it is dependent, is in error. An example is a network service or endpoint that cannot function due to lower layer networking problems.
18
Class Property
Description "Completed" indicates the element has completed its operation. This value should be combined with either OK, Error, or Degraded so that a client can tell if the complete operation passed (Completed with OK), or failed (Completed with Error). Completed with Degraded would imply the operation finished, but did not complete OK or report an error. "Power Mode" indicates the element has additional power model information contained in the Associated PowerManagementService association.
Monitoring Events
Monitoring system health events is one of the more advanced aspects of the HP Client Management Interface. These WMI events can only be consumed by Event Consumers. Event Consumers are applications or scripts that request notification of events, and then perform tasks when specific events occur. There are two types of Event Consumers: Temporary Consumers: You can create event monitoring scripts or applications that temporarily monitor when events occur. However the disadvantages of such an approach are: The script process needs to run all the time. The script will receive WMI events only while it is running, and while it is running, it consumes system resources. This may become a problem if you have multiple scripts running at the same time. The process can be easily interrupted. Scripts are typically run from the Command Prompt, so they can easily be interrupted, either by closing the Command Prompt box, or by pressing Ctrl+C. A sample script which waits indefinitely until terminated and polls for the BIOS event is shown in Monitoring Events using Script example. Permanent Consumers: This is the preferred method in an enterprise scenario. This type of an event consumer is registered with WMI and enables receiving events at all times. WMI supplies a set of preinstalled permanent event providers and permanent consumer classes that enable you to perform any actions in response to the event. Or a new permanent event consumer provider can be created to support customized response action. A permanent event consumer runs until its registration is explicitly canceled, and then starts up when WMI or the system restarts. A sample set up for a permanent consumer is detailed in the Receiving Events using Permanent Event Consumer example in the section below.
19
List of Events
The list of software events supported by HP CMI software providers is below. Please note that HP CMI software providers need to be installed on the client system to support these.
Name Configuration Change Description The monitor configuration has changed since last time HP Monitor Software Provider was run (only for systems with HP CMI Software Providers installed). The PNP device configuration has changed since last time HP PNP Device Software Provider was run (only for systems with HP CMI Software Providers installed). Category 1 (Configuration Change) Severity NA Status NA
Configuration Change
1 (Configuration Change)
NA
NA
In general, all enterprise platforms that support WMI BIOS alerts will report the following hardware events: fan stall events, CPU thermal events, BIOS configuration change events, and failed BIOS configuration change events due to invalid password. Newer systems will also support Ambient Thermal events (Chassis Thermal Index). Systems with Smart Cover Removal Sensor should give a "Hood Intrusion" event. As the list of events is subject to change, to get the events actually supported on a given computer system, use the HP_PlatformEvents class detailed in the next section. The list of hardware events supported by HP CMI on most of the enterprise products is below.
Name CPU Fan Stall Description This value corresponds to the HP_BIOSSensor.Name property of the sensor instance in error. This value corresponds to the HP_BIOSSensor.Name property of the sensor instance in error. This value corresponds to the HP_BIOSSensor.Name property of the sensor instance in error. This value corresponds to the HP_BIOSSensor.Name Category 3 (Sensor) Severity 25 (Critical Failure) 25 (Critical Failure) 25 (Critical Failure) 25 (Critical Status 5 (Predictive Failure) 5 (Predictive Failure) 5 (Predictive Failure) 5 (Predictive
3 (Sensor)
3 (Sensor)
3 (Sensor)
20
Name
Description property of the sensor instance in error. This value corresponds to the HP_BIOSSensor.Name property of the sensor instance in error. This value corresponds to the HP_BIOSSensor.Name property of the sensor instance in error. An attempt has been made to access BIOS features unsuccessfully This value corresponds to the HP_BIOSSetting.Name property of the sensor instance in error. The computer cover has been removed (only for systems with Smart Cover Removal Sensor).
Category
Thermal Caution
3 (Sensor)
Thermal Critical
3 (Sensor)
0 (Unknown)
1 (Other)
21
"30", ".."}, Values {"Unknown", "OK", "Degraded/Warning", "Minor Failure", "Major Failure", "Critical Failure", "Non-recoverable Error", "DMTF Reserved"}] uint32 PossibleSeverity[]; read, ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "..", "0x8000.." }, Values { "Unknown", "Other", "OK", "Degraded", "Stressed", "Predictive Failure", "Error", "Non-Recoverable Error", "Starting", "Stopping", "Stopped", "In Service", "No Contact", "Stopped", "In Service", "No Contact", "Lost Communication", "Aborted", "Dormant", "Supporting Entity in Error", "Completed", "Power Mode", "DMTF Reserved", "Vendor Reserved" }] uint32 PossibleStatus[]; };
PossibleStatus
22
is designed to be used for testing management application frameworks or for demonstration purposes. The call requires BIOS administrator privileges in order to create the simulated event. Also events created via FireTestEvent() will be marked as such when fired with the Name property of the event set to TEST EVENT.
Parameters
Class Property Return Description Pre-defined error return codes. Success denotes that the BIOS setting was changed successfully. Most settings will still require a system restart to take effect. Successful setting changes will trigger a BIOS Configuration event. Not Supported denotes that the requested setting to change is not supported on this system, i.e. the Name parameter is invalid. Invalid Parameter refers to the inability to translate the contents of the Value parameter into something the BIOS understands. Access Denied denotes that the password is either missing or incorrect when making the specified setting change. Access Denied errors are counted and will trigger a BIOS Configuration event. Failed is a catchall return for other errors that may occur during the process of updating configuration data. Do not however use Failed for any of the situations described above.
Values for this property are defined by the CIM Specification as: CIM_ConcreteJob.GetError Name This string is used to identify the false HP_BIOSEvent that is to be generated. For more information, refer to HP_BIOSEvent
23
Class Property
Description and HP_PlatformEvents class descriptions. Ex: CPU Fan Stall or Front Chassis Fan Stall etc. The administrator password credential. On non-UEFI systems, the password is based off of keyboard scan codes. This will typically be a hex-encoded string of the scan code values. Use unicode encoding for UEFI based BIOSs. The password string can be qualified by the addition of an encoding tag to denote different encoding mechanism used to transmit the password, such as: <kbd/> followed by a byte encoding based on keyboard scan codes. Ex: testpassword = <kbd/>0203040506070809 <utf-16 /> followed by a clear-text password string that is based on the US English codepage. In this mode spaces are treated as part of the password credential. Ex: testpassword = <utf-16/>testpassword
Password
Notes
The FireTestEvent() method does not allow the caller to simulate events that return multiple Status values. It also is not the responsibility of the BIOS to validate that the combination of parameters passed into FireTestEvent() actually correlate to an event that the BIOS based HP CMI implementation is capable of generating. It is therefore the responsibility of the calling application to validate the integrity of the parameters being used. The FireTestEvent() method should return an error indicating Access Denied in the event that the method is called when a BIOS administrator password does not exist on the system. This method returns Invalid Parameter error if the name of the event to fire does not match a valid supported event on the system.
Example Applications
Retrieving BIOS Settings
The following script will enumerate all the available settings within a computer. This example uses semi-synchronous access for the purpose of simplifying the example. However, the interface supports either semisynchronous or asynchronous access.
Const wbemFlagReturnImmediately = 16 Const wbemFlagForwardOnly = 32 lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly strService = "winmgmts:{impersonationlevel=impersonate}//" strComputer = "." strNamespace = "/root/HP/InstrumentedBIOS" strQuery = "select * from HP_BIOSSetting" Set objWMIService = GetObject(strService & strComputer & _
24
strNamespace) Set colItems = objWMIService.ExecQuery(strQuery,,lFlags) Counter = 1 For Each objItem In colItems WScript.Echo Counter & vbTab & objItem.Name & _ " = " & objItem.Value Counter = Counter + 1 Next
25
Enabling Hyper-Threading
Here is a sample script to change the hyper-threading setting. The value field may need some modification. Note that E302E020304 is the keyboard scan code for the keys abc123.
Const wbemFlagReturnImmediately = 16 Const wbemFlagForwardOnly = 32 lFlags = wbemFlagReturnImmediately + wbemFlagForwardOnly strService = "winmgmts:{impersonationlevel=impersonate}//" strComputer = "." strNamespace = "/root/HP/InstrumentedBIOS" strQuery = "select * from HP_BIOSSettingInterface" Set objWMIService = GetObject(strService & _ strComputer & strNamespace) Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
26
For each objItem in colItems objItem.SetBiosSetting oReturn, _ "Hyper-Threading", _ "Enable", _ "<kbd/>1E302E020304" Next Dim strReturn Select Case oReturn Case 0 strReturn = "Success" Case 1 strReturn = "Not Supported" Case 2 strReturn = "Unspecified Error" Case 3 strReturn = "Timeout" Case 4 strReturn = "Failed" Case 5 strReturn = "Invalid Parameter" Case 6 strReturn = "Access Denied" Case Else strReturn = "..." End Select WScript.Echo "SetBiosSetting() returned: (" & oReturn _ & ") " & strReturn
27
28
Case 30 strSeverity = "Non-recoverable Error" Case Else strSeverity = "..." End Select Select Case CMIEvent.status Case 0 strStatus = "Unknown" Case 1 strStatus = "Other" Case 2 strStatus = "OK" Case 3 strStatus = "Degraded" Case 4 strStatus = "Stressed" Case 5 strStatus = "Predictive Failure" Case 6 strStatus = "Error" Case 7 strStatus = "Non-Recoverable Error" Case 8 strStatus = "Starting" Case 9 strStatus = "Stopping" Case 10 strStatus = "Stopped" Case 11 strStatus = "In Service" Case 12 strStatus = "No Contact" Case 13 strStatus = "Lost Communication" Case 14 strStatus = "Aborted" Case 15 strStatus = "Dormant" Case 16 strStatus = "Supporting Entity in Error" Case 17 strStatus = "Completed" Case 18 strStatus = "Power Mode" Case Else strStatus = "..." End Select Wscript.Echo "Event received... Count: " & Counter Wscript.Echo vbTab & "Name:" & vbTab & vbTab _ & CMIEvent.name Wscript.Echo vbTab & "Description:" & vbTab _ & CMIEvent.description Wscript.Echo vbTab & "Category:" & vbTab & strCategory Wscript.Echo vbTab & "Severity:" & vbTab & strSeverity Wscript.Echo vbTab & "Status:" & vbTab & vbTab _ & strStatus Counter = Counter + 1 end if loop
29
For Each objItem In colItems If Trim(objItem.Name) <> "" Then Select Case objItem.BaseUnits Case 1 s = "(Other)" Case 2 s = "(Degrees C)" Case 19 s = "(RPM)" Case Else s = "(!undefined!)" End Select WScript.Echo objItem.Name & " = " & _ objItem.CurrentState & " = " & _ objItem.CurrentReading & s End If Next strQuery = "select * from HP_BIOSStateSensor where " & _ " OperationalStatus > 0 AND NOT OperationalStatus = 2" Set colItems = objWMIService.ExecQuery(strQuery,,lFlags) WScript.Echo "Supported State Sensors" WScript.Echo "Description" & " = " & "CurrentState" For Each objItem In colItems WScript.Echo Counter & vbTab & objItem.Description & _ vbTab & objItem.CurrentState Counter = Counter + 1 Next
30
Case Else strCategory = "..." End Select WScript.Echo Counter & vbTab & strCategory & _ vbTab & objItem.Description & _ vbTab & objItem.SourceClass & _ vbTab & objItem.SourceNamespace Counter = Counter + 1 Next
31
// Link the event filter to the event consumer; // Create an instance of the binding instance of __FilterToConsumerBinding { // HPCMI test event consumer created above Consumer=$CONSUMER; // HPCMI event filter created above Filter=$FILTER; }; Step 2: Trigger an HP BIOS event by performing some action. Use the following example script Firing a Test Event to generate a test event. Other examples of triggering an event include, successfully modifying BIOS setting or trying to modify a BIOS setting with a wrong password on a system with password set, etc. Step 3: Examine the Application event log of the local machine to find an entry as below.
32
Security
While the HP Client Management Interface provides a high level of control over client management instrumentation, that power must be guarded to prevent malicious, unauthorized usage. HP CMI relies on two forms of authorization: OS level security and the BIOS administrative (F10 Setup) password assigned to each client system. Either of these security measures can be used alone, or combined to create an additional level of protection over the interface.
Remote Execution
Executing scripts and applications from a central location such as an administrative console is more practical and secure than distributing sample scripts to individual clients through software deployment mechanisms and executing them locally. WMI supports remote invocation from any Windows system and follows the same domain and local system security policies. The calling interface is secured with stream based encryption. And by default remote method execution is prevented from WMI for all but domain administrator accounts.
33
strService = "winmgmts:{impersonationlevel=impersonate}//" strComputer = "." strNamespace = "/root/HP/InstrumentedBIOS" strQuery = "select * from HP_BIOSSettingInterface" Set objWMIService = GetObject(strService & _ strComputer & strNamespace) Set colItems = objWMIService.ExecQuery(strQuery,,lFlags)
For each objItem in colItems objItem.SetBiosSetting oReturn, _ strSetting, strValue, strPassword Next Dim strResult Select Case oReturn Case 0 strReturn = "Success" Case 1 strReturn = "Not Supported" Case 2 strReturn = "Unspecified Error" Case 3 strReturn = "Timeout" Case 4 strReturn = "Failed" Case 5 strReturn = "Invalid Parameter" Case 6 strReturn = "Access Denied" Case Else strReturn = "..." End Select WScript.Echo "SetBiosSetting() returned: (" & oReturn _ & ") " & strReturn
Note that in the above example arguments are separated by spaces. To overcome this issue enclose individual arguments within quotation () marks. An example command line based on the above script would look like:
C:\>cscript example.vbs "Enter Ownership Tag" "Test" "<kbd/>1E302E020304"
34
Dim oPwdCtl, strPassword Set oPwdCtl = CreateObject("hpPwdCtl.PasswordEdit") oPwdCtl.GetPassword "Enter the Computer Setup Password:", _ strPassword Set objWMIService = GetObject(strService & _ strComputer & strNamespace) Set colItems = objWMIService.ExecQuery(strQuery,,lFlags) For each objItem in colItems objItem.SetBiosSetting oReturn, _ "Hyper-Threading", _ "Enable", _ strPassword Next Dim strResult Select Case oReturn Case 0 strReturn = "Success" Case 1 strReturn = "Not Supported" Case 2 strReturn = "Unspecified Error" Case 3 strReturn = "Timeout" Case 4 strReturn = "Failed" Case 5 strReturn = "Invalid Parameter" Case 6 strReturn = "Access Denied" Case Else strReturn = "..." End Select WScript.Echo "SetBiosSetting() returned: (" & oReturn _ & ") " & strReturn
Note that in order to use the HP Client Management Interface Password Control as an automation component, it must be registered as an ActiveX automation component. To do this, just execute hppwdctl.exe /install.
35
Enable: To grant read access to objects within the namespace. Execute Methods: Allows object methods exported from the CIM Object Manager to be run. Full Control: To grant full read/write/delete access to all CIM objects, classes, and instances. Partial Write: To grant write access to static objects in the repository. Provider Write: To grant write access to objects that are provided by the provider. Read Security: To grant read-only access to WMI security information. Edit Security: To grant read/write access to WMI security information. Remote Access: To grant a remote computer the same rights that are allowed when connecting from a local computer. 6. Click Advanced, click the specified user for whom you wish to edit the access control list, and then click Edit. 7. Choose the permissions that you want to grant or deny, and then under Apply Onto, you see the following options: This namespace only This namespace and subnamespaces Subnamespaces only
36
Appendix A
HP Client Management Interface is included standard on select new HP business client computer models. An HP CMI Software Provider is also available for legacy models.
Network Client
OS Hardware
37
HP CMI Software Provider creates the necessary definitions to support the hardware configuration option classes defined by the native HP CMI architecture. This allows for hardware configuration scripts and management application to interact with instrumented configuration data without the necessity of understanding if the underlying implementation is hardware or software based.
Call to action
HP invites you to create solutions that extend your client management capabilities with HP Client Management Interface and our additional management solutions designed to leverage and extend HP CMI within your environment. At HP we value your ideas and suggestions on how to improve the business of enterprise client management. You are welcome to submit comments and questions related to HP CMI to cmi@hp.com.
38
2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation. [399115-003], [July 2011]
39