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

Similar Messages

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

  • How can I set the default home page in Firefox 4 for all users that login to a PC on a Win 7 PC?

    I work at a community college in upstate NY.
    We use Firefox as the default browser at our institution and we have always set the default homepage to be our homepage for all users that login to the PC. We had a procedure to to that that worked with Windows XP and FF 3 or earlier
    We would do the following:
    1. go to: c:\Documents and Settings\Administrator\Application Data\Mozilla\FireFox\Profiles\<profile_name>\prefs.js
    2. Add the line: user_pref (“browser.startup.homepage”,”http://www.genesee.edu”);
    3. Copy the Folder
    C:\Documents & Settings\Administrator\Application Data\Mozilla
    To
    C:\Documents & Settings\Default User\Application Data\Mozilla
    4. Restart the computer
    We're going to Win 7 and Firefox 4 and things seem to be different in terms of files and file structure. Does anyone know how to accomplish this?
    Thanks in advance.

    Making customisation from the default profile is generally considered poor practice and quite often doesn't work out as planned. (If you're interested in some more information on this, [http://mockbox.net/windows-7/227-customise-windows-7-default-profile.html see here] see here)
    This article should help you with developing and deploying your customised Firefox 4 installation (without touching the Windows 7 default user profile):
    http://mockbox.net/configmgr-sccm/174-install-and-configure-firefox-silently.html

  • On a mac computer, how do i set the default brower to open up links in emails to Safari, and not Mozilla

    On a mac computer, how do i set the default brower to open up links in emails to Safari, and not Mozilla
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.5; .NET CLR 1.1.4322)

    Thanks for the suggestion.
    A few weeks ago I downloaded some free software from the "tucows.com" website, it appears to have permanently hijacked my web browsers (both firefox and IE) so all searches go to their "searchqu" site, and new tabs open at that site. I was unable to repair this with the addins you suggested or by editing my user preferences files, and ended up having to reinstall firefox. Hopefully I won't run into the tucows rootkit ;)
    But thanks anyway.
    -DPT

  • I have an older Macbook with OS/X. Tried to download iTunes 10 a few times now, but when installing I always get the same error message: Run Preinstall Script for Apple Mobile Device Support. What can I do to finalise the installation?

    I have an older Macbook with OS/X. Tried to download iTunes 10 a few times now, but when installing I always get the same error message: Run Preinstall Script for Apple Mobile Device Support. What can I do to finalise the installation?

    Thanks. Short of the sort of "generic" suggestions of restaring your system, if you haven't, and repairing disk permissions and verifying the disk, I don't have any advice right now. I'll do some research and see if I can come across anything. Meanwhile, someone else may have an idea.
    Regards.

  • How do I re-set the old IPad to make it ready for a brand new user? Is it simply the Restore command in ITunes?

    Purchased an IPad 2 and will be giving my first generation IPad to my wife. What is the easiest way to re-set the old IPad to make it ready for a new user?
    Is it simply the Restore command in ITunes?

    Do a full sync/ back up of the old one first.  Then you can sync the new one to the old backup.  When you are all ready, on the i pad, goto system . General . Reset.  and select erase all content.  Turns the old one into out of the box condition.

  • Caznnot upgrade my iTunes to version 10.4.1---get message---The following install step failed: runupgrade script for Apple mobile device support.--Contact softwae=re manufacturer for assistance

    Cannot upgrade my iTunes to version 10.4.1---get message---The following install step failed: runupgrade script for Apple mobile device support.--Contact softwae=re manufacturer for assistance.
    Can someone help me?
    Thank you.
    Gerald

    me too did you get any help?

  • Cannot upgrade my iTunes to version 10.4.1---get message---The following install step failed: runupgrade script for Apple mobile device support.--Contact softwae=re manufacturer for assistance.   Can someone help me? Thank you.   Gerald

    Cannot upgrade my iTunes to version 10.4.1---get message---The following install step failed: runupgrade script for Apple mobile device support.--Contact softwae=re manufacturer for assistance.
    Can someone help me?
    Thank you.
    Gerald

    me too did you get any help?

  • 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

  • How to set the source property of image control dynamically?

    Hi,
      I have different fxg files which I want to display in a list. For each row in the List, I define which fxg file to be displayed in my database.
    I need to know how to set the image1.source = (the fxg path) as a string from database?
    Is there any conversion needed in this case? If so, can you please help me how to do this?

    Hi,
      Thank you for your response. I am new to Adobe Flash Builder, Flex and action script. I don't get your answer straight away.
    What I basically need is, I need to set image1.source = strFXG. Right now, this does not show the image. I don't understand fxgObject.pathid.source => how to give this?
    Moreover, when I did google search, there is somethink like fxg converter which converts the fxg to a component. I thought this is a very simple problem on how to convert the fxg string to an object format. But now, it looks like it might be a big problem. Can anyone help me in this?
    import spark.components.Image;
                                  protected function view1_creationCompleteHandler(event:FlexEvent):void
      // TODO Auto-generated method stub
      var strFXG:String = 'assets.DB_Actief_Graphics';
                                            var image1:Image = new Image();
                                            image1.x = 100;
                                            image1.y = 100;
                                            image1.source = strFXG;
                                            addElement(image1);
    Regards,
    Chella

  • Problem setting the PoolList attribute in a WLST script

    Hello !
    I ran the configToScript command over config.xml which has a JDBCMultipool composed of two JDBCpools. It threw the next script to create the JDBC Multipool:
    print 'configuring resource: JDBCMultiPool/MyJDBC MultiPool '
    try:
    myResource = create("MyJDBC MultiPool","JDBCMultiPool")
    except Exception:
    # print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
    myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
    myResource.setPoolList("poolCatalogos01,poolCatalogos02")
    #cmo.addTarget(clusterTarget2)
    # If this fails you will have to add this target manually from the console
    from java.lang import Exception
    from java.lang import Throwable
    try:
    myResource.addTarget(clusterTarget2)
    except Throwable, th:
    print 'Problem in adding target '+clusterTarget2+ ' due to '+th.toString()
    However when the script is executed it fails at the line:
    myResource.setPoolList("poolCatalogos01,poolCatalogos02")
    and shows this error message:
    TypeError: setPoolList(): 1st arg can't be coerced to weblogic.management.configuration.JDBCConnectionPoolMBean[]
    I have tried some other ways to set this attribute, however I hadn't had any success. If some one can provide some advice, I will be grateful.
    By the way:
    I am using a WLST version downloaded last April, of 2004.
    Thanks !

    There is a bug in configToScript that is not generating the right script for setting the Pool list. This will be fixed in the next version of wlst. Here's a workaround.
    try:
    myResource = create("MyJDBC MultiPool","JDBCMultiPool")
    except Exception:
    # print 'This resource JDBCMultiPool with name MyJDBC MultiPool failed to be created. The script will try to get it anyways.'
    myResource = (getTarget("JDBCMultiPool/MyJDBC MultiPool"))
    p1 = getTarget("JDBCConnectionPool/poolCatalogos02")
    p2 = getTarget("JDBCConnectionPool/poolCatalogos02_BEA")
    plist = jarray.array([p1,p2], weblogic.management.configuration.JDBCConnectionPoolMBean)
    myResource.setPoolList(plist)
    let me know if u see any other problems, thanks,
    -satya

  • URL Variables used to set the source property for the VIDEO COMP.

    Can you take a url variable and have that variable be the value for the source parameter of the video playback component in flash CS4 or CS5?
    Example:
    the url with url variable:   http://www.mydomain.com/videos/videoplayer.cfm?vplayer=videofile1
    the actionscript 3.0
    var videoFile:String = [who do I get the url variable's value here?]
    myVideoPlayer.source = videoFile +".mp4"
    in the end the file that should be playing in the video player is:   videofile1.mp4
    Thanks.

    Either
    A) Using ExternalInterface, call a Javascript function that returns window.location.search
    B) Use Javascript to create FlashVars from window.location.search

  • How to set the source pin of the counter

    I am programming using PCI-6251 DAQ card with the board BNC2110 and Labview 7.1.
    I just want to write a program to count the frequencies of two signals from outside. In Measurement and Automation, I could use the edge counting by selecting the edge source as Dev1/PFI0 etc. But in vi window, how to modify the source pin of ctr0 to say PFI0 or PFI1 or other else?
    And also is the strategy of my program correct or not? Because later I want to use one internal counter to count for my external signal frequencies.
    Solved!
    Go to Solution.
    Attachments:
    Frequency Counter vi.JPG ‏21 KB

    Hey Nangroy,
    Here's that file in LV 7.1 with DAQmx 8.8.  If you have an older version of the driver some of your subVIs may need to be changed.
    David Pratt
    AES - Test Side Products
    NIC
    Attachments:
    correlatetimecounter.vi ‏162 KB

  • 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

Maybe you are looking for