12: Scripts
EMG™ Edge Management Gateway User Guide
269
# 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"
wait -i $sessionId
exit 0
Summary of Contents for EMG 7500
Page 100: ...7 Networking EMG Edge Management Gateway User Guide 100 Figure 7 5 Network Wireless Settings ...
Page 353: ...15 Maintenance EMG Edge Management Gateway User Guide 353 Figure 15 12 About EMG ...
Page 474: ...EMG Edge Management Gateway User Guide 474 Figure E 3 EU Declaration of Conformity ...
Page 475: ...EMG Edge Management Gateway User Guide 475 Figure E 4 EU Declaration of Conformity continued ...