EasyManuals Logo

Lantronix EMG 8500 User Manual

Lantronix EMG 8500
482 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #269 background imageLoading...
Page #269 background image
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

Table of Contents

Other manuals for Lantronix EMG 8500

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Lantronix EMG 8500 and is the answer not in the manual?

Lantronix EMG 8500 Specifications

General IconGeneral
BrandLantronix
ModelEMG 8500
CategoryGateway
LanguageEnglish

Related product manuals