3. Accessing Data for Electric Power, Temperature, and Processor Utilization
Express5800/R120h-1M, R120h-2M Maintenance Guide
224
Chapter 3 Appendix
Execution
result
Completion Code = 0x0
Power Consumption = 306 watts
The power consumption is 306 watts.
Tips
Power consumption readings may not be acquired depending on the power supply
configuration of the server.
The completion code in such cases is
0xC1
or
0xCB
.
Intake air temperature
3.1.2
Execute the following standard commands that conform to IPMI to search Sensor Data Record (SDR) for the
temperature sensor and obtain intake air temperature data.
Get SDR Repository Info
Reserve SDR Repository
Get SDR
Get Sensor Reading
Below is the sample file created by using Visual Basic Script (named as Sensor.vbs),
'Start Script
Option Explicit
' Prepare for MS IPMI Driver
Dim osvc, oclass
Dim oinstance, oipmi
set osvc = getobject("winmgmts:root¥wmi")
set oclass = osvc.get("microsoft_ipmi")
for each oinstance in osvc.instancesof("microsoft_ipmi")
set oipmi = oinstance
next
' (Get SDR Repository Info)
Dim oinparams
set oinparams = oclass.methods_("requestresponse").inparameters
' (Get SDR Repository Info)
oinparams.networkfunction = &ha
oinparams.lun = 0
oinparams.responderaddress = &h20
oinparams.command = &h20
oinparams.requestdatasize = 0
' Fire IPMI Command
Dim outparams
Dim i, RecordCount
set outparams = oipmi.execmethod_("requestresponse",oinparams)
RecordCount = outparams.ResponseData(3)*256 + outparams.ResponseData(2)
' (Reserve SDR Repository)
oinparams.networkfunction = &ha
oinparams.lun = 0
oinparams.responderaddress = &h20
oinparams.command = &h22
oinparams.requestdatasize = 0
Dim Reserve_LS, Reserve_MS
set outparams = oipmi.execmethod_("requestresponse",oinparams)
Reserve_LS = outparams.ResponseData(1)
Reserve_MS = outparams.ResponseData(2)
' (Get SDR) for each record
Dim Record_LS,Record_MS, Offset, Length
Dim cnt, sensorNum, sensorType
' First Record
Record_LS = 0
Record_MS = 0
For cnt = 0 to RecordCount-1
Offset = 0
Length = 9
oinparams.networkfunction = &ha
oinparams.lun = 0
oinparams.responderaddress = &h20
oinparams.command = &h23
oinparams.requestdata = array(Reserve_LS, Reserve_MS, Record_LS, Record_MS, Offset, Length)
oinparams.requestdatasize = 6
set outparams = oipmi.execmethod_("requestresponse",oinparams)