EasyManuals Logo

Lantronix SLC 8000 Series User Manual

Lantronix SLC 8000 Series
425 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 #213 background imageLoading...
Page #213 background image
9: Device Ports
SLCâ„¢ 8000 Advanced Console Manager User Guide 213
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
Expect Custom Script - SLC Device Port Session
An example of an Expect Custom Script that interacts with a SLC Device Port (in this example a
Cisco server is connected to a Device Port):
#! expect
#
# Save a copy of the running config of a Cisco server to a TFTP server
# The Cisco server is connected to a SLC/B device port

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Lantronix SLC 8000 Series and is the answer not in the manual?

Lantronix SLC 8000 Series Specifications

General IconGeneral
BrandLantronix
ModelSLC 8000 Series
CategorySwitch
LanguageEnglish

Related product manuals