
8: Device Ports
SLB™ Branch Office Manager User Guide
155
#
send "\n"
expect {
"Username:" { send "admn\n" }
"Error:*\r\n" { send_user $expect_out(0,string); abortSession 2 }
}
expect "Password:"
send "admn\n"
# Wait for the first prompt
set loggedIn false
while {! $loggedIn} {
expect {
timeout {myprint "Timeout waiting to login"; abortSession 3}
"*CDU: " {set loggedIn true}
} ;
}
# Detect the prompt
exp_send "\n"
expect "are:\r\n"
expect "LOGIN\r\n"
expect "REMOVE\r\n"
expect "RESTART\r\n"
expect {
timeout {myprint "Timeout waiting for prompt"; abortSession 3}
-re "\r\n(\[^\r]*:)"
}
set pduPrompt $expect_out(1,string)
# Run the ostat command
exp_send "ostat .b1\n"
expect "Outlet*Power\r\n"
expect "ID*Watts*\r\n"
expect {
timeout {myprint "Timeout waiting for load"; abortSession 3}
-re "\.B1\\s+\\S+\\s+\\S+\\s+(\\S+)"
}
set pduLoad $expect_out(1,string)
myprint "Outlet B1 Load: $pduLoad Amps"
expect $pduPrompt
exp_send "logout\n"
sleep .5
close
exit 0
Содержание 100-120 VAC SLB
Страница 114: ...8 Device Ports SLB Branch Office Manager User Guide 114 Figure 8 4 Device Ports Settings ...
Страница 131: ...8 Device Ports SLB Branch Office Manager User Guide 131 Figure 8 10 Devices Power Outlets ...
Страница 174: ...9 USB Port SLB Branch Office Manager User Guide 174 Figure 9 3 Devices USB Modem ...
Страница 227: ...12 Maintenance SLB Branch Office Manager User Guide 227 Figure 12 1 Maintenance Firmware Configurations ...