1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#
# $Id$
#
# IPMI 1.5 in terminal mode
# Tested on Intel SE7501WV2 motherboard over serial.
# On this motherboard, the System Setup Utility is used to switch
# the BMC into terminal mode.
#
# References:
# "IPMI over Cyclades TS2000", M.P. Anand Babu
# "IPMI 1.5 Reference Guide", 13.7.8 Terminal Mode ASCII Text Commands (p.175)
# http://www.intel.com/design/servers/ipmi/
# http://www.intel.com/design/servers/ipmi/spec.htm
#
#
specification "ipmi" {
timeout 10
plug name { "1" }
script login {
send "\033("
expect "\\[TMODE OK\\]\r\n"
send "[SYS PWD -N]\r" # null password/username
expect "\\[OK\\]\r\n"
}
script logout {
send "[SYS PWD -X]\r"
}
script status {
send "[SYS HEALTH QUERY]\r"
expect "\\[OK PWR:(ON|OFF|SLP|S4|S3|S2|S1).*\\]\r\n"
setplugstate "1" $1 on="ON" off="OFF|SLP|S4|S3|S2|S1"
}
script on {
send "[SYS POWER ON]\r"
expect "\\[OK\\]\r\n"
}
script off {
send "[SYS POWER OFF]\r"
expect "\\[OK\\]\r\n"
}
script reset {
send "[SYS RESET]\r"
expect "\\[OK\\]\r\n"
}
script cycle {
send "[SYS POWER OFF]\r"
expect "\\[OK\\]\r\n"
delay 4
send "[SYS POWER ON]\r"
expect "\\[OK\\]\r\n"
}
script status_temp {
send "[SYS HEALTH QUERY]\r"
expect "\\[OK PWR:[^ ]* H:.. T:(ok|nc|cr|nr|uf).*\\]\r\n"
setplugstate "1" $1
}
}
|