Lantronix SLC 16 Lantronix SLC - User Guide - Page 114
Sample Scripts, Interface Script—Monitor Port
View all Lantronix SLC 16 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 114 highlights
8: Devices 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 { #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 prompt......\r\n"; return } #Got password prompt "password" { #Send Password send "$pwd\r" expect { timeout { send_user "Time out waiting for prompt......\r\n"; return } $prompt {} } } } } SLC™ Console Manager User Guide 114