Lantronix SLC 32 Lantronix SLC - User Guide - Page 115
Already Logged in got Command Prompt, send_user Device [string toupper $hostname]\r\n
View all Lantronix SLC 32 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 115 highlights
8: Devices #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™ Console Manager User Guide 115
8: Devices
SLCâ„¢ Console Manager User Guide
115
#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