Cisco EEM. Delay between action cli

Hi
I have Cisco  Catalyst 6500 with IOS Version 12.2(17r)SX5
I need  real-time monitornig of failed interface, to shut it administratively  down and after 5 minutes "no shutdown" it.
I think is good idea to use Cisco EEM for this task.
My algorithm is below:
1. EEM script is looking for event about  failed interface.
2. EEM script is shutting interface down.
3. EEM script is waiting 5 minutes.
4. EEM script is enabling interface.
I know how to configure EEM for steps 1, 2 and 4, but step 3 I do not.
Help solve this task, please.

That's not the version of code running on your switch. That looks like boot ROM code.  In any event, unless you have a Sup2T, you have EEM 2.x.  This solution should work for you.
event manager environment q "
event manager applet failed-interface
event ...
action 001 cli command "enable"
action 002 cli command "config t"
action 003 cli command "interface INTF"
action 004 cli command "shut"
action 005 cli command "event manager applet reenable-intf"
action 006 cli command "event timer countdown time 300"
action 007 cli command "action 1.0 cli command enable"
action 008 cli command "action 2.0 cli command $q config t$q"
action 009 cli command "action 3.0 cli command $q interface INTF$q"
action 010 cli command "action 4.0 cli command $q no shut$q"
action 011 cli command "action 4.1 cli command $q no event manager applet reenable-intf$q"
action 012 cli command "action 5.0 cli command end"
action 013 cli command "end"

Similar Messages

  • Cisco EEM trigger between two device, it posable?

    Hello I have question, can I see message form Switch to Router for activation EEM?
    I think one way use SMNP for this.
    On router side i have configuration:
    event manager applet snmp
    event snmp-notification oid 1.3.6.1.4.1.12345.1.0 oid-val "1" op eq maxrun 20000
    action 10 syslog msg "Triggered from Trap!"
    Can Cisco switch send SMNP msg to Router on with special OID? for activation Router Event?
    Maybe someone use another way for communication?

    Sure, this is possible.  You don't have to use purely customized traps, either.  You can use standard EEM traps.  From the source device, do something like:
    event manager applet ospf-change event syslog pattern "OSPF-5-ADJCHG" action 1.0 cli command "enable" action 2.0 cli command "debug ip ospf packet" action 3.0 snmp-trap intdata1 424242!snmp-server enable traps event-managersnmp-server host 10.1.1.1 traps public event-manager
    Then on the target device:
    event manager applet ospf-change event snmp-notification oid 1.3.6.1.4.1.9.10.91.1.2.3.1.9. oid-val "424242" op eq src-ip-address 10.1.1.2 action 1.0 cli command "enable" action 2.0 cli command "debug ip ospf packet"!snmp-server manager

  • NI-FBUS Configurator 4.1.0.49152 + USB-8486: High delay between consecutive write actions

    Hello,
    imagine a case where you have a (transducer) block with at least around 12 parameters all of which have both read and write access:
    PARAMETER_1
    PARAMETER_2
    PARAMETER_3
    PARAMETER_12
    PARAMETER_13
    When editing two of these parameters which do not "reside in close neighborhood" (like PARAMETER_1 and PARAMETER_12) and then writing them down via "Write Changes" in the block view I observe, that there is a high delay between the write access for the first and second parameter (up to several seconds).
    Since I am device developer I can see this during device debugging.
    Can this delay be avoided?
    Regards
    Mike
    Solved!
    Go to Solution.

    Hi Mike,
    1. Try to uncheck the "Period Update" box in the upper left conner of the Block view. It's possible that this caused a conflict with your read/write action.
    2. Which kind of device are you using that you are having this issue with? Have you try it on other devices? Just in case the extra long delay was caused by the device.

  • Download URLs action: Is it possible to add delay between each dowmloaded ?

    Hi!
    This is my first experience with Automator. Everything is working great except for one thing:
    I am automatically downloading images from a site and they all have the same name. Because of that, they get an extra -# in their name when they are downloaded. But when I look them up, they were no incremented in the order they were downloaded. I need theses images in the order they appear on the site to be able to rename them in the right order.
    So I tried renaming them using the time at which they were downloaded, but it happens so fast, this function is not really useful.
    So here is my question: Is it possible to add a delay between each image that gets downloaded in the "Download URLs" action ? A one second delay would most probably fine.
    Thank you for your help!

    Use the Wait step.  On your step palette under the synchronization folder you'll see the Wait step.  Place it down and it should be intuitive what to do.
    Let me know if you have any questions.
    jigg
    CTA, CLA
    teststandhelp.com
    ~Will work for kudos and/or BBQ~

  • Cisco EEM Documentation

    Hello,
    where can i find Documentations about the Cisco EEM?
    With commands, instructions and so on...
    For example: How can i configure my Cisco-819 4G Router to change the SIM-Card if the connection decreases (check with ping and so on).
    If i understand the Documents i've read right, it is possible to implement tasks like this with the EEM, but i can't find any usefull Docs.
    Thanks for your help!

    The following document describes the configuration for dual sim with automatic failover when the primary sim connection is lost.
    http://www.cisco.com/c/en/us/td/docs/routers/access/interfaces/software/feature/guide/EHWIC-4G-LTESW.html#wp1305076
    If you want to change the primary sim using EEM, you can use a combination of IPSLA and EEM applet to manually configure the primary sim.
    Here is a good overview of some EEM commands.
    you could potentially use "sh cell 0 sec | inc Active SIM" to determine the current active sim and then change to the opposing.
    Below is an example using a GSM dual sim device. This is unvalidated and untested so test and adjust commands as needed but it should give you a start on how to change things.
    ip sla 11
     icmp-echo 8.8.8.8
     threshold 4000
     frequency 6
    ip sla schedule 11 life forever start-time now
    event manager applet CHECKSIM
     event track 11 state down
     action 01 cli command "enable"
     action 02 cli command "sh cell 0 sec | inc Active SIM"
     action 03 set commandresult $_cli_result
     action 04   regexp "0" $commandresult
     action 05   if $_regexp_result eq 1
     action 06   syslog msg  "Changing Primary SIM to 1"
     action 07   cli command "enable"
     action 08   cli command "conf t"
     action 09   cli command "controller cellular 0"
     action 10   cli command "gsm sim primary slot 1"
     action 11   exit 0
     action 12  end
     action 13   regexp "1" $commandresult
     action 14   if $_regexp_result eq 1
     action 15   syslog msg  "Changing Primary SIM to 0"
     action 16   cli command "enable"
     action 17   cli command "conf t"
     action 18   cli command "controller cellular 0"
     action 19   cli command "gsm sim primary slot 0"
     action 20   exit 0
     action 21  end

  • Documentation of cisco::eem and cisco::lib libs

    Hello Experts,
    Would you be able to help me find the link to complete documentation of cisco:eem / cisco::libs libraries ?
    Thank you.

    Some of the available functions are documented on Cisco.com in the EEM Tcl guide (e.g., the CLI functions and the mail functions).  Some of the others I mention at https://supportforums.cisco.com/docs/DOC-12757#Tcl_Packages .  Between the two sources, I think you'll find everything you're looking for.

  • My Mac is doing strange things: delaying between users, mouse flickering and bouncing, gets stuck with rainbow wheel flickering. I ran the appel hardware test and it detected an error: 4MOT/4/40000003:HDD-1233 Does anybody know what that means? HELP!

    My imac is doing strange things:
    -delaying between users: when closing session it goes to blue, then takes a while to appear users signin box, and then wont recognize mouse command to enter until a couple of minutes later... then everything seems alright until....
    -it gets stuck between things, the rainbow wheel appears and its just delays there forever....
    -and every now and then the mouse starts flickering and bouncing wildly onscreen.
    I ran the appel hardware test and it detected an error:
    4MOT/4/40000003:HDD-1233
    Does anybody know what that means? HELP!

    WZZZ answered about where to get iStat. And do check the SMART status. If it is an overheating problem due to a fan or logic board problem, your hard drive is possibly cooking itself to death. If so it isn't a faulty hard drive even though the hard drive might fail. So assuming it's a temperature problem, even if you are able to repair things on the disk with software, that is working on symptoms, not causes. I could be wrong however.
    RE: AppleCare: Your iMac came with one year of AppleCare (Apple's warranty program), but within the first year you can buy 2 more years. You have to extend by the one year anniversary of purchase of the computer. Your 10,1 is too old to still be in the first year, and since you asked what it was, I'm sure you don't have it. Bottom line meaning is that whatever this problem turns out to be, you'll have to pay for it. Unless there is something like this. It is for 2011 iMacs with certain Seagate drives. You can put in your serial number for fun, but it looks like yours is too old. Lastly, some people have had Apple help them anyway if it is just out of warranty, but many have not. Your machine is one of these. Type in 10,1 in the search box. Is there an Apple Store near you? Just b/c it's out of warranty doesn't mean you shouldn't have it looked at by Apple. But no one here can say at all what Apple will or will not do.
    Hope you get it taken care of!

  • A Problem With Recording: Delay Between Tra

    I recently purchased an Audigy 2 ZS Platinum Pro to replace my ailing Audigy 2 Platinum from a few years back. I've been trying to do some home recording (namely with Sony's Acid Pro 5.0) and I've been noticing some delay between tracks when I record.
    For example, I will record one track, and then record a second track, playing along to exactally what I hear. When the second track mixes down, there is an offset between the two tracks on the order of two or three tenths of a second. This offset produces a noticible doubling effect, and requires me to go in and move the audio track around so that it plays properly.
    I've tried other programs (Audacity and n-Tracks Studio) so I figure it's not something wrong with the program. My computer is new, it's running an Athlon 64 3400+, with over a gig of ram, so I can't imagine it's a problem with my computer.
    Anybody have any thoughts or experience with problems like this?

    bobweb wrote:
    I recently purchased an Audigy 2 ZS Platinum Pro to replace my ailing Audigy 2 Platinum from a few years back. I've been trying to do some home recording (namely with Sony's Acid Pro 5.0) and I've been noticing some delay between tracks when I record.
    For example, I will record one track, and then record a second track, playing along to exactally what I hear. When the second track mixes down, there is an offset between the two tracks on the order of two or three tenths of a second. This offset produces a noticible doubling effect, and requires me to go in and move the audio track around so that it plays properly.
    I've tried other programs (Audacity and n-Tracks Studio) so I figure it's not something wrong with the program. My computer is new, it's running an Athlon 64 3400+, with over a gig of ram, so I can't imagine it's a problem with my computer.
    Anybody have any thoughts or experience with problems like this?
    Latency issue.
    If you can select ASIO drivers (audio settings) on your software then use it and set latency on ASIO panel to ~ 5 ms.
    .jtp

  • How can I put a time delay between specific events in a while loop?

    How can I put a time delay between specific events within the same while loop? I'm already using the "wait" command to control the overall loop iteration speed. But I want to time the individual events as well.

    Hi Jesse,
    You can use a flat sequence. In each box you can put your individual events and attached wait.
    Don't forget to reduce your total loop time of the time you added in the individual sequences.
    Doc-Doc
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • The First execution of a Stored Proc shows a delay between SP:StmtStarting and SP:Starting

    We experience a performanceproblem with some of our Stored Procedures. SQL Server is "Microsoft SQL Server 2012 (SP1) - 11.0.3128.0 (X64)"
    Situation:
    SQL Server Proc1 executes some SQL Statement and starts some other SQL Stored Procedures. I open a SQL Management Studio Session "example session_id 105", trace the session 105 with the SQL Server Profiler.
    I start Proc 1, when Proc1 starts the execution of Proc 2, the Profiler Trace shows a delay of 6 seconds between SP:StmtStarting "execute db..proc2 @SomeVar" and SP:Starting "execute db..proc2 @SomeVar".
    All following executions of Proc1 in the Session 105 runs without a delay between SP:StmtStarting "execute db..proc2 @SomeVar" and SP:Starting "execute db..proc2 @SomeVar".
    But when i open a new SQL Server Management Session "session_id 124", the first execution of Proc1 when it executes Proc 1, there is again the delay of 6 seconds between SP:StmtStarting "execute db..proc2 @SomeVar" and SP:Starting "execute
    db..proc2 @SomeVar".
    Proc 1 starts the execution of Proc2 with a simple execute statement like this:
    Execute DB..Proc2 @SomeVar
    So its not dynamic SQL.
    What is SQL Server doing? I understand that SQL Server has to do some work when it executes the first time a Stored Procedure. But why is the SQL Server doing it in every new Session?
    How can i prevent this behavior or how to make it faster?
    Best Regards
    Paolo

    >In my case the temp tables ruined the performance.
    Creating temp tables takes time & resources. Temporary table usage should be justified and tested in stored procedures. There are cases when temporary table usage is helpful especially with very complex queries.
    In your case it appears that not one but several temp tables were applied. That can be punishing.
    Paul White's blog: "Ask anyone what the primary advantage of temporary tables over
    table variables is, and the chances are they will say that temporary tables support statistics and table variables do not.  This is true, of course; even the indexes that enforce PRIMARY KEY and UNIQUE constraints on table variables do not have
    populated statistics associated with them, and it is not possible to manually create statistics or non-constraint indexes on table variables.  Intuitively, then, any query that has alternative execution plans to choose from ought to benefit from using
    a temporary table rather than a table variable.  This is also true, up to a point.
    The most common use of temporary tables is in stored procedures, where they can be very useful as a way of simplifying a large query into smaller parts, giving the optimizer a better chance of finding good execution plans, providing statistical
    information about an intermediate result set, and probably making future maintenance of the procedure easier as well.  In case it is not obvious, breaking a complex query into smaller steps using temporary tables makes life easier for the optimizer in
    several ways.  Smaller queries tend to have a smaller number of possible execution plans, reducing the chances that the optimizer will miss a good one.  Complex queries are also less likely to have good cardinality (row count) estimates and statistical
    information, since small errors tend to grow quickly as more and more operators appear in the plan.
    This is a very important point that is not widely appreciated.  The SQL Server query optimizer is only as good as the information it has to work with.  If cardinality or statistical information is badly wrong
    at any point in the plan, the result will most likely be a poor execution plan selection from that point forward.  It is not just a matter of creating and maintaining appropriate statistics on the base tables, either.  The optimizer does
    use these as a starting point, but it also derives new statistics at every plan operator, and things can quickly conspire to make these (invisible) derived statistics hopelessly wrong.  The only real sign that something is wrong (aside from poor performance,
    naturally) is that actual row counts vary widely from the optimizer’s estimate.  Sadly, SQL Server does not make it easy today to routinely collect and analyse differences between cardinality estimates and runtime row counts, though some small (but welcome)
    steps forward have been made in SQL Server 2012 with new row count information in the
    sys.dm_exec_query_stats view.
    The benefits of using simplifying temporary tables where necessary are potentially better execution plans, now and in the future as data distribution changes and new execution plans are compiled.  On the cost side of the ledger we have
    the extra effort needed to populate the temporary table, and maintain the statistics.  In addition, we expect a higher number of recompilations for optimality reasons due to changes in statistics.  In short, we have a trade-off between potential
    execution plan quality and maintenance/recompilation cost.
    LINK:
    http://sqlblog.com/blogs/paul_white/archive/2012/08/15/temporary-tables-in-stored-procedures.aspx
    Kalman Toth Database & OLAP Architect
    IPAD SELECT Query Video Tutorial 3.5 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • How to put a delay between Sender Adapter processing ?

    Hi,
    I'm using FTP type and I schedule the sender each 1hour. In that time, plenty of file has been added into the source folder.
    The files are like this <file_name_###>.txt where the ### are a incremental number. PI can takes all of them in order thanks to this patern : <file_nme>*.txt, but when processing it takes all the file in one time.
    I would like to put a delay between each file. Is it possible ?
    Kind regards
    Joseph BERTHE

    Hi Joseph,
    I need it because the receiver is a RFC adapter so I call a BAPI. But I want a unique call. So When the first file is eaten by PI it executes the BAPI, but during that time no one can execute that same BAPI. So I want to put a delay between each file.
    > Delay between Sender Adpter Processing will not be possible .
           But you can make the Interface work in EOIO fashion . by that your inputs will be processed one after the other .
          Make the parameter "Quality of Service"- Exactly Once in order at your sender adapter level for this.
    EOIO (Exactly Once In Order): Here Messages are delivered with the same queue name as in the same sequence that they were sent from the sender system. Message processing will be asynchronous in this case.
    Regards ,

  • Output to input mapping between actions in Guided Procdure

    Hi,
    i had requirement to create process i.e. user request for group access to manager this one developed in Web dynpro.
    I can able create initial screen in process i.e. display available groups in portal using table in this user can select required groups and click submit then request pass to manager for approval but i'm unable pass whatever groups selected by user to manager view means i didn't no how to map parameters user request view to manager approval view  and  also tell me once pass parameters to input of manager view how to read the list of input (here selected groups by user).
    Please give me if u have any example url to explaining about mapping between list of output to list of input between actions of wd gp process.
    reagrds,
    Nari.

    It is better to avoid more customization from maintainability point of view, if possible . Meaning I would try to make standard map as much as possible(less customization, no custom functoids, less customized xslt etc). Since your source xml format and
    destination root is known, I can see your destination format is also known. Hence, you can copy the same schema format from source into destination with the root which you are referring as one element rather than just creating one element, To avoid all drawing
    all lines manually, you can use "mass copy" functoid
    to recursively copy all data in an input instance message, to arbitrary depth, that corresponds to a specified node in the source schema to the position in an output instance message that is specified by the output link. also refer
    anytype with masscopy.
    If you are just searching for a solution to pass raw xml, then I would go with your second approach already. You can also pass the output to external assembly to allow more flexibility in terms of coding if needed.
    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.

  • How to set delay between dequeue operation of an AQ adapter

    Hi,
    We have one urgent requirement in 11g.
    We have some messages in DB for AQ queue and from composite, we want some delay between dequeuing of messages so as to avoid dequeing all the messages at one go. JCA Adapter wizard does not provide us any option for this.
    We have logged an SR for this.
    https://support.oracle.com/CSP/ui/flash.html#tab=Dashboard(page=Dashboard&id=gkpd5fj7()),(page=SRView&id=gkpd5mgo(&sr_row_id=3-1E8YP8B&sr_stmt=How%20to%20have%20some%20delay%20between%20the%20messages%20coming%20from%20ECX_OUTBOUND%20Queue%20by...&sr_number=3-3038364731))
    SR has suggested us to use minimumDelayBetweenMessages property in composite.xml or to attach this property to adapter through em.
    We tried to attach this property to adapter through em console
    First We went to em console. Clicked on our composite from farm pane. Then clicked on Adapter under Services and Reference section of the composite page. Click on that Adapter and drill down to the properties tab.
    Click on the watch icon to see all the listed properties. It does NOT contain any property minimumDelayBetweenMessages.
    Even if we try to manually edit the text box and set some values, it gives error while updating value and changes are lost.
    So this does not help.
    Please suggest if there is some way to have a delay in dequeue opertion of AQ adapter. Any property in jca or composite.xml ?
    This is very basic functionality and I assume some solution should be there.
    Please suggest.
    Thanks & Regards,
    Parshant

    Hi,
    You can modify composite.xml to include this property.
    Sample composite.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Generated by Oracle SOA Modeler version 1.0 at [12/29/10 4:34 PM]. -->
    <composite name="NIOSocketRequestRepply"
    revision="1.0"
    label="2010-12-29_16-34-44_099"
    mode="active"
    state="on"
    xmlns="http://xmlns.oracle.com/sca/1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:orawsp="http://schemas.oracle.com/ws/2006/01/policy"
    xmlns:ui="http://xmlns.oracle.com/soa/designer/">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/socket/SoaApplication/NIOSocketRequestRepply/inboundRequestReplyService"
    location="inboundRequestReplyService.wsdl" importType="wsdl"/>
    <service name="inboundRequestReplyService"
    ui:wsdlLocation="inboundRequestReplyService.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/pcbpel/adapter/socket/SoaApplication/NIOSocketRequestRepply/inboundRequestReplyService#wsdl.interface(InboundRequestReply_ptt)"/>
    <binding.jca config="inboundRequestReplyService_tcp.jca"/>
    *<property name="minimumDelayBetweenMessages">10000</property>*
    </service>
    <component name="NIOSocketRequestReplyBPELProcess" version="1.1">
    <implementation.bpel src="NIOSocketRequestReplyBPELProcess.bpel"/>
    </component>
    <wire>
    <source.uri>inboundRequestReplyService</source.uri>
    <target.uri>NIOSocketRequestReplyBPELProcess/inboundRequestReplyService</target.uri>
    </wire>
    </composite>
    Let me know, if this works for you.
    thanks,
    Deepak

  • Burning problem: even after no delay between tracks, still get a noise

    I want to burn a CD with no delay between tracks. I have selected 0 seconds in the Burning preferences as the delay. It works except that there is a short "blip" stutter sound at the start of every track...how can I get rid of this?
    Like if the speech track is in the middle of the word, the sentence will sound like "Four score and Sev[blip]ven years ago..."

    You may be visiting a web site that has been infected or is hosting malware.<br />
    You should never respond unrequested pop-ups that try to persuade you to download and install software.<br />
    Doing that is the way to get malware because no decent company would use such methods to inform you about that.<br />
    You only saw an animation and not a real scan.<br />

  • Need to know how to add a delay between code

    I need to add delays between the following lines of code. Any ideas?
    speed=speed*.98;
    //Delay here
    speed=speed*.50;
    //Delay here
    speed=speed*.1;

    You can't add delays in the way you show, but you can build those delayed lines into functions and have the calling of the functions delayed.  Look into the setTimeout() function as one possibility.  setInterval() is another, though it can require more maintenance.

Maybe you are looking for

  • Error starting listener on single node in RAC..Error listening on: (DESCRIP

    LSNRCTL> start LISTENER_CORPNG04 Starting /ora00/app/oracle/product/11/db1/bin/tnslsnr: please wait... TNSLSNR for HPUX: Version 11.1.0.7.0 - Production System parameter file is /ora00/app/oracle/product/11/db1/network/admin/listener.ora Error listen

  • Photomerge and other tools problems

    Photomerge (panorama) and Open as layers in Photoshop, will not work from either Bridge CC or Lightroom LR5 and Photoshop CC on my iMac (2013), but work perfectly on my Macbook Pro 13" (2009). Both OS's and Applications are virtually identical and bo

  • My computer cannot run itunes 10 how do I use the itunes store

    I have itunes already but my computer is on the old side. I cannot access the itunes store to get new podcasts because it prompts me to download itunes 10 which I cannot run! What should I do?

  • Vector app with boolean operators

    not expecting much, I need some form of vector based (lines, plines, oval, squares etc...) that also has the ability to do basic boolean operations on those shapes, (addition/merging, subtraction, etc...). I would be sending these back to the main co

  • Trying to locate all PageMaker files on my Mac

    I'm trying to locate all PageMaker files on my Mac. It's difficult because they bare no common extension, for that matter, no extension at all. Can use AppleScript to collect a list of file names for any file with any of the following Creator codes.