12: Scripts
EMG™ Edge Management Gateway User Guide
267
expect {
timeout {myprint "Timeout waiting to login"; abortSession 3}
"Need to specify username" {myprint "Need to specify -U ";
abortSession 4}
"*> " {set loggedIn true}
} ;
}
exp_send "\n"
expect {
timeout {myprint "Timeout waiting for CLI prompt"; abortSession 3}
-re "\n\r(\\\[\[^\r]*]>)"
}
set emgPrompt $expect_out(1,string)
# Run the temperature command
exp_send "show temperature\n"
expect {
timeout {myprint "Timeout waiting for temperature"; abortSession 3}
-re "Current Internal Temperature: (.*)\r\n"
}
set emgTemp $expect_out(1,string)
myprint "Temperature: $emgTemp"
exp_send "logout\n"
wait -i $sessionId
exit 0
This script can be run manually at the CLI:
[emga508] set script runcli cliExample parameters "East Data Center"
Internal temperature of the East Data Center SLC at 01/27/2019 02:07
Temperature: 48C (118F)
Summary of Contents for EMG Series
Page 100: ...7 Networking EMG Edge Management Gateway User Guide 100 Figure 7 5 Network Wireless Settings...
Page 353: ...15 Maintenance EMG Edge Management Gateway User Guide 353 Figure 15 12 About EMG...
Page 474: ...EMG Edge Management Gateway User Guide 474 Figure E 3 EU Declaration of Conformity...
Page 475: ...EMG Edge Management Gateway User Guide 475 Figure E 4 EU Declaration of Conformity continued...