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.

Similar Messages

  • 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

  • I need an EEM for TCL script

    Hello All,
    This is my first time here and hope this is right place to post this:
    I have a TCL script written by a very help person that sends a tone over my PA System from my CME.  I would like to have an EEM script to automatically run the script at certain times a day.  Please be advised this is my introduction to both TCL and EEM.  Any help is appreciated.
    application
    service paging flash:paging_89.tcl
      param prompt-1 flash:500hz.au

    I don't think you can schedule this script to run using EEM.  It's an IVR script, and I think it has to be configured the way you have it.  I'm not an IVR expert, though.  You might want to ask on one of the voice communities here if this script can be run manually.  If it can, then you can use EEM to schedule it.

  • 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

  • Creating a job that runs a Tcl script

    Hi,
    We currently have a scheduled job running a Tcl script on a 8.1.7 DB. My question is, can I still use the same setup in 10g DB (i.e. creating a job that runs Tcl script)? If I can, how am I gonna do it?
    Thanks,
    howie

    It depends on how you scheduled the job in 8.1.7 DB.
    By Cronjob? Yes you can do the same to connect to 10g
    By DBMS_JOB?. Yes you can do it in 10g and in addition, can improve it with DBMS_SCHEDULER
    Via OEM? Yes in can use Enterprise Manager to create a Job that runs the Script.

  • 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 --------------------

  • Reading the Facility Callername from a tcl script

    I am looking for a way to read the Callingname in the facility message so that I can pass into
    set callInfo(displayInfo)
    Basically I'm trying to pass Callername to an ip phone through a TCL script on the gateway during callsetup. This normally gets dropped.
    Is there a way to parse these fields in the Facility message?
    Thanks ahead of time for any help.
    Oct 14 21:59:58.274: ISDN Se0/0/0:23 Q931: RX <- FACILITY pd = 8 callref = 0x03BB
    Facility i = 0x9F8B0100A117020101020100800F5452494F4E20574F524C44204E4554
    Protocol Profile = Networking Extensions
    0xA117020101020100800F5452494F4E20574F524C44204E4554
    Component = Invoke component
    Invoke Id = 1
    Operation = CallingName
    Name Presentation Allowed Extended
    Name = MY CALLINGNAME

    Well.. I'm having to alter an existing script that parsers the calls for fax service before they are being sent to callmanager.
    So far I think im in the right direction but I don't know how to use the "object get gtd" properly, if that's even the right approach. Im trying to parse
    GEN,y,y,0,JOE BLOW
    from the gtd debug below...
    Oct 15 16:32:26.543: CNG tone sent
    Oct 15 2009 11:32:26 CDT: %ISDN-6-CONNECT: Interface Serial0/0/0:0 is now connected to XXXXXXXXXX N/A
    Oct 15 16:32:27.231: ISDN Se0/0/0:23: Built a GTD of size 110 octets for ISDN message type 0x62
    Oct 15 16:32:27.231: tsp_ccrawmsg_encap: calling cdapi_find_tsm
    Oct 15 16:32:27.231: cdapi_find_tsm: Found Tunnelled Signaling Msg with GTD: PROT_PTYPE_GTD
    Oct 15 16:32:27.231: cdapi_find_tsm: Found a gtd msg of length 110:
    Oct 15 16:32:27.231: gtd msg = "FAC,
    PRN,isdn*,,NI***,
    GEN,y,y,0,JOE BLOW ----------------Caller NAME
    UFC,GEN,5,fachd,9f8b0100
    UFC,GEN,5,inpdu,020101020100"
    This is what I have so far...
    set DestNum [infotag get evt_dcdigits]
    set callInfo(destinationNum) $DestNum
    infotag set evt_facility_report gtd
    infotag get evt_gtd CallerID
    set CallerName [object get gtd CallerID FAC,4,GEN]
    set DestNum [infotag get evt_dcdigits]
    put "$CallerName"
    put "$DestNum"
    set callInfo(displayInfo) $CallerName
    set callInfo(destinationNum) $DestNum
    leg setup $DestNum callInfo leg_incoming

  • CallManager Express TCL Script issue

    Hi, I'm having issues trying to get an AA script working on a CME 4.0 system. What I want to do is quite simple, i just want to play a message to callers and that's it.
    When I dial the pilot, the call just drops and I get the following error when debugging "voip application script"
    Jul 25 17:16:22.470: //381//TCL :/tcl_PutsObjCmd: TCL AA: +++ B-ACD-SERVICE not registered, Starting B-ACD-SERVICE +++
    Jul 25 17:16:22.470: //381//AFW_:/AFW_FSM_Drive: Tcl_Eval to drive FSM inside Tcl modulespace. code=1 code=ERROR
    Jul 25 17:16:22.470: TCL script failure
    Result:
    Handoff Failed
    Jul 25 17:16:22.470: TCL script failure errorInfo:
    Handoff Failed
    while executing
    "handoff appl leg_incoming $serviceName -s $hString"
    (procedure "act_Setup" line 30)
    invoked from within
    "act_Setup"
    (procedure "act_Handoff_Activity" line 7)
    invoked from within
    "act_Handoff_Activity"
    Below is my config
    application
    service aa flash:app-b-acd-aa-2.1.0.0.tcl
    paramspace english index 1
    param number-of-hunt-grps 1
    param handoff-string aa
    paramspace english language en
    param max-time-vm-retry 3
    param aa-pilot 1050
    paramspace english location flash:
    param second-greeting-time 60
    param welcome-prompt _bacd_welcome.au
    param queue-manager-debugs 1
    param call-retry-timer 15
    param max-time-call-retry 200
    param voice-mail 8000
    param service-name aa
    dial-peer voice 1050 voip
    service aa
    destination-pattern 1050
    session target ipv4:172.27.27.10
    incoming called-number .
    dtmf-relay h245-alphanumeric
    codec g711ulaw
    no vad
    telephony-service
    load 7914 S00104000100
    load ATA ATA030100SCCP040211A
    load 7920 cmterm_7920.4.0-02-00
    load 7971 TERM70.6-0-3SR1S
    load 7970 TERM70.6-0-3SR1S
    load 7912 CP7912080001SCCP051117A
    max-ephones 240
    max-dn 480
    ip source-address 172.27.27.10 port 2000
    timeouts interdigit 5
    system message Galaxia - VSAT Activated
    sdspfarm units 1
    sdspfarm transcode sessions 2
    sdspfarm tag 1 mtp0018185bf860
    cnf-file perphone
    network-locale IT
    time-zone 23
    time-format 24
    date-format dd-mm-yy
    max-conferences 8 gain -6
    call-park system redirect
    call-forward pattern .T
    moh music-on-hold.au
    multicast moh 239.x.1.30 port 2123
    web admin system name admin password btin3t
    dn-webedit
    time-webedit
    transfer-system full-consult
    secondary-dialtone 9
    create cnf-files version-stamp 7960 Jul 25 2006 14:09:58
    We do not have CUE.
    Any help would be appreciated.
    Thanks
    Glyn

    In reference to this part of your config:
    If you are using a hunt group, you need the following param:
    param aa-hunt1
    I would also try using a loopback addres in your voip dial peer, rather than the H.323 physical IP addres of your router.
    here is the link with an example config:
    http://www.cisco.com/en/US/partner/products/sw/voicesw/ps4625/products_configuration_guide_chapter09186a00805f2305.html#wp1012136

  • 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

  • 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

  • TCL script help needed on Nexus7000 !

    Does anyone know how to create a TCL script on Nexus7000 switch for following scenario ? Need urgent help here.. :-
    Here is what I am trying to do :-
    1. Whenever following log on "show log log" prints out :-
    testnexus7000 %PIXM-2-PIXM_SYSLOG_MESSAGE_TYPE_CRIT:
    2. Print out the output of show system internal pixm errors
    And look for following line :-
    [102] pixm_send_msg_mcast(1208): MTS Send to LC X failed >> where X is 0 based
    and this error can occur multiple times for different LCs too.
    4. Reload line card (s) X and syslog " task done"
    Regards
    Vijaya

    Hi,
    Vijaya I found same post on support cisco forums So people helped someone in same question !!!!!!
    Please read it ....
    https://supportforums.cisco.com/thread/2128886
    Yes plus if u can help me in ......Cisco ASA same security problem than that will be good for me .....I will contact u and will be great help for me if u help
    Hope that link help u .....
    Bye,

  • Implementing CFNA from a TCL script

    Hello, I'm trying to create a parallel hunt group (with CFNA) in a TCL script.
    I can deliver the call to multiple DNs and if a handset is picked up the call is delivered correctly.
    However, if the call is not answered I want to then send the call to a voicemail DN.
    I have used set callInfo(alertTime) command to get the call back after the timeout and I get an event from ev_setup_done. However, I can't seem to perform another leg setup command to send the call to a VM DN.
    Is there something I need to do to cancel the previous leg setup ? Do I need to recover the original leg_imcoming? I'm fairly new at TCL so I would appreciate any help here.

    It does not seem to work. Is this supported in 4.1.1 version of XR software? Here is what I configured and error I got:
    sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.2.0 string "send_custom_trap.tcl"
    sys_reqinfo_snmp_trapvar var vbinds oid 1.3.6.1.4.1.33333.3.0 string "This is a custom trap"
    sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: No trap variable "vbinds"
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan:     while executing
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: "sys_reqinfo_snmp_trap enterprise_oid 1.3.6.1.4.1.33333.1 generic_trapnum 6 specific_trapnum 1 trap_oid 1.3.6.1.4.1.33333.1.0.1 trap_var vbinds
    RP/0/RSP0/CPU0:Mar  5 14:54:08.103 : syslog_dev[93]: noscan: "
    RP/0/RSP0/CPU0:Mar  5 14:54:08.104 : syslog_dev[93]: noscan:     (file "/dev/rdsfs/etc/eem_rdsfs/eem_counter_lookup_v1_0.tcl" line 100)

  • 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

  • Cisco OnRamp.tcl script - maximum fax size(s)

    Hi all!
    For the last several years I've been deploying Cisco's CME solution, and occasionally I've included the OnRamp .tcl script for receiving faxes, converting to .tif files, and forwarding to an email address.
    Lately I've had a customer query regarding max size of faxes that can be supported.  To wit, they are trying to send a 48 page fax, and in their email inbox they only get the first page.  They've tested fax to fax and all works well.
    Does anyone know of any sizing limitations, or tweaks I can make to either dial-peers, or hardware, or perhaps the script itself to support any size fax?
    Thanks in advance for any help or information.
    Kevin

    I tried to configure T37 onramp/offramp fax in my network but after several attempts I failed to apply it completely and just portion of that worked well. despite describing the scenario in many forums (like here), I got nothing!
    anyway, I'm going to test it in a simple form. I mean, I want to connect my edge router to PSTN line via an FXO port and via ethernet to internal network. my internal network has many physical fax machines that have gotten their internal tel numbers (like 866, 867, ...) from PBX . so can I use this scenario to configure the router to support these fax machine, or I should connect fax machines directly to router through FXS ports? tnx. 

  • Need to execute tcl script from a Java Program

    Hello,
    I need to execute a tcl script from a Java Program. But I do not know how to call the tcl Interpreter. Can anybody help me?

    Iam using the exec command as follows:
    Process proc =
    rt.exec("C:/SpirentConnect/engines/tcl/8.3.4/windows/s
    ctcl.exe C:/Hello.tcl");
    But Hello.tcl is not executed.And does that exact string work on the command line?
    And what is the return code from running it?

Maybe you are looking for