11: Scripts
EMG™ Edge Management Gateway User Guide
222
[EMG251]> show network port 1 host
show network port 1 host
___Current Hostname Settings____________________________________________
Hostname: EMG251
Domain: support.int.lantronix.com
Device HOSTNAME: EMG251
Monitored Port: Port 7
Monitor Interval Time: 5 Seconds
[Current Time:21:25:04]
show portcounter deviceport 7
[EMG251]> show portcounter deviceport 7
Device Port: 7 Seconds since zeroed: 1454120
Bytes input: 0 Bytes output: 0
Framing errors: 0 Flow control errors: 0
Overrun errors: 0 Parity errors: 0
[EMG251]>
[Current Time:21:25:20]
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
[EMG251]>
Port Counter Monitor Script Ending......
________________________________________________________________________
Login Out.......
logout
Returning to command line
[emg247]>
Expect Custom Script - EMG CLI Session
An example of an Expect Custom Script that interacts with an EMG CLI session:
#! expect
# script to get the current internal temperature of the EMG
# accepts one optional command line parameter for location
set emgPrompt ">"
set emgTemp "unknown"
set location ""
proc myprint {str} {
send_user -- "$str\n"
}
proc abortSession {err} {
send_user "Error $err. Terminating session.\n"
exit $err
}