Download Print this page

Sample Scripts - Lantronix SLC8 Manager User Manual

Slc console manager
Hide thumbs Also See for SLC8:

Advertisement

Sample Scripts

Interface Script—Monitor Port
The Monitor Port (Monport) script connects directly to a device port by logging into the SLC port,
gets the device hostname, loops a couple of times to get port interface statistics, and logs out. The
following is the script:
set monPort 7
set monTime 5
set sleepTime 2
set prompt ">"
set login "sysadmin"
set pwd "PASS"
#Send CR to echo prompt
send "\r"
sleep $sleepTime
#Log in or check for Command Prompt
expect {
prompt......\r\n"; return }
#Send Password
send "$pwd\r"
timeout { send_user "Time out waiting for prompt......\r\n";
return }
$prompt {}
}
SLC™ Console Manager User Guide
#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" {
expect {
}
}
}
8: Devices
114

Hide quick links:

Advertisement

loading
Need help?

Need help?

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

This manual is also suitable for:

Slc16Slc32Slc48