![background image](http://html.mh-extra.com/html/nec/n8100-1668f/n8100-1668f_user-manual_251356563.webp)
Accessing Power and Performance Data I-5
Sub GetSensor(rv_ls, rv_ms, rc_ls, rc_ms, sensorNum)
Dim outtmp, units1, units2, sensortype
oinparams.networkfunction = &ha
oinparams.lun = 0
oinparams.responderaddress = &h20
oinparams.command = &h23
oinparams.requestdata = array(rv_ls, rv_ms, rc_ls, rc_ms, 20, 14)
oinparams.requestdatasize = 6
set outtmp = oipmi.execmethod_("requestresponse",oinparams)
units1 = outtmp.ResponseData(3)
Select Case outtmp.ResponseData(4)
case 0: units2 = "unspecified"
case 1: units2 = "degrees C"
case 6: units2 = "Watts"
case else: units2 = "Refer to IPMI Specification: Type=0x" _
& hex(outtmp.ResponseData(4))
End Select
' (Get Sendor Reading)
Dim sensorData, rawData, currentValue
oinparams.networkfunction = &h4
oinparams.lun = 0
oinparams.responderaddress = &h20
oinparams.command = &h2d
oinparams.requestdata = array(sensorNum)
oinparams.requestdatasize = 1
set sensorData = oipmi.execmethod_("requestresponse",oinparams)
If sensorData.Completioncode <> 0 Then
'WScript.Echo " Sensor Not Available"
exit Sub
End If
rawData = sensorData.ResponseData(1)
If units1 and &h40 Then
If rawData And &h80 Then
rawData = rawData Xor &hff
End If
Elseif units1 and &h80 Then
call get2complement(rawData, rawData, 8)
End If
If (sensorData.ResponseData(2) And &h80) = 0 Or _
(sensorData.ResponseData(2) And &h40) = 0 Or _
(sensorData.ResponseData(2) And &h20) Then
WScript.Echo " Event Status: Unavailable"
Else
'WScript.Echo " Event Status: ok"
Dim M,B,k1,k2
Dim ret
M = (outtmp.ResponseData(8) And &hc0) * 4 + outtmp.ResponseData(7)
B = (outtmp.ResponseData(10) And &hc0) * 4 + outtmp.ResponseData(9)
call get2complement(M, M, 10)
call get2complement(B, B, 10)
call get2complement(outtmp.ResponseData(12) And &h0f, k1, 4)
call get2complement((outtmp.ResponseData(12) And &hf0)/16, k2, 4)
currentValue = CDbl (((M * rawData) + (B * (10 ^ k1))) * (10 ^ k2))
WScript.Echo " Current Value = " & currentValue & " " & units2
End If
End Sub
Содержание N8100-1668F
Страница 60: ...2 28 General Description This page is intentionally left blank ...
Страница 146: ...5 8 Installing the Operating System with Express Setup Flow of Setup ...
Страница 173: ...Installing the Operating System with Express Setup 5 35 Flow of Setup ...
Страница 242: ...5 104 Installing the Operating System with Express Setup This page is intentionally left blank ...
Страница 251: ...Installing and Using Utilities 6 9 4 Click Parameter File Creator Parameter File Creator will appear ...
Страница 255: ...Installing and Using Utilities 6 13 Windows Server 2003 ...
Страница 282: ...7 14 Maintenance This page is intentionally left blank ...
Страница 287: ...Troubleshooting 8 5 With Redundant Power Supply Installed REAR LINK ACT lamp Speed lamp Speed lamp LINK ACT lamp ...
Страница 288: ...8 6 Troubleshooting With Non Redundant Power Supply Installed REAR Speed lamp LINK ACT lamp Speed lamp LINK ACT lamp ...
Страница 339: ...Troubleshooting 8 57 When you use a remote console 6 Each tool is selected and it starts ...
Страница 400: ...9 56 Upgrading Your Server 11 Bring down the lever to secure the CPU 12 Remove the protective cover from the heat sink ...
Страница 422: ...9 78 Upgrading Your Server This page is intentionally left blank ...
Страница 440: ...C 2 IRQ This page is intentionally left blank ...
Страница 464: ...D 24 Installing Windows Server 2008 R2 4 Activate Windows The Windows activation is complete ...
Страница 495: ...Installing Windows Server 2008 E 29 4 Activate Windows The Windows activation is complete ...
Страница 558: ...H 2 Using a Client Computer Which Has a CD Drive This page is intentionally left blank ...
Страница 568: ...I 10 Accessing Power and Performance Data This page is intentionally left blank ...
Страница 572: ...J 4 Product Configuration Record Table This page is intentionally left blank ...