Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

My Radio Applet and converted TCL script do work -- but they still get a few errors . .

OK, the end result is good and all the attached radios are shown in the Sho-Run and the interface bandwidths are being changed to reflect the true line rates of the radios:

event manager environment 2400_TX_Rate 243 Mb

event manager environment 2400_RX_Rate 151 Mb

event manager environment 2400_Signal -40 dB

event manager environment 2400_Noise -89 dB

event manager environment 2400_Distance 0 Miles

event manager environment 3500_TX_Rate 151 Mb

event manager environment 3500_RX_Rate 146 Mb

event manager environment 3500_Signal -46 dB

event manager environment 3500_Noise -92 dB

event manager environment 3500_Distance 150 Miles

event manager environment 5800_TX_Rate 261 Mb

event manager environment 5800_RX_Rate 251 Mb

event manager environment 5800_Signal -46 dB

event manager environment 5800_Noise -90 dB

event manager environment 5800_Distance 0 Miles

event manager environment 900_TX_Rate 117 Mb

event manager environment 900_RX_Rate 99 Mb

event manager environment 900_Signal -56 dB

event manager environment 900_Noise -93 dB

event manager environment 900_Distance 0 Miles

!

interface Vlan2

description 2.4 Ghz Radio

bandwidth 185000

ip address 192.168.2.1 255.255.255.0

delay 1

!

interface Vlan3

description 3.65Ghz Radio

bandwidth 156000

ip address 192.168.3.1 255.255.255.0

delay 1000000   <------------------------- Because the range reported is too far for this frequency

!

interface Vlan5

description 5Ghz Radio

bandwidth 246000

ip address 192.168.5.1 255.255.255.0

ip nat inside

ip virtual-reassembly in

delay 1

!

interface Vlan9

description 900Mhz Radio

bandwidth 108000

ip address 192.168.9.1 255.255.255.0

delay 1

!

&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

Do I just need to tell it to exit instead of merely letting it complete?

It says that it abnormally ends:

10   98     Actv abort    Tue Dec 3 14:35:37 2013  timer watchdog    applet: Radio-Rate-ReaderTWO

It only takes about 16 seconds to run:

*Dec  3 14:03:37 UTC: fh_set_epc_pid: EEM callback policy Radio-Rate-ReaderTWO has been scheduled to run.

*Dec  3 14:03:37 UTC: %HA_EM-6-LOG: Radio-Rate-ReaderTWO : DEBUG(cli_lib) : : CTL : cli_open called.

*Dec  3 14:03:37 UTC: %HA_EM-6-LOG: Radio-Rate-ReaderTWO : DEBUG(cli_lib) : : IN  : 2901_Rig_1#ssh -l ubnt 192.168.2.11

*Dec  3 14:03:37 UTC: EEM policy Radio-Rate-ReaderTWO has exceeded it's elapsed time limit of 60.0 seconds ???

*Dec  3 14:03:40 UTC: %HA_EM-6-LOG: Radio-Rate-ReaderTWO : DEBUG(cli_lib) : : IN  : ssh -l ubnt 192.168.3.11

*Dec  3 14:03:43 UTC: %HA_EM-6-LOG: Radio-Rate-ReaderTWO : DEBUG(cli_lib) : : IN  : ssh -l ubnt 192.168.5.11

*Dec  3 14:03:53 UTC: %HA_EM-6-LOG: Radio-Rate-ReaderTWO : DEBUG(cli_lib) : : IN  : ssh -l ubnt 192.168.9.11

Here is the Applet.  When I convert to TCL I get the same "Actv abort".

!

event manager applet Radio-Rate-ReaderTWO

event timer watchdog time 60 maxrun 60

action 200 comment ##################################################

action 201 comment             Start  &   2.4 GHZ RADIO

action 202 comment ##################################################

action 220 comment ~~~SSH to Radio and execute mca-status command

action 231 cli command "enable"

action 232 cli command "ssh -l ubnt 192.168.2.11" pattern "assword:"

action 233 cli command "fly2the*" pattern "#"

action 234 cli command "mca-status" pattern "#"

action 235 comment ~~~Extract the TX & RX rates and the Distance

action 236 regexp "wlanTxRate=([0-9]+)" $_cli_result match txrate

action 237 regexp "wlanRxRate=([0-9]+)" $_cli_result match rxrate

action 238 regexp "distance=([0-9]+)" $_cli_result match distance

action 239 regexp "signal=(-[0-9]+)" $_cli_result match signal

action 240 regexp "noise=(-[0-9]+)" $_cli_result match noise

action 245 comment ~~~Exit the Radio SSH

action 246 cli command "exit" pattern "#"

action 247 add $txrate $rxrate

action 248 set var1 "$_result"

action 249 divide $var1 2

action 250 set line_rate "$_result"

action 251 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 252 comment   2.4Ghz Distance/Range Decision

action 253 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 254 if $distance gt 3

action 255 set delaynum 1000000

action 256 else

action 257 set delaynum 1

action 258 end

action 261 comment ~~~ Go to Config T and enter commands

action 262 cli command "config t" pattern "#"

action 273 cli command "event manager environment 2400_TX_Rate $txrate Mb" pattern "#"

action 274 cli command "event manager environment 2400_RX_Rate $rxrate Mb" pattern "#"

action 275 cli command "event manager environment 2400_Signal $signal dB" pattern "#"

action 276 cli command "event manager environment 2400_Noise $noise dB" pattern "#"

action 277 cli command "event manager environment 2400_Distance $distance Miles" pattern "#"

action 280 multiply $line_rate 1000

action 281 set line_rate $_result

action 282 cli command "int vlan 2" pattern "#"

action 283 cli command "bandwidth $line_rate" pattern "#"

action 284 cli command "delay $delaynum" pattern "#"

action 285 cli command "exit" pattern "#"

action 286 cli command "exit" pattern "#"

action 295 comment ##################################################

action 296 comment                       3.5 GHZ RADIO

action 298 comment ##################################################

action 301 comment ~~~SSH to Radio and execute mca-status command

action 303 cli command "ssh -l ubnt 192.168.3.11" pattern "assword:"

action 304 cli command "fly2the*" pattern "#"

action 305 cli command "mca-status" pattern "#"

action 306 comment ~~~Extract the TX & RX rates and the Distance

action 307 regexp "wlanTxRate=([0-9]+)" $_cli_result match txrate

action 308 regexp "wlanRxRate=([0-9]+)" $_cli_result match rxrate

action 309 regexp "distance=([0-9]+)" $_cli_result match distance

action 320 regexp "signal=(-[0-9]+)" $_cli_result match signal

action 321 regexp "noise=(-[0-9]+)" $_cli_result match noise

action 326 comment ~~~Exit the Radio SSH

action 327 cli command "exit" pattern "#"

action 328 add $txrate $rxrate

action 329 set var1 "$_result"

action 330 divide $var1 2

action 331 set line_rate "$_result"

action 340 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 341 comment   3.5Ghz Distance/Range Decision

action 342 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 343 if $distance gt 2

action 344 set delaynum 1000000

action 345 else

action 346 set delaynum 1

action 347 end

action 352 comment ~~~ Go to Config T and enter commands

action 353 cli command "config t" pattern "#"

action 354 cli command "event manager environment 3500_TX_Rate $txrate Mb" pattern "#"

action 355 cli command "event manager environment 3500_RX_Rate $rxrate Mb" pattern "#"

action 356 cli command "event manager environment 3500_Signal $signal dB" pattern "#"

action 357 cli command "event manager environment 3500_Noise $noise dB" pattern "#"

action 358 cli command "event manager environment 3500_Distance $distance Miles" pattern "#"

action 360 multiply $line_rate 1000

action 361 set line_rate $_result

action 369 cli command "int vlan 3" pattern "#"

action 380 cli command "bandwidth $line_rate" pattern "#"

action 381 cli command "delay $delaynum" pattern "#"

action 382 cli command "exit" pattern "#"

action 383 cli command "exit" pattern "#"

action 510 comment ##################################################

action 511 comment                       5.8 GHZ RADIO

action 512 comment ##################################################

action 521 comment ~~~SSH to Radio and execute mca-status command

action 533 cli command "ssh -l ubnt 192.168.5.11" pattern "assword:"

action 534 cli command "fly2the*" pattern "#"

action 535 cli command "mca-status" pattern "#"

action 536 comment ~~~Extract the TX & RX rates and the Distance

action 537 regexp "wlanTxRate=([0-9]+)" $_cli_result match txrate

action 538 regexp "wlanRxRate=([0-9]+)" $_cli_result match rxrate

action 539 regexp "distance=([0-9]+)" $_cli_result match distance

action 550 regexp "signal=(-[0-9]+)" $_cli_result match signal

action 551 regexp "noise=(-[0-9]+)" $_cli_result match noise

action 566 comment ~~~Exit the Radio SSH

action 557 cli command "exit" pattern "#"

action 558 add $txrate $rxrate

action 559 set var1 "$_result"

action 560 divide $var1 2

action 561 set line_rate "$_result"

action 563 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 564 comment   5.8 Ghz Distance/Range Decision

action 565 comment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

action 566 if $distance gt 1

action 567 set delaynum 1000000

action 568 else

action 569 set delaynum 1

action 570 end

action 572 comment ~~~ Go to Config T and enter commands

action 573 cli command "config t" pattern "#"

action 574 cli command "event manager environment 5800_TX_Rate $txrate Mb" pattern "#"

action 575 cli command "event manager environment 5800_RX_Rate $rxrate Mb" pattern "#"

action 576 cli command "event manager environment 5800_Signal $signal dB" pattern "#"

action 577 cli command "event manager environment 5800_Noise $noise dB" pattern "#"

action 578 cli command "event manager environment 5800_Distance $distance Miles" pattern "#"

action 580 multiply $line_rate 1000

action 581 set line_rate $_result

action 589 cli command "int vlan 5" pattern "#"

action 590 cli command "bandwidth $line_rate" pattern "#"

action 591 cli command "delay $delaynum" pattern "#"

action 592 cli command "exit" pattern "#"

action 593 cli command "exit" pattern "#"

action 930 comment ##################################################

action 931 comment                       900 MHZ RADIO

action 932 comment ##################################################

action 941 comment ~~~SSH to Radio and execute mca-status command

action 943 cli command "ssh -l ubnt 192.168.9.11" pattern "assword:"

action 944 cli command "fly2the*" pattern "#"

action 945 cli command "mca-status" pattern "#"

action 946 comment ~~~Extract the TX & RX rates and the Distance

action 947 regexp "wlanTxRate=([0-9]+)" $_cli_result match txrate

action 948 regexp "wlanRxRate=([0-9]+)" $_cli_result match rxrate

action 949 regexp "distance=([0-9]+)" $_cli_result match distance

action 950 regexp "signal=(-[0-9]+)" $_cli_result match signal

action 951 regexp "noise=(-[0-9]+)" $_cli_result match noise

action 955 comment ~~~Exit the Radio SSH

action 956 cli command "exit" pattern "#"

action 957 add $txrate $rxrate

action 958 set var1 "$_result"

action 959 divide $var1 2

action 960 set line_rate "$_result"

action 971 comment ~~~ Go to Config T and enter commands

action 972 cli command "config t" pattern "#"

action 973 cli command "event manager environment 900_TX_Rate $txrate Mb" pattern "#"

action 974 cli command "event manager environment 900_RX_Rate $rxrate Mb" pattern "#"

action 975 cli command "event manager environment 900_Signal $signal dB" pattern "#"

action 976 cli command "event manager environment 900_Noise $noise dB" pattern "#"

action 977 cli command "event manager environment 900_Distance $distance Miles" pattern "#"

action 980 multiply $line_rate 1000

action 981 set line_rate $_result

action 982 cli command "int vlan 9" pattern "#"

action 983 cli command "bandwidth $line_rate" pattern "#"

action 984 cli command "exit" pattern "#"

action 985 comment ######  END  #####  END  ######   END    ########

action 990 cli command "exit" pattern "#"

action 991 cli command "exit" pattern "#"

action 992 cli command "exit"

Do I just need to do a "proper" exit?

Thanks,

Tim

1 REPLY
Cisco Employee

My Radio Applet and converted TCL script do work -- but they sti

Given the order of the syslogs, I'm guessing that we're looking at multiple instances of the policy running.   Since you're allowing them to run for 60 seconds and scheduling them 60 seconds apart, that's probably the case.  My guess is that some of the SSH sessions are not providing a match to the "assword:" pattern, and thus these policies are hanging awaiting the prompt until they are terminated.  I would check to make sure you don't see some other pattern on various runs of the SSH command.

660
Views
0
Helpful
1
Replies