9: Device Ports
SLCâ„¢ 8000 Advanced Console Manager User Guide 210
show portcounter deviceport 7
show portcounter deviceport 7
Device Port: 7 Seconds since zeroed: 1454136
Bytes input: 0 Bytes output: 0
Framing errors: 0 Flow control errors: 0
Overrun errors: 0 Parity errors: 0
[SLC251glenn]>
Port Counter Monitor Script Ending......
________________________________________________________________________
Login Out.......
logout
Returning to command line
[slcvz249_glenn]> show script
___Interface Scripts______Group/Permissions_____________________________
test3 Def/do
___Batch Scripts__________Group/Permissions_____________________________
test1 Adm/
ad,nt,sv,dt,lu,ra,um,dp,ub,rs,fc,dr,rp,sn,wb,sk,po,do
[slcvz249_glenn]>
Expect Custom Script - SLC CLI Session
An example of an ExpectCustom Script that interacts with a SLC CLI session:
#! expect
# script to get the current internal temperature of the SLC
# accepts one optional command line parameter for location
set slcPrompt ">"
set slcTemp "unknown"
set location ""
proc myprint {str} {
send_user -- "$str\n"
}
proc abortSession {err} {
send_user "Error $err. Terminating session.\n"
exit $err
}
# Are there any command line parameters?
if {$argc > 0} {
set location [lindex $argv 0]
}
set now [clock seconds]
set date [clock format $now -format {%D %R}]
if {$argc > 0} {
myprint "Internal temperature of the $location SLC at $date"
} else {
myprint "Internal temperature of the SLC at $date"
}