Tcl script to shut and no shut interface

Hi, I have problem with DMVPN I tried some configurations but any works.
The problem is that tunnel with ipsec protection does not support keepalives I have one hub and one spoke the spoke has two interfaces with dynamic ip and the hub has one interface with static ip the two devices have two tunnels gre. The spoke has track to the source and backup comand on tunnels one active and one for backup the problem is when the active tunnel is down (only protocol it is in this way coz the source is down down)the other tunnel comes up and its ok everything is working but when the tunnel active comes back the vpn does not come up until the tunnel is shutdown and not shutdown by manual way. I like to know if is possible to shut and no shut the tunnel when the source comes back with tcl script. (And if is possible that you help me to do the script).
Thanks in advance.

Ok thanks everybody jaja it`s done. Solution cryto maps on interfaces and do not put tunnel ipsec protected on the tunnel interface on the hub.
DOC. DMVPN DUAL TIER ARCHITECTURE

Similar Messages

  • EEM to Shut and No Shut Interface

    I'm trying to go into fa0/0 and perform a shut/no shut, but it does not work. What am I missing. Thanks in adance.
    ms-r1#sh run | b event
    event manager applet sa27_bandaid
    event track 1 state down
    action 1.5 syslog msg "sa27-r1 locked up again"
    action 2 cli command "conf t"
    action 3 cli command "interface fa0/0"
    action 4 cli command "shutdown"
    action 5 syslog msg "shutdown sa27-r1 bandaid"
    action 6 cli command "no shutdown"
    action 7 syslog msg "no shutdown sa27-r1 bandaid"
    action 8 cli command "end"

    I’ve got an ipsla and eem applet to run some routines on a router.  The script runs fine without tacacs enabled, but when tacacs is enable, the routine fails.  When I run a “debug event manager action cli” here’s what I see in RED.  It looks to be an authorization failure. Am i missing a line that has the password? Thanks.
    hostname ms-3722d-man-r1
    username twdadmin privilege 15 password 7 03104C0F070B2C4540
    event manager session cli username "twdadmin"
    event manager applet sa27_fix1
    event track 1 state down
    action 1.0 cli command "enable"
    action 1.5 syslog msg "sa27-r1 t3 locked up again"
    action 2.0 cli command "conf t"
    action 3.0 cli command "interface s6/1/0"
    action 4.0 cli command "shutdown"
    action 5.0 syslog msg "shutdown sa27-r1 t3 interface"
    action 5.1 cli command "end"
    event manager applet sa27_fix2
    event syslog pattern "Interface Serial6/1/0, changed state to administratively down"
    action 1.0 cli command "enable"
    action 1.5 cli command "config t"
    action 2.0 cli command "interface s6/1/0"
    action 2.5 cli command "no shutdown"
    action 3.0 syslog msg "no shutdown sa27-r1 t3 interface"
    action 3.5 cli command "end"
    end
    ms-3722d-man-r1#sh log
    [snip]
    Log Buffer (8192 bytes):
    May 24 17:39:16: %TRACKING-5-STATE: 1 rtr 1 reachability Up->Down
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : CTL : cli_open called.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ******************************  WARNING NOTICE  ***********************************
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : You are accessing a U.S. Government information system","which includes (1) this
    [snip]
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :   
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : CTL : 20+ lines read from cli, debug output truncated
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : IN  : ms-3722d-man-r1>enable
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : Command authorization failed.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ms-3722d-man-r1>
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1: sa27-r1 t3 locked up again
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : IN  : ms-3722d-man-r1>conf t
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :                   ^
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : % Invalid input detected at '^' marker.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ms-3722d-man-r1>
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : IN  : ms-3722d-man-r1>interface s6/1/0
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :                  ^
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : % Invalid input detected at '^' marker.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ms-3722d-man-r1>
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : IN  : ms-3722d-man-r1>shutdown
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : Command authorization failed.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :                   ^
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : % Invalid input detected at '^' marker.
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ms-3722d-man-r1>
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1: shutdown sa27-r1 t3 interface
    May 24 17:39:16: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : IN  : ms-3722d-man-r1>end
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : Command authorization failed.
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :                   ^
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : % Invalid input detected at '^' marker.
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT :
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : OUT : ms-3722d-man-r1>
    May 24 17:39:17: %HA_EM-6-LOG: sa27_fix1 : DEBUG(cli_lib) : : CTL : cli_close called.

  • Using EEM and TCL scripts for voice

    HI all,
    I'd like to use eem to check Sip dial-peer status+interface BRI status, when sip dial-peer has no answer to invite and bri interface is down the LAN interface must be shutted down. Is it possible to avhieve it using eem? I didn't find anything for eem monitoring sip dial-peers...
    thanks
    Massimiliano

    EEM doesn't have any ability to control the data plane currently.  Therefore, there is no direct voice tie-in.  There is a way to do Tcl scripting of some voice operations (e.g. IVR scripts), but those do not relate to EEM.
    That said, if there are some show commands which provide you the data you need, you can create an EEM timer policy (i.e. one that runs periodically), parsers the show command output, and takes further action if the output contains certain patterns.  Depending on the version of IOS, this may require an EEM Tcl script, or you may be able to do it within an EEM applet.
    If you need further assistance, you will need to provide your IOS version, and the exact commands (and output) which would tell you if the SIP peer isn't getting an answer and the BRI interface is truly down (I'm imagining something like "show isdn status" for this one).
    Please support CSC Helps Haiti
    https://supportforums.cisco.com/docs/DOC-8895
    https://supportforums.cisco.com

  • Setting the source-interface in a tcl script for email.

    So once again I am trying to figure this out and failing miserably. The only thin I can think of at the moment is that I need to tell it to source from a specific vrf interface. I've tried looking through possible enviornment variables. Hoping I could set it that way but have yet to find one. I have read varios settings for source-interface and attempted them. But fail every time with:
    vpn_failure.tcl: smtp_send_email: error connecting to mail server:
    EEM Version:
    sho event manager version
    Embedded Event Manager Version 4.00
    Component Versions:
    eem: (rel4)1.0.4
    eem-gold: (rel1)1.0.2
    eem-call-home: (rel2)1.0.0
    Below is the stock format for sending the email from the script. If someone could guide me in the correct way to set this up to source the interface that would be awesome.
    # create mail form
      action_syslog msg "Creating mail header for vpn_failure.tcl script..."
      set body [format "Mailservername: %s" "$_email_server"]
      set body [format "%s\nFrom: %s" "$body" "$_email_from"]
      set body [format "%s\nTo: %s" "$body" "$_email_to"]
      set _email_cc ""
      set body [format "%s\nCc: %s" "$body" ""]
      set body [format "%s\nSubject: %s\n" "$body" "VPN Failure Detected: Router $routername Crypto tunnel is DOWN. Peer $remote_peer"]
      set body [format "%s\n%s" "$body" "Report Summary:"]
      set body [format "%s\n%s" "$body" "   - syslog message"]
      set body [format "%s\n%s" "$body" "   - summary of interface(s) in an up/down state"]
      set body [format "%s\n%s" "$body" "   - show ip route $remote_peer"]
      set body [format "%s\n%s" "$body" "   - show crypto isakmp sa"]
      set body [format "%s\n%s" "$body" "   - show crypto session detail"]
      set body [format "%s\n%s" "$body" "   - show crypto engine connection active"]
      set body [format "%s\n%s" "$body" "   - show ip nhrp detail (DMVPN only)"]
      set body [format "%s\n%s" "$body" "   - show log"]
      set body [format "%s\n\n%s" "$body" "---------- syslog message ----------"]
      set body [format "%s\n%s" "$body" "$syslog_msg"]
      set body [format "%s\n\n%s" "$body" "---------- summary of interface(s) in an up/down state ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_interface_brief_up_down"]
      set body [format "%s\n\n%s" "$body" "---------- show ip route $remote_peer ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_route"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto isakmp sa ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_isakmp_sa"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto session detail ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_session_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto engine connection active ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_engine_connection_active"]
      set body [format "%s\n\n%s" "$body" "---------- show ip nhrp detail (DMVPN only) ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_nhrp_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show log ----------"]
      set body [format "%s\n\n%s" "$body" "$show_log"]
      if [catch {smtp_send_email $body} result] {
        action_syslog msg "smtp_send_email: $result"

    I got this far, saw the MAXRUN error, bumped that out and then turned on debugging. I am still not connecting to the mail server. So I don't think I am reaching the mail server yet. I don't think it is using the sourceinterface. In debugging everyting in the script works except for the mail portion.
    Jul 29 16:01:00.334: %HA_EM-6-LOG: vpn_failure.tcl: Creating mail header for vpn_failure.tcl script...
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: Process Forced Exit- MAXRUN timer expired.
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     while executing
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "action_syslog msg "smtp_send_email: $result""
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "$slave eval $Contents"
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     (procedure "eval_script" line 7)
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "eval_script slave $scriptname"
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     invoked from within
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: "if {$security_level == 1} {       #untrusted script
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp create -safe slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp share {} stdin slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:      interp share {} stdout slave
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl: ..."
    Jul 29 16:02:36.464: %HA_EM-6-LOG: vpn_failure.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
    Jul 29 16:02:36.465: %HA_EM-6-LOG: vpn_failure.tcl: Tcl policy execute failed:
    Jul 29 16:02:36.465: %HA_EM-6-LOG: vpn_failure.tcl: Process Forced Exit- MAXRUN timer expired.
    Debugging On:
    Jul 29 16:28:51.471: [fh_smtp_debug_cmd]
    Jul 29 16:28:51.472: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 2
    Jul 29 16:29:24.473: [fh_smtp_debug_cmd]
    Jul 29 16:29:24.473: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 3
    Jul 29 16:29:57.475: [fh_smtp_debug_cmd]
    Jul 29 16:29:57.475: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 4
    Jul 29 16:30:30.478: [fh_smtp_debug_cmd]
    Jul 29 16:30:30.479: %HA_EM-6-LOG: vpn_failure.tcl : DEBUG(smtp_lib) : smtp_connect : attempt 5
    Jul 29 16:31:00.482: %HA_EM-6-LOG: vpn_failure.tcl: smtp_send_email: error connecting to mail server:
    cannot connect to all the candidate mail servers
    Jul 29 16:31:00.483: %HA_EM-6-LOG: vpn_failure.tcl: vpn_failure.tcl script completed
    event manager environment _email_server 10.79.1.126
    event manager environment _email_from [email protected]
    event manager environment _email_to [email protected]
    interface Port-channel1.101
    description MGMT-1
    encapsulation dot1Q 101
    vrf forwarding MGMT-1
    ip address 10.79.1.252 255.255.255.0
    ip nat inside
    ip virtual-reassembly
    redundancy rii 101
    redundancy group 2 ip 10.79.1.254 exclusive decrement 10
    end
    #----------------------- send mail ----------------------
    # create mail form
      action_syslog msg "Creating mail header for vpn_failure.tcl script..."
      set body [format "Mailservername: %s" "$_email_server"]
      set body [format "%s\nFrom: %s" "$body" "$_email_from"]
      set body [format "%s\nTo: %s" "$body" "$_email_to"]
      set _email_cc ""
      set body [format "%s\nCc: %s" "$body" "[email protected]"]
      set body [format "%s\nSourceintf: %s" "$body" "port-channel1.101"]
      set body [format "%s\nSubject: %s\n" "$body" "VPN Failure Detected: Router $routername Crypto tunnel is DOWN. Peer $remote_peer"]
      set body [format "%s\n%s" "$body" "Report Summary:"]
      set body [format "%s\n%s" "$body" "   - syslog message"]
      set body [format "%s\n%s" "$body" "   - summary of interface(s) in an up/down state"]
      set body [format "%s\n%s" "$body" "   - show ip route $remote_peer"]
      set body [format "%s\n%s" "$body" "   - show crypto isakmp sa"]
      set body [format "%s\n%s" "$body" "   - show crypto session detail"]
      set body [format "%s\n%s" "$body" "   - show crypto engine connection active"]
      set body [format "%s\n%s" "$body" "   - show ip nhrp detail (DMVPN only)"]
      set body [format "%s\n%s" "$body" "   - show log"]
      set body [format "%s\n\n%s" "$body" "---------- syslog message ----------"]
      set body [format "%s\n%s" "$body" "$syslog_msg"]
      set body [format "%s\n\n%s" "$body" "---------- summary of interface(s) in an up/down state ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_interface_brief_up_down"]
      set body [format "%s\n\n%s" "$body" "---------- show ip route $remote_peer ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_route"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto isakmp sa ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_isakmp_sa"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto session detail ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_session_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show crypto engine connection active ----------"]
      set body [format "%s\n\n%s" "$body" "$show_crypto_engine_connection_active"]
      set body [format "%s\n\n%s" "$body" "---------- show ip nhrp detail (DMVPN only) ----------"]
      set body [format "%s\n\n%s" "$body" "$show_ip_nhrp_detail"]
      set body [format "%s\n\n%s" "$body" "---------- show log ----------"]
      set body [format "%s\n\n%s" "$body" "$show_log"]
      if [catch {smtp_send_email $body} result] {
        action_syslog msg "smtp_send_email: $result"
      action_syslog msg "vpn_failure.tcl script completed"
    #------------------ end of send mail --------------------

  • Tcl script help -- include interface description in status message

    Hi there,
    I'm trying to create a script that will email me when an interface goes down, and include the interface description in the email.  I've found a script that successfully emails me when the status changes, and I found another script that will parse for the interface description, but I can't seem to get them to work together.  I've mashed them up together into the below script:
    # EEM policy that will monitor SYSLOG for Interface status changes.
    # If UPDOWN message is detected, send an email with interface information.
    ### The following EEM environment variables are used:
    ### _email_server
    ### - A Simple Mail Transfer Protocol (SMTP)
    ### mail server used to send e-mail.
    ### Example: _email_server mailserver.example.com
    # Register for a Syslog event. Event Detector: Syslog
    # Match pattern for Interface Status change
    ::cisco::eem::event_register_syslog pattern "%LINK-3-UPDOWN"
    # NAMESPACE IMPORT
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    # Set array for event_reqinfo
    # Array is populated with additional event information
    array set Syslog_info [event_reqinfo]
    set msg $Syslog_info(msg)
    # Set routername variable for use later
    set routername [info hostname]
    # Parse output for interface name
    if { ! [regexp {: ([^:]+)$} $msg -> info] } {
        action_syslog msg "Failed to parse syslog message"
    regexp {Line protocol on Interface ([a-zA-Z0-9]+)} $info -> interface 
    # ------------------- cli open -------------------
    if [catch {cli_open} result] {
    error $result $errorInfo
    } else {
    array set cli $result
    # Go into Enable mode
    if [catch {cli_exec $cli(fd) "enable"} result] {
    error $result $errorInfo
    #Find interface description
    if [catch {cli_exec $cli(fd) "show interface $interface | inc Description" } description] {
            error $description $errorInfo
    #--------------------- cli close ------------------------
    cli_close $cli(fd) $cli(tty_id)
    set time_now [clock seconds]
    set time_now [clock format $time_now -format "%T %Z %a %b %d %Y"]
    # EMAIL MESSAGE
    # This manually creates a text message with specific format to be used by the
    # smtp_send_email command later to send an email alert.
    # Ensure the following are configured:
    # ip domain-name <domain.com>
    # If a hostname is used for mailservername, ensure the following are configured:
    # ip name-server <dns-server>
    # ip domain-lookup
    # NOTE: Change environment variable _email_server to your SMTP server
    # The email below references the following variables:
    # $routername: hostname of device
    # $time_now: time when specific Syslog message was detected
    # $msg: Syslog message received
    set email_message "Mailservername: $_email_server
    From: [email protected]
    To: $_email_to
    Cc:
    Subject: EEM: Critical interface status change on $routername
    This email is generated by EEM.
    $time_now
    $msg
    $description
    # Send email message
    if {[catch {smtp_send_email $email_message} result]} {
    set result "Email send failed"
    } else {
    set result "Email Sent"
    # Debug message to check email transmission status
    action_syslog msg "$result"
    When I trigger an interface UPDOWN message, I'm getting the following error on the command line:
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: can't read "interface": no such variable
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     while executing
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: "cli_exec $cli(fd) "show interface $interface | inc Description" "
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     invoked from within
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: "$slave eval $Contents"
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     (procedure "eval_script" line 7)
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     invoked from within
    Oct 17 23:56:19.355 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: "eval_script slave $scriptname"
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     invoked from within
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: "if {$security_level == 1} {       #untrusted script
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:      interp create -safe slave
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:      interp share {} stdin slave
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:      interp share {} stdout slave
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: ..."
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
    Oct 17 23:56:19.359 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: Tcl policy execute failed: can't read "interface": no such variable
    Can anyone help me figure out where I'm going wrong? 
    Thanks in advance,
    Brandon

    Hi Dan,
    Thanks for the reply.   I've made the changes you suggested but I'm still getting the error:
    Oct 18 21:41:50.446 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: can't read "interface": no such variable
    Oct 18 21:41:50.446 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl:     while executing
    Oct 18 21:41:50.446 HKT: %HA_EM-6-LOG: CriticalLinkStatus.tcl: "cli_exec $cli(fd) "show int $interface | inc Description""
    Is there any additional debugging I could place in my script?  Normally I would try and print the variables after each line to see what's being populated, but I'm not sure how I can test that from within EEM.
    --Brandon

  • EEM-TCL Script to switch config from interface X to interface Y

    Hello Guys,
    I’m trying to create a script which is controlled by an EEM-UPDOWN event of an interface. What I’m trying to do is, if interface X is down for some reason it should copy the interface configuration to interface Y.
    So my problem is I’m very new to eem-tcl scripting and I have some basic problem hopefully u can help me =) I’m working on a ASR9K !
    So what i have done so fare:
    ::cisco::eem::event_register_syslog occurs 1 pattern ".*CHANGED.*$_sat_1_link_1.*" maxrun 90   
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    array set arr_einfo [event_reqinfo]
    if {$_cerrno != 0} {
        set result [format "component=%s; subsys err=%s; posix err=%s;\n%s" \
          $_cerr_sub_num $_cerr_sub_err $_cerr_posix_err $_cerr_str]
        error $result
    if [catch {cli_open} result] {
        error $result $errorInfo
    } else {
        array set cli1 $result
    action_syslog priority emergencies msg "start script testv1_1"
    #puts "\nEXECUTE CLI COMAND :\n"
    set out {cli_exec $cli1(fd) "show running-config formal interface $_sat_1_link_1"}
    set xout [split $out \n]
    #puts "DEBUG : $xout \n\n"
    set anz [llength $xout]
    #puts "DEBUG : count rows = $anz \n\n"
    for {set ii "0"}  {$ii < $anz } {incr ii} {
           set indexout [lindex $out $ii]
        regexp  {([\w]+)[ ]([\w\d/]+)\s(.*)} $indexout a b c d
        #puts "\nDEBUG START"
        #puts "\nindex Nr  $ii"
        #puts "Full Match: $a"
        #puts "Sub Match1: $b"
        #puts "Sub Match2: $c"
        #puts "Sub Match3: $d"
        #puts "DEBUG END\n"
        set intsrc {cli_exec $cli1(fd) "no $b $_sat_1_link_1 $d"}
        set intdest {cli_exec $cli1(fd) "$b $_sat_1_link_2 $d"}
    if [catch {cli_exec $cli1(fd) "commit"} result] {
        error $result $errorInfo
    if [catch {cli_exec $cli1(fd) "end"} result] {
        error $result $errorInfo
    action_syslog priority emergencies msg "End script testv1_1"
    ps. $_sat_1_link_1 and $_sat_1_link_2 are globaly set per cli in the event manager env.
    Thanks for your help and hopefully u can help me with this script

    Hey
    after show running-config formal interface TenGigE 0/0/2/1 the cli output example is :
    interface TenGigE0/0/2/1 description Test: 0-43
    interface TenGigE0/0/2/1
    interface TenGigE0/0/2/1 shutdown
    and now i want to split the config with my regex
    regexp  {([\w]+)[ ]([\w\d/]+)\s(.*)} $indexout a b c d
    As example line 1
    set x= "TenGigE0/0/2/2"                  --> =dest_interface
    a= interface TenGigE0/0/2/1 description Test: 0-43
    b= interface
    c= TenGigE0/0/2/1
    d= description Test: 0-43
    do this
    cli_exec $cli1(fd) "no $b $c $d"      --->no interface TenGig E0/0/2/1 description Test: 0-43
    cli_exec $cli1(fd) " $b $x $d"          ---> interface TenGigE0/0/2/2 description Test: 0-43
    and from this point it shoud do this until there are no config lines  =)
    as a final result is should copy the whole config from interface X to interface Y  if the trigger is active
    but as i see, the main problem is to get the CLI output in a format like this
    set xy = interface TenGigE0/0/2/1 description Test: 0-43\ninterface TenGigE0/0/2/1\ninterface TenGigE0/0/2/1 shutdown
    or in an index like this:
    Index | command
    1         interface TenGigE0/0/2/1 description Test: 0-43
    2         interface TenGigE0/0/2/1
    3         interface TenGigE0/0/2/1 shutdown
    Thx

  • How can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card, how can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card

    how can i get acsess to my data if my iphone is shut and can´t open any more??how can i get acsess to the memory card????please help

    You can't. There is no memory card. It uses flash memory that's soldered to the logic board. If you didn't back it up, your data is gone.

  • HT5361 I can't shut down my computer because it says mail is open.  It says to close mail and continue shut down.  Problem is I can't open or close mail now.  Can't shut down my computer at all.  What can I do?

    I can't shut down my computer because it says mail is open.  It says to close mail and continue shut down.  Problem is I can't open or close mail now.  Can't shut down my computer at all.  What can I do?

    If you cannot get mail to quit/force quit, you can always remove power from your Mac.
    NOTE: removing power is a bad idea, and can result in data loss, but sometimes it is the only thing left to do.
    Press and hold the power button for 5 to 10 seconds, and the Mac will power off.
    When you power back on, the Mac should reboot.

  • Kernel panics every time (shut down your computer). When it stays on I get blotched video, left-over spots, tearig and then shut down your computer...

    I use my PowerPC Quicksilver G4  (2.1), 867 MHz, 1.5 GB standart video card system 10.4.11 to scan (lack of driver for my Mac Pro 10.6.8)
    The G4 has been running flawless, now I get kernel panics every time (shut down your computer). When it stays on I get blotched video
    left-over spots, tearig and then shut down your computer...
    I did all recommended software tests Diskutility, rebuild with DiskWarrior and Apples full Hardware test. Everything comes out fine!
    I am at the end of my know how. Thank you for any help
                                                                                                             W.W.
    I am attaching the latest crashreport:
    Unresolved kernel trap(cpu 0): 0x300 - Data access DAR=0x0000000047AC834E PC=0x0000000000821D3C
    Latest crash info for cpu 0:
       Exception state (sv=0x37D2EA00)
          PC=0x00821D3C; MSR=0x00009030; DAR=0x47AC834E; DSISR=0x40000000; LR=0x00821D24; R1=0x21E23B40; XCP=0x0000000C (0x300 - Data access)
          Backtrace:
    0x00032E98 0x0081AB20 0x0080AC74 0x002E9A80 0x002EB94C 0x0008C248
             0x00029234 0x000233F8 0x000ABEAC 0x5038514E
          Kernel loadable modules in backtrace (with dependencies):
             com.apple.GeForce(4.1.8)@0x7ff000
                dependency: com.apple.iokit.IOPCIFamily(1.7)@0x491000
                dependency: com.apple.iokit.IOGraphicsFamily(1.4.2)@0x5fc000
                dependency: com.apple.iokit.IONDRVSupport(1.4.2)@0x620000
                dependency: com.apple.NVDAResman(4.1.8)@0x636000
    Proceeding back via exception chain:
       Exception state (sv=0x37D2EA00)
          previously dumped as "Latest" state. skipping...
       Exception state (sv=0x38A98780)
          PC=0x9000B348; MSR=0x0200F030; DAR=0x01785000; DSISR=0x42000000; LR=0x9000B29C; R1=0xF0202F20; XCP=0x00000030 (0xC00 - System call)
    Kernel version:
    Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
    panic(cpu 0 caller 0xFFFF0003): 0x300 - Data access
    Latest stack backtrace for cpu 0:
          Backtrace:
             0x000954F8 0x00095A10 0x00026898 0x000A8204 0x000ABB80
    Proceeding back via exception chain:
       Exception state (sv=0x37D2EA00)
          PC=0x00821D3C; MSR=0x00009030; DAR=0x47AC834E; DSISR=0x40000000; LR=0x00821D24; R1=0x21E23B40; XCP=0x0000000C (0x300 - Data access)
          Backtrace:
    0x00032E98 0x0081AB20 0x0080AC74 0x002E9A80 0x002EB94C 0x0008C248
             0x00029234 0x000233F8 0x000ABEAC 0x5038514E
          Kernel loadable modules in backtrace (with dependencies):
             com.apple.GeForce(4.1.8)@0x7ff000
                dependency: com.apple.iokit.IOPCIFamily(1.7)@0x491000
                dependency: com.apple.iokit.IOGraphicsFamily(1.4.2)@0x5fc000
                dependency: com.apple.iokit.IONDRVSupport(1.4.2)@0x620000
                dependency: com.apple.NVDAResman(4.1.8)@0x636000
       Exception state (sv=0x38A98780)
          PC=0x9000B348; MSR=0x0200F030; DAR=0x01785000; DSISR=0x42000000; LR=0x9000B29C; R1=0xF0202F20; XCP=0x00000030 (0xC00 - System call)
    Kernel version:
    Darwin Kernel Version 8 Model: PowerMac3,5, BootROM 4.2.5f1, 1 processors, PowerPC G4  (2.1), 867 MHz, 1.5 GB
    Graphics: NVIDIA GeForce2 MX, GeForce2 MX, AGP, 32 MB
    Memory Module: DIMM0/J21, 512 MB, SDRAM, PC133-333
    Memory Module: DIMM1/J22, 512 MB, SDRAM, PC133-333
    Memory Module: DIMM2/J23, 512 MB, SDRAM, PC133-333
    Modem: Spring, UCJ, V.90, 7.0F, á¸
    Network Service: Built-in Ethernet, Ethernet, en0
    Parallel ATA Device: WDC WD1200JB-00GVA0, 111.79 GB
    Parallel ATA Device: ST3120814A, 111.79 GB
    Parallel ATA Device: PIONEER DVD-RW  DVR-103
    USB Device: Hub in Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 500 mA
    USB Device: Apple Optical USB Mouse, Fujitsu Takamisawa Component, Up to 1.5 Mb/sec, 100 mA
    USB Device: Apple Pro Keyboard, Mitsumi Electric, Up to 12 Mb/sec, 250 mA

    Thank you for your reply BDAqua.
    Yes I ran short and the Extended Test. All pass. One of the first things I did is Safe Boot several times I also repaired permissions. Safe boot takes no longer than before the crashes and as long as I stay in safe boot mode it won't crash. What does that mean?I also ran MacJanitor and removed the SCCUZI card Apple put in when I bought the G4 as well as an M-Audio Delta 66 card which I do not use (both) anymore. I also started up on an external firewire drive 10.4.6. It also (crashes) does the same thing.
    I was hoping somebody understands the crash report I enclosed? Isn't that suppose to say what went wrong?
    Thank you again for your input BDAqua
                                                                  W.W.

  • My iPhone 5s with iOS 7.1 become very hot when charged almost reach 100% and will shut down itself.

    My iPhone 5s with iOS 7.1 become very hot when charged almost reach 100 % and will shut down itself. Then I need to off the power and let it cool down first before I can on the phone back. Please help me to solve this problem. Thanks.

    Hi Limfromsi,
    It is normal to an extent for the iPhone to get warm during charging. If your iPhone is currently in a case, you may want to try charging it without one and see if the issue occurs, as the design of the iPhone uses the exterior of the device as a cooling surface. For more information about iPhones and temperature, you may find the following article helpful:
    iOS devices: Keeping device within acceptable operating temperatures
    http://support.apple.com/kb/ht2101
    If you continue to have issues with your iPhone in the default config (no case, using the included original cable and power adapter), you may want to have your phone evaluated for service. The following page may be of use:
    Service Answer Center - iPhone
    http://support.apple.com/kb/index?page=servicefaq&geo=United_States&product=ipho ne
    Regards,
    - Brenden

  • Several Apps seem to just mysteriously shut down after using for a while. Same with Safari, I will be using Safari and it shuts down. Face book too. I've reset and shut down my iPad 3 and restart it, but it stills shuts down. What to do?

    Several Apps seem to mysteriously shut down after using them for a while. Face Book shuts down , netflix, Safari, and other Apps. They work fine for a short while, or a long while, and then shut down and it brings me to my regular desktop screen. I've tried restarting by completely shutting down the IPad until I see the apple pic and turned it back on, but the shutdowns of apps continue. Anyone else have this issue? It generally started shortly after downloading and installing IOS 7......

    Hi jennyoutwest,
    Welcome to the Support Communities!
    The following articles will provide some troubleshooting steps for your iPhone.
    iPhone, iPad, iPod touch: Turning off and on (restarting) and resetting
    http://support.apple.com/kb/HT1430
    If that does not resolve the issue, refer to page 146 in the iPhone User Guide to Reset All Settings:
    iPhone User Guide for iOS 7
    manuals.info.apple.com/MANUALS/1000/MA1565/en_US/iphone_user_guide.pdf
    The final troubleshooting step would be to restore your device:
    iTunes: Restoring iOS software
    http://support.apple.com/kb/ht1414
    Restoring your device will delete all data and content, including songs, videos, contacts, photos, and calendar information, and will restore all settings to their factory condition. Before restoring:
    Verify that you are using the latest version of iTunes.
    Back up your device.
    Transfer and sync content to your computer.
    Cheers,
    - Judy

  • I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other ap

    I am trying to use the trial creative cloud software on a PC windows 8.1 - I've downloaded and removed Photoshop CC 2014 two times - every time I open the file it says there is a problem and it shuts down and closes. I can open indesign and maybe other apps but photoshop no. Any ideas?

    I don't think I can access the crash report? Excuse the ignorant questions I'm about to make am a relative tech novice.
    Soo - as mentioned every time I open photoshop it crashes - it just says there's an error and the program will shut down and if there's a solution windows will notify me. Then nothing...
    I've tried to look in photoshop files for the detailed crash report & the system event viewer but cannot find a file with those names. I've also looked in the windows files for files with those names but cannot find them either - so I don't know where to look.
    Any guidance would be great.

  • My ipod app no longer works. Everytime I go to open the ipod app it stays open for a second and then shuts down. I am not able to get anything to play either through the standard ipod controls or the multitasking control panel. I'm sure there will be an u

    my ipod app no longer works. Everytime I go to open the ipod app it stays open for a second and then shuts down. I am not able to get anything to play either through the standard ipod controls or the multitasking control panel. I'm sure there will be an update soon to correct this, i just wanted to see if anyone else was having the same problem.
    wen i open ipod in my iphone ,, it gets stuck ,, and get backs to the menu ,,, and doesnot play anything ,, not video nor song

    If your phone is not officially unlocked by the carrier in the UK, you can not use the phone using another SIM, unless you modify the software or the SIM, which can lead to unexpected results, such as non functioning apps.
    Unauthorized modification of iPhone OS has been a major source of instability, disruption of services, and other issues
    Problems resulting from those modifications can't be discussed in these forums, due to the Terms of Use

  • Macbook Pro starts up, has a small loading bar, and then shuts off.

    Macbook Pro starts up, has a small loading bar, and then shuts off after a few seconds, but the Windows bootcamp partition works fine.
    The repair disc option (using install disc) failed, and the computer cannot locate the original Mac side partition. Only Bootcamp appears under options to "restore from backup" or reinstall. The repair disc options says it should be repaired but doesn't seem to know how.
    Macbook Pro.
    Snow leaopard
    Bootcamped with Windows.
    Any ideas?

    Hold c or option key and boot off the 10.6 installer disk, run DU Repair from there.
    run through this list of fixes 1-8
    Step by Step to fix your Mac
    If it doens't work, you can recover files if you don't have any current OS X file backups, then grab what you can out of Bootcamp
    Use Data Rescue installed on the extenral boot drive ($100) to read the bits of the internal (non-filevaulted) drive to retrieve OS X data files if you can't get them off manually via drag and drop methods.
    Create a data recovery, undelete boot drive
    If you want to clone Windows, use WinClone and another drive. However it's likely compromised, unless it something you did in Windows, like trying to create a new parttition perhaps?
    Then perform a Zero Erase and install of 10.6 as shown here (on the entire drive, not only the parittions), this will give a new GUID partition table, EFI and map off bad sectors, totally fresh everything.
    How to erase and install Snow Leopard 10.6
    You cna use Carbon Copy Cloner to clone the new extenral setup to the new scrubbed internal drive. Recreate Bootcamp and WinClone back or fresh install Windows into Bootcamp like before. OR opt to use virtual machine software which is safer.
    Windows in BootCamp or Virtual Machine?
    Windows 7 can write to the boot drives GUID partition map (unlike XP), this is likely why it's borked now.

  • My macbook pro will not boot. It gets the grey screen with the apple until the bar is half way across and then shuts down. The only screen I can get to is in safe mode and I don't know what to do with that

    my macbook pro will not boot. It gets the grey screen with the apple until the bar is half way across and then shuts down. The only screen I can get to is in safe mode and I don't know what to do with that

    Mac OS X: Gray screen appears during startup - Apple Support

Maybe you are looking for

  • IPad 3- cracked screen repaired and not working???

    So we cracked our iPad three, (the new, now discontinued one) and the screen was completely shattered. We got it repaired at a repair shop that looked reputable but now it doesn't seem so. The screen is completely scratch free and perfect, but the LC

  • Bad Posterization With Onscreen Proofing

    Hey Everybody, I just recently got Aperture and I LOVE it. I'm only having one problem: I shoot RAW with my EOS 5D and need to output in the sRGB IEC61966-2.1 color space. I know I should have Onscreen Proofing turned on set to sRGB IEC61966-2.1 in o

  • Motion wont start

    Hi folks - can someone please help me - ive got a film project to do and am using final cut files with motion on my macbook pro and they wont open in final cut on my intel.

  • Song and tv show purchased on ipod touch wont sync to mac itunes

    The ipod touch generated a -50 and -3203 error in itunes during the sync process and now all purchases wouldn't play without a restore and items purchased and downloaded directly to the ipod touch are gone after a restore. The ipod touch can't be mou

  • Sticky session reset by ¿ACE or real server?

    Hello team. I am looking for hints to debug cookie-based sessions that are failing to work across my ACE. Basically, the user types http://10.150.3.130/iwsupport, and that shoud be distributed across a farm of servers hidden behind the ACE.The server