cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1007
Views
0
Helpful
2
Replies

EEM not releasing ttys (and I am using end and exit.???)

Hello,

I have a eem configured to run a few commands, one of which I had to write as a tcl script as I had an issue with the syntax.

Trouble is it is not releasing the ttys so I get the 'no tty lines available, minimum of 2 required by EEM', which is a terrible shame as when this runs it is simply excellent.

!

ip sla 200018

icmp-echo 193.128.203.18 source-interface FastEthernet0/1

verify-data

owner nSheridan

threshold 2000

frequency 30

history hours-of-statistics-kept 12

ip sla schedule 200018 life forever start-time now

!

track 200 ip sla 200018

delay down 2 up 30

!

event manager applet site_unreachable

event track 200 state down maxrun 60

action 1.0 syslog msg "Site: IP SLA failed"

action 1.1 cli command "enable"

action 1.2 cli command "del /force flash:trace.txt"

action 1.3 cli command "tclsh flash:/tracer.tcl"

action 1.4 cli command "show clock | append flash:trace.txt"

action 5.0 cli command "end"

action 6.0 cli command "exit"

!

router#more flash:tracer.tcl

set output [exec "traceroute ip 1.1.1.1 source FastEthernet 0/1"]

set fd [open "flash:/trace.txt" "w"]

puts $fd $output

close $fd

router#

Anyone got any ideas, I have been banging my head against a brick wall, and it has "started to bleed" to I thought I would post something up

Thanks in advance.

2 Replies 2

If anyone comes across this check this link out

https://supportforums.cisco.com/docs/DOC-12757#EEM_and_AAA_Command_Authorization

And look at making reference to a specific AAA methods, as you would say if you were making a 'default' for EEM.  This may be useful.

Joe Clarke
Cisco Employee
Cisco Employee

It is not recommended to combine EEM applets and tclsh like this.  You can take your applet to http://www.marcuscom.com/convert_applet and convert it to Tcl.  Then insert your tclsh code.  That will be much cleaner.