IOS-XR reachability-check TCL script

Hi there,
I'm currently playing with TCL scripts to prepare for my CCIE lab exam. The main purpose I'm gonna use them is to
check the reachability within ISP IGP domain and/or L3VPN domain.
Currently I'm facing the following issue: I'm unable to specify the source address used to run ping:
% tclsh
foreach address {
2010::2
2010::3
2010::4
2010::5
2010::6
2010::7
} { ping $address source lo0
% % Invalid parameter(s)
child process exited abnormally
Can somebody kindly help me out to modify the script so that ping is sourced from conifgured interface?
Thanks in advance

try this. Note, you have to set your source address:
set loop0 2010::1
foreach address {
2010::2
2010::3
2010::4
2010::5
2010::6
2010::7
} { ping6 -S $loop0 $address
Regards,
/A

Similar Messages

  • TcL Scripting for Cisco IOS,

    anyone has idea how useful this book
    TcL Scripting for Cisco IOS,
    http://www.ciscopress.com/bookstore/product.asp?isbn=1587059541
    thank you

    Hi Joe
    it is interesting that you are the technical reviewer of this book
    i was think to get mid level in Tcl scripting with EEM to give me the ability to  implement some automated things
    i am good with EEM but Tcl not
    will this book take the reader from scratch to tcl scripting ?
    thank you and happy new year
    Marwan

  • Problem : tcl script for filter IPSec cosmetic log

    Hi all, I would like some advice from anyone who ever see this case. I applied tcl script for filter ipsec error log that log is cosmetic. But my site want to don't see this log from router log. I already create tcl script for filter it out. Ok script can work fine but it more work. It filter other message not just ipsec log out. I check cisco device that support script. How can I fix this problem.
    See my detail of script and ios version of router :
    script :
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages
    # The script will filter by combination between facility-serverity and mnemonic      
    # Created on 05-Oct-2012.
    set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]
    set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"
    foreach msg $msgs {
        if { $msg == $fac_sev_mnem } {
        return ""
    return $::orig_msg
    ios router version :
    : c2800nm-adventerprisek9-mz.124-25f.bin
    : c2800nm-adventerprisek9-mz.124-7b.bin
    log information and configuration
    When I applied command:
    logging filter flash:VPN_Filter2.tcl
    logging buffered filtered 4096 debugging
    show log file:
    router#sh logg
    Syslog logging: enabled (11 messages dropped, 1 messages rate-limited,
                    0 flushes, 0 overruns, xml disabled, filtering enabled)
        Console logging: level debugging, 18145 messages logged, xml disabled,
                         filtering disabled
        Monitor logging: level debugging, 428 messages logged, xml disabled,
                         filtering disabled
            Logging to: vty322(2)
        Buffer logging: level debugging, 0 messages logged, xml disabled,
                        filtering enabled (0 messages logged)
        Logging Exception size (4096 bytes)
        Count and timestamp logging messages: disabled
    Filter modules:
        flash:VPN_Filter2.tcl  
        Trap logging: level informational, 47011 message lines logged
            Logging to 10.145.0.25 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.41 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
            Logging to 10.247.17.45 (udp port 514, audit disabled, link up), 47011 message lines logged, xml disabled,
                   filtering disabled
    --More--                          
    Log Buffer (4096 bytes):
    router#
    If you have some more information. Please tell me.
    Thank you for your advice

    It looks like your script has an error.  You have an extra '}'.  It should be:
    # VPN_Error.tcl  This script deletes all log messages about VPN error messages# The script will filter by combination between facility-serverity and mnemonic       # Created on 05-Oct-2012.#set msgs [list {CRYPTO-4-RECVD_PKT_MAC_ERR} {VPN_HW-1-PACKET_ERROR} {CRYPTO-4-RECVD_PKT_NOT_IPSEC} {CRYPTO-4-PKT_REPLAY_ERR}]set fac_sev_mnem "${::facility}-${::severity}-${::mnemonic}"foreach msg $msgs {    if { $msg == $fac_sev_mnem } {        return ""    } } return $::orig_msg

  • Problem with TCl script

                       Hello I need help, my Cisco Router (2921) work not correct with tcl script.
    Tcl script work fine on this device long time, but in one time script was not start get error(no any script changes):
    005495: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Unknown error 2620
    005496: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     while executing
    005497: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "close $myfileid"
    005498: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     invoked from within
    005499: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "$slave eval $Contents"
    005500: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     (procedure "eval_script" line 7)
    005501: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     invoked from within
    005502: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "eval_script slave $scriptname"
    005503: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     invoked from within
    005504: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: "if {$security_level == 1} {       #untrusted script
    005505: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:      interp create -safe slave
    005506: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:      interp share {} stdin slave
    005507: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:      interp share {} stdout slave
    005508: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: ..."
    005509: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl:     (file "tmpsys:/lib/tcl/base.tcl" line 50)
    005510: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Tcl policy execute failed:
    005511: Aug 26 08:46:27: %HA_EM-6-LOG: event.tcl: Unknown error 2620
    If I try do command it not help:
    no event manager policy event.tcl
    event manager policy event.tcl
    I try reload script in router, and every time then script was start, some part of script file was deleted (it very intrusting, because i think script in flash only read (not write))
    Only reload help, auto reload script work fine.
    Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.1(4)M6, RELEASE SOFTWARE (fc2)

    hello Joseph, this TCL script work long time with out any problem and with out any changes.
    On this device I change configuration (add two EEM aplet with event tag syslog pattern) auto this modification i have problem. May be I try do all my configuration on TCL script.
    I add EMM (it work with out any problem): 
    event manager applet RESET-3G-S
    event tag 1.0 syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Up->Down"
    event manager applet 3G-EEM-STOP
    event tag 1.0 syslog pattern "%TRACKING-5-STATE: 2 ip sla 2 reachability Down->Up"
    My scipt have syslog patern:
    ::cisco::eem::event_register_syslog tag 1 pattern ".*SEC_LOGIN-4-LOGIN_FAILED: Login failed.*" occurs 1 maxrun 50
    ::cisco::eem::event_register_syslog tag 2 pattern ".*%SEC_LOGIN-5-LOGIN_SUCCESS: Login Success*" occurs 1
    ::cisco::eem::event_register_syslog tag 3 pattern ".*%SYS-5-RESTART.*" occurs 1
    ::cisco::eem::trigger {
    ::cisco::eem::correlate event 1 or event 2 or event 3
    ::cisco::eem::attribute tag 1 occurs 1
    ::cisco::eem::attribute tag 2 occurs 1
    ::cisco::eem::attribute tag 3 occurs 1
    Tahnk you

  • 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

  • Runnig TCL script manually?

    We are running a TCL script via a cron job with no issue, every 2 minutes and it working like a bomb.
    When i try run the script manually via the event manager run xxx.tcl it say that it is not registered?
    When i check the sh event manamger policy registed it says it is?
    Any ideas?
    Regards
    Noel

    You don't need kron or Tcl for this.  You can use the built-in config archive feature of IOS:
    http://www.cisco.com/en/US/docs/ios/12_3t/12_3t7/feature/guide/gtrollbk.html#wp1100253
    If you do want to go the scheduled route with EEM, start a new thread for your issue.

  • Running a TCL script through EEM every 60 seconds

    I have a script written in the TCLSH of IOS, I can test this script from the shell using the following commands
    LAB-RTR#tclsh
    LAB-RTR(tcl)#source flash:test.tcl
     NO CALLS
    Is there a way I can run this test.tcl script every 60 seconds on the router.
    SCRIPT test.tcl
    proc get_ints {} {
    set syslog [open "syslog:" w+]
    #puts "BEFORE\n"
    set check ""
    set int_out [ exec "show voice call status\n" ]
    #puts "INTOUT $int_out\n"
    set mylist [regexp -nocase -line -inline {(^([0-9]*|No) active calls? found)} $int_out]
    #puts "MYLIST $mylist\n"
    foreach int $mylist {
     #puts "INT $int\n"
     if {$int == "No"} {
      puts " NO CALLS\n";
      puts $syslog "NO CALLS"
     } elseif {[string is integer -strict $int]} {
      puts "$int CALLS\n";
      puts $syslog "$int CALLS"
     } else {
      #puts "GARBAGE\n";
    close $syslog
    #puts ""
    puts [eval get_ints]

    Hey Joseph, Thanks for all your help. I have one last question, so now that I am running my script every 60 seconds if there is an issue I send multiple traps to our monitoring system. Is there any way you can keep track if the trap was already sent I will not send another trap again.
    One way I can think of is using a loopback interface. But I would prefer not shutting down the loopback interface just to keep track of what my script is doing.
    IF issue {
       IF Loop1 is up {
                don't send trap
        } ELSE {
                bring Loop1 up
                Send Trap
     } ELSE (No issue) {
       shutdown Loop1

  • Validation TcL Script (Ping/Trace)

    I am looking for a script that I can use to help simplify my validation steps when I am doing some work on my devices. I typcially have anywhere from 2 - 10 IP addresses that I need to validate against (typically less than 5 though). My common steps are to ping each of my IP addresses and then I run a traceroute to those IP's to validate they are first reachable and then second I need to validate the path that is being taken is correct before my work and then after my work. So far I have come acrosss a TcL script that I could use for Ping, but not for trace. Ideally it would be nice if I could runa single line command with each IP address and then when I press enter the script will do the rest.
    a sample of what I would like to do is type:
    Script name: validate
    R1(tcl)#validate x.x.x.x y.y.y.y z.z.z.z
    The Ping script I found is below. I don't quite like it because it is not dynamic enough for what I am looking for, and I cannot seem to make this work for trace.
    R1#tclsh
    R1(tcl)#foreach address {
    +>(tcl)#172.12.23.2
    +>(tcl)#172.12.23.3
    +>(tcl)#172.12.23.4
    +>(tcl)#172.12.23.6
    +>(tcl)#172.12.23.7
    +>(tcl)#} { ping $address
    +>(tcl)#}
    Thank you,
    Toby

    I am learning TCL too and feel I can assist in some of this for you.
    The reason why you get an invalid argument is because you are using argv which only accepts arguments when you are calling a tcl script to run from a command line and you add arguments at the end to feed into the script dynamically.
    eg if you save a script called pingtest.tcl into the routers flash, then after the .tcl are your arguments that argv will soak in
    in otherwors "Command line arguments are stored in the list named 'argv"
    pingtest.tcl 192.168.1.1 192.168.1.2 192.168.1.3 etc etc
    I would recommend for now just turning it into a proc which you can use in the interactive tcl shell on the router. After you do that then you can branch off into saving it into flash or whatever.
    To turn it into a procedure you can forget about the argv stuff and just put the ip address directly into the proc argument.
    This means that when you call your proc name it will execute the procedure body using the argument in the proc.
    have a go at this. To make it neater you can create a placeholder variable for all the IP's you want to validate.
    What this will do is, if the ping is succesfull then it will go on to execute the traceroute.
    however if the ping fails then no traceroute is executed and it goes on to the next IP in the list.
    eg -
    set ip "192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.11.5 192.168.12.5 192.168.1.5 192.168.1.6 184.32.33.1 192.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10"
    Copy this into your routers interactive shell
    set ip "192.168.1.1 192.168.1.2 192.168.1.3 192.168.1.4 192.168.11.5 192.168.12.5 192.168.1.5 192.168.1.6 184.32.33.1 192.168.1.7 192.168.1.8 192.168.1.9 192.168.1.10"
    proc validate {x} {
    set counter 1
    puts "###########################"
    puts "# Running Ping Validation #"
    puts "###########################\n\n"
    foreach ip_address $x {
    set pings [exec ping $ip_address]
    if {[regexp {!!!!} $pings]} {
    puts "Analysing Ping $counter to IP - $ip_address"
    puts "Ping to $ip_address - \[SUCCESSFULL\]\n\n"
    puts "*****Validating path to $ip_address via traceroute*****"
    traceroute $ip_address
    puts \n
    puts "\[COMPLETED\]\n\n"
    puts -----------------------------------------------------------
    puts \n\n
    } else {
    puts "Analysing Ping $counter to IP - $ip_address"
    puts "Ping to $ip_address - \[FAIL\]\n\n"
    puts -----------------------------------------------------------
    incr counter
    validate $ip
    END
    -also its worth to note the tcl traceroute command is finiky, if you use exec it most likely wont work and just hang until all 30 hops are done. (potentially ios version dependant as I have read a couple of Josephs posts on similar issues with it)
    It would be easy to convert back into argv. Just replace to foreach ip_address $argv and get rid of the procedure.

  • TCL scripting

    st1\:*{behavior:url(#ieooui) }
    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin:0in;
    mso-para-margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:10.0pt;
    font-family:"Times New Roman";
    mso-ansi-language:#0400;
    mso-fareast-language:#0400;
    mso-bidi-language:#0400;}
    Network Scenario:
    We have a Client-Server enterprise network, and nature of servers is to broadcast some stats/info to all the clients.
    We are using two 6509-E at core with HSRP to provide the redundancy for servers. I have attached the network layout (not the real one) with some description with this thread. On both switches we have configured “ip helper-addresses” to forward the broadcast to multiple destinations(different VLANs). Every thing is working fine with respect to HSRP.
    Problem:
    Under normal circumstances, both ACTIVE and STANDBY hsrp switches generates broadcast which causing duplication of every broadcast packet and Client end receiving every packet twice. Cisco already claimed that standby switch will forward the broadcast. As an alternate TAC has advised to use the TCL script as a work around which we attempted to however no success at the end.
    Please let me know if some one can help me in modifying TCL script.
    ::cisco::eem::event_register_syslog occurs 1 pattern .*STANDBY.*STATECHANGE.* maxrun 90
    # EEM policy used to detect an HSRP state change. Once change is detected, analize the
    # type of change and modify the configuration about helper address.
    # The script looks for the DHCP server ip address in dhcp_server environment variable
    # and adds or removes the command 'ip helper-address dhcp_server' to the interface on
    # which HSRP status has changed.
    # April 2006, Cisco Europe & Emerging TME Team
    # Copyright (c) 2006 by cisco Systems, Inc.
    # All rights reserved.
    ### The script uses the following environment variables:
    #   $dhcp_server - ip address of the DCHP server in four octect dotted notation
    # 1. check if all the env variables we need exist and if not abort
    namespace import ::cisco::eem::*
    namespace import ::cisco::lib::*
    if {![info exists dhcp_server]} {
        set result "EEM Policy Error: variable dhcp_server has not been set"
        error $result $errorInfo
    # 2. Local procedure for CLI show commands
    # Pass a list of cli commands and it returns a list of outputs
    proc CLICmdProc {cmds} {
        if [catch {cli_open} result] {
            error $result $errorInfo
        } else {
            array set cli1 $result
        if [catch {cli_exec $cli1(fd) "enable"} result] {
            error $result $errorInfo
        foreach a_cmd $cmds {
            if [catch {cli_exec $cli1(fd) $a_cmd} result] {
                error $result $errorInfo
            } else {
                lappend cmd_output $result
        if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
            error $result $errorInfo
        return $cmd_output
    # 3. Local procedure for CLI configuration commands
    # Pass a list of cli commands
    proc CLICfgProc {cmds} {
        if [catch {cli_open} result] {
            error $result $errorInfo
        } else {
            array set cli1 $result
        if [catch {cli_exec $cli1(fd) "enable"} result] {
            error $result $errorInfo
        if [catch {cli_exec $cli1(fd) "config terminal"} result] {
            error $result $errorInfo
        foreach a_cmd $cmds {
            if [catch {cli_exec $cli1(fd) $a_cmd} result] {
                error $result $errorInfo
            } else {
                set cmd_output $result
        if [catch {cli_exec $cli1(fd) "end"} result] {
            error $result $errorInfo
        if [catch {cli_exec $cli1(fd) "write mem"} result] {
            error $result $errorInfo
        if [catch {cli_close $cli1(fd) $cli1(tty_id)} result] {
            error $result $errorInfo
    # 4. query the information of latest triggered eem event
    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
    set msg $arr_einfo(msg)
    # 5. we save the interface which triggered the event in interface
    regexp {(Vlan[0-9]{1,4}).*-> ([A-Z,a-z]*$)} $msg result interface action
    if {$action == "Active"} {
                  lappend clicmd "interface $interface"
                  lappend clicmd "ip helper-address $dhcp_server"
    if {$action != "Active"} {
                  lappend clicmd "interface $interface"
                  lappend clicmd "no ip helper-address $dhcp_server"
    set cliout [CLICfgProc $clicmd]
    action_syslog msg "Updating the configuration of interface $interface"

    Try this version.  You will need to first set an environment variable, dhcp_servers to be a comma separated list of IP addresses (i.e. the helper addresses) to configure/unconfigure.  For example:
    event manager environment dhcp_servers 192.168.10.255,192.168.12.255,192.168.14.255

  • Use of gset in CSM TCL Script

    Hello,
    I am trying to write a TCL script on a CSM (Code Ver 4.1) that retains the value of a variable between probe instances (so I can increment and check a variable in each probe attempt). Looking at the documentation there is supposed to be a 'gset' command that does this but cannot make this work.
    The example says 'gset var 1 ; incr var'.
    I have several problems with this:
    1. I would think that this would set the value of var to 1 each time it runs and then increment it (maybe)
    2. How can I read the value of the persistent variable without it causing an error if it doesn't exist?
    3. It doesn't seem to work anyway as var doesn't appear in the Persistent Variables section of 'show mod csm x tech script'
    Any ideas on this or on where I can get some examples where the gset command is used?
    Many Thanks
    LP

    it works for me:
    I just added the gset and incr commands to the echo probe and it I do see the counter increasing.
    gset counter 1
    # parse cmd line args and initialize variables
    puts "initializing variable 2"
    set EXIT_MSG "Error config: script ECHO_PROBE "
    incr counter
    puts "Counter: $counter"
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
    initializing variable 2
    Counter: 7
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.24:7: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.24:7: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.24:7: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.24:7: probe success
    initializing variable 2
    Counter: 7
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.24:21: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.24:21: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.24:21: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.24:21: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.24:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
    initializing variable 2
    Counter: 8
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.48:7: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.48:7: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.48:7: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.48:7: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.48:7: probe success
    initializing variable 2
    Counter: 8
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
    initializing variable 2
    Counter: 8
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.24:7: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.24:7: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.24:7: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.24:7: probe success
    initializing variable 2
    Counter: 8
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.24:21: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.24:21: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.24:21: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.24:21: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.24:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
    initializing variable 2
    Counter: 9
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.48:7: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.48:7: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.48:7: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.48:7: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.48:7: probe success
    initializing variable 2
    Counter: 9
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.48:21: opening socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: sending resquest string
    ECHO_PROBE_SCRIPT:192.168.30.48:21: receiving response
    ECHO_PROBE_SCRIPT:192.168.30.48:21: closing socket
    ECHO_PROBE_SCRIPT:192.168.30.48:21: probe failed : expect 'csm_test' but got '220 Welcome to Linux1 FTP service.'
    initializing variable 2
    Counter: 9
    Script start
    this is a csm echo request
    ECHO_PROBE_SCRIPT:192.168.30.24:7: opening socket

  • OMBPlus TCL-script in OWB Designer at startup?

    Is there a way to run a OMBPlus script in OWB Designer automatically at startup?
    What I would like is a small tcl script that just contains a procedure like:
    proc run_script {} {
    source "I://OMB//SCRIPTS//2009//DEPLOY//START_DEPLOY.tcl"
    Then the users can just access the OMBplus part of the screen and type
    OMB> run_script
    (This instead of typing the entire source command...)
    Is this possible? To automatically run a small script at startup?

    Hi,
    Is this possible? To automatically run a small script at startup?OMBPlus is a Tcl/Java based (Jacl) TCL interpreter and it support auto_load mechanism (with auto_path variable and tclIndexfile).
    And please note that this mechanism doesn't work if you start OWB from Windows Start menu (use OWBHOME\owb\bin\win32\owbclient.bat instead).
    1) place your small tcl script into directory (for example into c:\tcl_autostart and name of your script small_script.tcl)
    2) Modify setowbenv.bat file (in OWBHOME\owb\bin\win32 directory) - add line
    SET TCLLIBPATH="C:/tcl_autostart"3) create in c:\tcl_autostart directory file tclIndex (without any file extension!) with contents (the first line must be exact I specify, because TCL interpreter check it before processing tclIndex)
    # Tcl autoload index file, version 2.0
    set auto_index(run_script) \[list source \[file join $dir small_script.tcl\]\]Now start OMBPlus (with OMBPlus.bat) or OWB (with owbclient.bat) - and you have new command run_script
    Tested on OWB 10.2.0.3
    Regards,
    Oleg
    Edited by: Oleg on 29/1/2010 15:33 correct contents of tclIndex

  • ACE TCL Script Probe for Websphere MQ

    Have anyone written a TCL script to probe MQ from the ACE?  Our app guys are saying that a Layer 4 probe (TCP port check) is generating errors in the QManager logs because there is no data exchange, just TCP connection setup, then tear-down.
    Thought I would check here to see if anyone has written a TCL Script for this before or has any other suggestions.
    Thanks!                  

    Hi,
    What do you need to check exactly on the server?  will be an specific uri?
    Cesar R
    ANS Team

  • ACE probe TCL script database

    Hello everyone, okay?
    I was thinking of a possibility to use my ACE to monitor a database, in this case a MySQL database Today I use a TCP probe, monitoring the port, but I would go one step further and try to make a connection in the DATABASE.
    I would like to see the possibility of a guideline in creating a TCL script to make a simple connection to a database.
    The idea is to try to make a connection in a database, run a query / select on any table just to validate its functionality and not just checking if the port is responding.
    I do not know how complex it is or what would be my pre -requisites required, but any help would be welcome.
    I thought about using an HTTP probe to make this validation and use a web page making the connection to the database, but it ended up creating another layer and if there is any problem in web service, the database would be affected indirectly.
    Thank you. All suggestions are welcome.

    Hi Plinio,
    I cannot see any support for testing authentication, SQL queries or connections to a database that is supported directly in TCL at this time.
    Here is the TCL guide that expalains the supported commands ( there is a HTTP example probe at the bottom )
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA4_2_0/configuration/slb/guide/script.html
    Beyond a TCL TCP probe to the port to test the listener is running, I believe your suggestion of a HTTP TCL script is probably the most accurate way to check the integrity of the database. You could write code to set a certain response to all types of failure scenarios and on the ACE you could then use a HTTP TCL script to parse the response from the web server to identify exactly what has failed in your database and act accordingly.
    cheers,
    Chris

  • EEM / Tcl Script Help Please

    Hello Community,
    I have been evaluating a Tcl Script posted here sometime ago, designed to help monitor track interfaces and routes, see attached.
    I believe I have applied the configurations correctly, however when I test the script by shutting down interfaces nothing happens.
    I'm sure its something very simple that I'm missing.
    I wonder if someone could take a look at the configs and let me know what I'm doing wrong. I have also attached a diagram.
    Cheers
    Carlton

    Joseph,
    I did read again and I got it to work :-)
    Cheers
    On a slightly different topic, is it possible to 'track' a static ip address?
    For example, I have the following tracking configured:
    track 1 ip route 0.0.0.0 0.0.0.0 reachability
    track 2 interface FastEthernet0/0 ip routing
    track 3 interface FastEthernet0/1 ip routing
    track 4 ip route 180.80.8.4 255.255.255.255 reachability
    track 5 ip route 170.70.7.4 255.255.255.255 reachability
    R3#show track brie
    Track   Object                         Parameter        Value
    1       ip route  0.0.0.0/0            reachability     Up (static)
    2       interface FastEthernet0/0      ip routing       Up
    3       interface FastEthernet0/1      ip routing       Up
    4       ip route  180.80.8.4/32        reachability     Down (no route)
    5       ip route  170.70.7.4/32        reachability     Down (no route)
    However, you will see that track 4 and 5 are down. This is because, although I can ping 180.80.8.4 and 170.70.7.4 the actual ip addresses don't appear in the routing table:
    Gateway of last resort is 0.0.0.0 to network 0.0.0.0
         170.70.0.0/24 is subnetted, 1 subnets
    C       170.70.7.0 is directly connected, FastEthernet0/0
         10.0.0.0/24 is subnetted, 1 subnets
    C       10.1.1.0 is directly connected, FastEthernet1/0
         180.80.0.0/24 is subnetted, 1 subnets
    C       180.80.8.0 is directly connected, FastEthernet0/1
         150.50.0.0/24 is subnetted, 1 subnets
    C       150.50.5.0 is directly connected, Ethernet2/0
    S*   0.0.0.0/0 is directly connected, FastEthernet1/0
    R3#
    Therefore, is there way of creating a track for /32 ip addresses?
    I hope that makes sense.
    Cheers

  • Regexp problem with TCL Script

    Hello,
    I'm having some troubles with my regexp in a tcl script.
    My switch 3750 doesn't want to compil my script if there is [0-9] or \d in my script ...
    After a show energywise children I'm doing:
    set intd [ regexp -all -line -inline "1\/0\/." $result ]
    ($result is the show energywise cli result)
    It work with interfaces from 1/0/1to9.
    set intd [ regexp -all -line -inline "1\/0\/.." $result ]
    It work with interfaces from 1/0/10to48
    but i need to have all interfaces in the same regexp, why "1\/0\/[0-9]+" or "1\/0\/\d+" don't work ?
    Here is my ios : c3750-ipservicesk9-mz.122-53.SE1.bin
    Anybody have a clue ?
    Thanks

    Maybe need more details, my eem version is :
    Embedded Event Manager Version 3.20                                           
    Component Versions:                                                           
    eem: (v320_throttle)2.1.50                                                    
    eem-gold: (v320_throttle)1.0.4                                                
    eem-call-home: (v320_throttle)1.0.4                                           
    Event Detectors:                                                              
    Name                Version   Node        Type                                
    application         01.00     node0/0     RP                                  
    mat                 01.00     node0/0     RP                                  
    neighbor-discovery  01.00     node0/0     RP                                  
    identity            01.00     node0/0     RP                                  
    syslog              01.00     node0/0     RP                                  
    routing             03.00     node0/0     RP                                  
    cli                 01.00     node0/0     RP                                  
    counter             01.00     node0/0     RP
    interface           01.00     node0/0     RP
    ioswdsysmon         01.00     node0/0     RP
    none                01.00     node0/0     RP
    oir                 01.00     node0/0     RP
    snmp                01.00     node0/0     RP
    snmp-object         01.00     node0/0     RP
    ipsla               01.00     node0/0     RP
    snmp-notification   01.00     node0/0     RP
    timer               01.00     node0/0     RP
    rpc                 01.00     node0/0     RP
    My problem is here :
    if [catch {cli_exec $cli(fd) "show ene chi | include SEP"} result] {
        error $result $errorInfo
        puts "$result"
    foreach intf [ regexp -all -line -inline "00.{10}" $result ] {   /* this line is good, it save the mac address of an equipment*/
      set intd [ regexp -all -line -inline "1\/0\/.." $result ]
      puts "Mac-address:$intf"
      puts "test:$intd"
    So my code works but the regexp "1\/0\/.." give me the interface from 1/0/1 to 9 betwin { }.
    If i try "1\/0\/[0-9]+" or "1\/0\/\d+", it returns nothing, and I have an error at compilation.

Maybe you are looking for

  • Office 2013 OneNote on Terminal Server

    Hi, Maybe I have a strange question but is it fully supported Office 2013 OneNote on TS? We are not using standalone. I am asking because many users have problem with connection when they trying to click on that link (when you open onenote) they get

  • Is Backup bundled in the OS 10.4?

    We have several macs, including 2 imac G5s, one is a little older than the other. On the older G5 I recently installed 10.4, updated to 10.4.11 and then I went to go use Backup and it didn't get installed with Tiger. We also have iLife 08 on both, an

  • Need Help with Memory OC to 1066 on P35 Platinum Combo

    Hi, I've been trying to get my Corsair Dominator memory to 1066, but everytime I change settings, the system will not post. So far I've: - Disabled EIST & DOT - Disabled 'Configure DRAM Timing by SPD' and set values to 5-5-5-15 (left all others as is

  • How to transfer files from Mac to Mac

    How to transfer files/programs between Mac to Mac

  • Syncing iCal directly to a Samsung Galaxy Note II

    Is it possible to sync iCal directly to the calendar application on the Samsung Galaxy note?  I know that I can upload my iCal calendars to the gmail calendars and then sync to the Galaxy but I would rather have a 1 step process.  Thanks in advance f