Lantronix SLC 8000 User Manual page 171

Advanced console manager
Hide thumbs Also See for SLC 8000:
Table of Contents

Advertisement

expect {
#Did not capture "ogin" or Command Prompt
timeout { send_user "Time out login......\r\n"; return }
#Got login prompt
"login" {
send_user "Logging in....\r\n"
send "$login\r"
expect {
timeout { send_user "Time out waiting for pwd
#Got password prompt
"password" {
#Send Password
send "$pwd\r"
expect {
}
}
}
#Already Logged in got Command Prompt
$prompt {
send_user "Already Logged....\r\n"
}
}
#Get hostname info
send "show network port 1 host\r"
expect {
timeout { send_user "Time out Getting Hostname 1\r\n"; return }
"Domain" {
#Get Hostname from SLC
set hostname "[string range $expect_out(buffer) [string first
Hostname:
$expect_out(buffer)] [expr [string first Domain
$expect_out(buffer)]-2]]"
}
}
send_user "\r\n\r\n\r\n\r\n"
send_user "Device [string toupper $hostname]\r\n"
send_user "________________________________________________________\r\n"
send_user "Monitored Port: Port $monPort \r\n"
send_user "Monitor Interval Time: $monTime Seconds \r\n"
set loopCtr 0
set loopMax 2
while { $loopCtr < $loopMax } {
#Get current time
SLC™ 8000 Advanced Console Manager User Guide
prompt......\r\n"; return }
timeout { send_user "Time out waiting for prompt......\r\n";
return }
$prompt {}
}
8: Device Ports
171

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents