Sending 'show' command outputs to console/terminal using EEM

Hi Everyone,
I'm new to EEM and was wondering if it would be possible to send 'show' commands  (like 'show interface' or 'show crypto ipsec sa') to the terminal/console session after every, let's say, 10 minutes using watchdog timer. I know how to send it to the flash but would like to know if something of this sort is possible.
Any suggestions would be really appreciated!
Regards,
Nikhil

Hi Nithakur,
you can try the "action puts" from EEM
event manager applet SHOWI
 event timer watchdog time 600
 action 1.0 cli command "enable"
 action 2.0 cli command "show int X/Y"
 action 3.0 puts "$_cli_result"
for this to work, you would need to have "logging monitor informational" in your run and "terminal monitor" activated. The other option is to use IOS send command
event manager applet SHOWI2
 event timer watchdog time 600
 action 1.0 cli command "enable"
 action 2.0 cli command "show int XY"
 action 3.0 set A "$_cli_result"
 action 4.0 cli command "send *" pattern "C:"
 action 5.0 cli command "$A\032" pattern "confirm"
 action 6.0 cli command "yes"
Note that the \032 is an equivalent for CTRL+Z (^Z) so after you configure it, you will see this line as
 action 5.0 cli command "$A^Z" pattern "confirm"
in your ruiining config.
Regards,
Alex

Similar Messages

  • EEM variable for show command output and create a filename

    I'm configuring EEM applet, example CPU High event. When it triggers the event, action is "show tech | redirect tftp://x.x.x.x/showtechoutput". The EEM event is working fine and triggered the show tech output into the tftp server. My question is, i'd like to add maybe date/time in the filename so it will not overwrite the file everytime there is a triggered event.
    The EEM event variable i'm seeing in doc is "_event_pub_sec" but it won't work when i add after or before the filename. any idea?
    thanks in advance ...

    Adding $_event_pub_sec to the end of the filename should work:
    action 1.0 "show tech | redirect tftp://x.x.x.x/showtech.$_event_pub_sec"
    That said, TFTP is very particular about how files can be created.  Typically, a TFTP server will require the file to exist before a remote host can copy to it.  If the filename changes each second, this will not work.  Using a protocol like FTP or SCP may work better.

  • How to create linux console/terminal using Java

    Please help, give some ideas or something...I would like to develop my own linux console/terminal to make connection to linux server.
    Please help me.
    Thanks

    That doesn't make any sense.
    Are you just trying to write output to the terminal, as you mentioned in this thread?
    http://forum.java.sun.com/thread.jspa?threadID=5287785

  • How can I send a command in a selstor terminal

    'am sending one program. In this there is 175 and 125. Two U8 numbers you can see. You can see a less than or equal and greater than or equal condition. 
    So I want to send 125 as soon as lesser than equal comes. But if a condition comes that value is greater than or equal at a time  I clicked the reverse button. The translation should send 175 and makes the value equal to initial value and afterwards it should satisfy the lesser than or equal condition. Means when I click the reverse button, there may be two conditions the observed value is reater than the initial value . I such a condition, the translation should obey the command 175 and makes it to equal to initial value, afterwards it should obey the 125 condition. Please kindly help me.
    Attachments:
    the program for translation stage control.vi ‏102 KB

    First place you should go is the manufacturer of the cards and see what they have to say. Do they have a DLL or ActiveX component that you can use to communicate with, is it documented, will they provide the documentation, etc.?

  • Understanding 7-Mode 'license show' command output

    What does the "-"/hyphen/dash mean in the Expiration field? How does one determine the current expiration of installed licenses based on this output? Package           Type    Description           Expiration
    NFS               license NFS License           -
    CIFS              license CIFS License          -
    FCP               license FCP License           -
    SnapRestore       license SnapRestore License   -
    SnapMirror        license SnapMirror License    -
    FlexClone         license FlexClone License     -
    SnapVault         license SnapVault License     - These services are currently active and in use yet, the Expiration field doesn't appear to reflect that we are licensed for them. I would expect it to at least say something other than the current output. This is confusing when trying to troubleshoot a potential licensing issue. Thank you in advance. I greatly appreciate it!

     Flippin Mango - Those are licenses with no expiration date, hence the blank field.See also the license command man page https://library.netapp.com/ecmdocs/ECMP1511537/html/man1/na_license.1.htmlThe only time I've seen expiration dates listed is when I've given a customer a temporary demo license for a feature.We also use temp license keys for lab excercises in the NetApp classes we teach. Noticed your login name.Had to share that my home in the US is in Flippin, Arkansas. : )
    I hope this response has been helpful to you.
    At your service,
    Eugene E. Kashpureff, Sr.
    Independent NetApp Consultant http://www.linkedin.com/in/eugenekashpureff
    Senior NetApp Instructor, IT Learning Solutions http://sg.itls.asia/netapp
    (P.S. I appreciate 'kudos' on any helpful posts.) 

  • Show policy-map interface | Question about QOS show command output

    I hope this is the correct place for this question. If not, please let me know.
    When I issue the show policy-map interface command (in this case on a  3845) there is some output I don't understand.  I have included some output below and formatted the lines I am confused about as "computer code" which show up as red on my screen.  A list of the individual lines i'm confused about is below, followed by those liens in the context of the show policy-map command's output.
    Any help with this will be greatly appreciated. Thanks in advance.
    5 minute offered rate 46000 bps, drop rate 0 bps
     5 minute rate 10000 bps
     bandwidth remaining 50% (768 kbps)
    show policy-map interface
    --- previous output omitted ---
    GigabitEthernet0/0
      Service-policy input: QoS_IN
    class-map: Silver (match-any)
          164691299 packets, 23570752398 bytes
          5 minute offered rate 46000 bps, drop rate 0 bps
          Match: access-group name MAINFRAME
            4371992 packets, 2311242335 bytes
            5 minute rate 0 bps
          Match: access-group name KRONOS
            13334297 packets, 3051409140 bytes
            5 minute rate 5000 bps
          Match: access-group name EMAIL
            97652823 packets, 10323856470 bytes
            5 minute rate 10000 bps
          Match: access-group name VOIP-CONTROL
            20782858 packets, 1481676784 bytes
            5 minute rate 0 bps
          Match: access-group name LOGIXWEB
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: access-group name GRINDLOG
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: access-group name CITRIX
            46895 packets, 14669179 bytes
            5 minute rate 0 bps
          Match: access-group name CORP_WEB
            28502414 packets, 6387897396 bytes
            5 minute rate 4000 bps
          QoS Set
            dscp af31
              Packets marked 164691269
    show policy-map interface s0/0/0:0
    Serial0/0/0:0
      Service-policy output: QoS_OUT
    --- previous output omitted ---
        Class-map: Silver (match-any)
          86590227 packets, 12051546524 bytes
          5 minute offered rate 3000 bps, drop rate 0 bps
          Match: access-group name MAINFRAME
            7641084 packets, 2701232492 bytes
            5 minute rate 0 bps
          Match: access-group name KRONOS
            6975052 packets, 1555404656 bytes
            5 minute rate 0 bps
          Match: access-group name EMAIL
            58438150 packets, 5433636586 bytes
            5 minute rate 3000 bps
          Match: access-group name VOIP-CONTROL
            355083 packets, 41252455 bytes
            5 minute rate 0 bps
          Match: access-group name LOGIXWEB
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: access-group name GRINDLOG
            0 packets, 0 bytes
            5 minute rate 0 bps
          Match: access-group name CITRIX
            19 packets, 4967 bytes
            5 minute rate 0 bps
          Match: access-group name CORP_WEB
            13180836 packets, 2320015236 bytes
            5 minute rate 0 bps
          Queueing
          queue limit 64 packets
          (queue depth/total drops/no-buffer drops) 0/18156/0
          (pkts output/bytes output) 86421413/12004278837
          bandwidth remaining 50% (768 kbps)

    this is my configuration
    DGMGRL> show configuration
    Configuration
    Name: matrix
    Enabled: YES
    Protection Mode: MaxPerformance
    Databases:
    stdby1 - Primary database
    stdby2 - Physical standby database
    stdby3 - Physical standby database
    Fast-Start Failover: DISABLED
    Current status for "matrix":
    SUCCESS
    --- this is my first successful switchover -----
    DGMGRL> switchover to stdby2
    Performing switchover NOW, please wait...
    New primary database "stdby2" is opening...
    Operation requires shutdown of instance "stdby1" on database "stdby1"
    Shutting down instance "stdby1"...
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "stdby1" on database "stdby1"
    Starting instance "stdby1"...
    ORACLE instance started.
    Database mounted.
    Switchover succeeded, new primary is "stdby2"
    -------------------this is my second switchover -------------
    DGMGRL> switchover to stdby1
    Performing switchover NOW, please wait...
    New primary database "stdby1" is opening...
    Operation requires shutdown of instance "stdby2" on database "stdby2"
    Shutting down instance "stdby2"...
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    Operation requires startup of instance "stdby2" on database "stdby2"
    Starting instance "stdby2"...
    Unable to connect to database
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Failed.
    You are no longer connected to ORACLE
    Please connect again.
    Unable to start instance "stdby2"
    You must start instance "stdby2" manually
    Switchover succeeded, new primary is "stdby1"
    DGMGRL>
    Edited by: user6981287 on Jan 7, 2010 12:57 AM
    Edited by: user6981287 on Jan 7, 2010 1:00 AM

  • Error msg: "there was a problem sending the command to the program" when using a FireFox shortcut

    This happens only when I use a shortcut to invoke Firefox. I am running Windows 7 professional. The Firefox window opens after the error message occurs, so I would classify this as an annoyance.
    Several help postings mention removing "ddeexec" from Firefox registry entries. This worked for a while (it seems to be related to Firefox updates) but now no longer works: ddeexec is removed but the error message still occurs.

    Don't seem like this can be fixed so I went back to version 6.0.2 which works good.
    I have Chrome now as my default browser and will not use fire fox until they fix it!
    Chrome works great!

  • Issue 'show hsrp detail' every 5 minutes using EEM

    Hello,
    Please confirm EEM is a feasible way to accomplish this and confirm I can trigger it every few minutes.
    1. Issue a "show hsrp detail" under the respective interfaces.
    2. In the output of the "show hsrp detail", if I find "Standby router is unknown", trigger an email to the [email protected]
    event manager applet monitorhsrp
    event timer watchdog time 300 maxrun 9999999

    Yes, in Cisco IOS 'watchdog' works.
    In NX-OS, that would be the 'scheduler' feature.

  • Process show commands with EEM

    Hi all,
    Im newbie in EEM, but using it in on of my projects in a basic style:
    syslog or ip sla tracking events
    set actions and some basics if/else...
    I dont know how I lived without EEM, its awesome.
    I need to do some advanced inspection of show commands output, like taking some strings from "show ip route", "show ip ospf" and so on, compare them and do some actions based on result.
    Can anyone show me some simple example, with filtering IP address of the DR from "show ip ospf neighbor", comparing it with router-id from the "show ip ospf interface" and make some action based on the result. It would be very useful for me.
    Also documentation for beginners would be appreceated.
    Best regards,
    Aleksei 

    Sorry, I missed this one originally.  There are a lot of examples in this community that talk about parsing show command output.  I don't know of any OSPF-specific ones off the top of my head, but look at examples like:
    https://supportforums.cisco.com/thread/2238284?tstart=0
    https://supportforums.cisco.com/thread/2241567?tstart=0
    You'll need to come up with regular expressions that match what you want from the output of the OSPF commands.  I don't have OSPF output handy to show any relevant examples, but hopefully the two I mentioned will be of some help.

  • Expect script and show command capture problem.

    Hello everyone.
    I want to capture the output of 'show interface status' to text files for our +600 switches.  Unfortunately, we have many old 2924's and other models running code prior to 12.0(21) that cannot support 'show command | redirect tftp....'  My hope was to use this command set and run it in an Expect script to capture this information on a daily basis.  Running the 'show interface status' in an Expect script is pretty easy, but I cannot see how to capture the show command output to a file for transfer to a server.  Has anyone else faced this problem and found a solution?
    Thanks,

    To write the "show" commands output to a text file in Expect/Tcl:
    set filename "/path/to/output.file"
    exp_send "show running\r"
    set var $expect_out(buffer);
    set fid [open ${filname} w+]
    put $fid $var
    close ${fid}
    Large "show" output can often exceed the default size of $expect_out(buffer) however. This can be tuned accordingly:
    http://wiki.tcl.tk/9407

  • JDev TP4 DVT:Map Component: How to send a command to Mapviewer Server?

    How to send a command to Mapviewer Server programmatically using a DVT:Map component? ( for example : To capture a Theme info when i clicking in the a map theme position?
    Juan C LLanes

    Hi Juan,
    Are you trying to click on a point in the map and update another control on the page?
    This is available today, if you create a master-detail binding and bind the master to your map theme, and detail to another view e.g. a table, and check the checkbox "Enable row selection" when you create the map theme binding, then you will get this behavior automatically.
    If this is not what you are looking for, please clarify.
    Thanks
    Katia

  • How to send SCPI commands to a VXI instrument

    I am using a VXI Interface tech SR2510 LVDS card with teststand and keep getting the following error when the intial diagnostics test trys to run. "Device I/O Driver error" I tried to use the Visa Interface and the interactive control in NI MAX but was not able to send SCPI commands. What can I use to communicate with this card. The resource manager does successfully execute and I see my instrument in the devices list so I am confident it is not a VXI problem.

    Hello DF1963,
    Can you communicate with the card through its driver/interface? Also, please review the following NI-VISA Help topic: Introduction to Programming VXI Devices in VISA to ensure that correct commands are being sent. If your device is correctly configured in MAX, I would also recommend verifying with the card manufacturer as well.
    Best regards,
    Ali M
    Applications Engineer
    National Instruments
    www.ni.com/support

  • 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

  • Using VI Example Basic Serial Write Read to send AT commands to Cell phone modem error 1073807360

    I am using the NI Example VI: Basic Serial Write and Read to send AT commands to a Cell phone acting as a Modem.  I can send AT commands to this phone using Hyperterm when I select the modem driver by name in the hypert port selection field but not as com 7 which it occupies according to device manager modem properties. The basic serial vi does not show the modem driver as a selection, only ports by comX are shown. I get error 1073807360.

    Have you tried to put the name you enter in Hyperterminal in the VISA resource control? If Com 7 doesn't show, you can simply type "COM 7" in the VISA resource control. Or use "ASRL::INSTR 7".
    Also, make sure the connection in hyperterminal is closed, before you open the port in LabVIEW.
    Hope it helps,
    Wiebe.

  • At CRS-1,how can i use show command with pipe | ?

    HI,ALL
    when I use show command with pipe on the CRS-1,the command invalid
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors 
                                                                       ^
    % Invalid input detected at '^' marker.
    ========================================================
    But Previously on the cisco 7609,I can use the show command
    GZ-DM-SR-1.MAN.7609#show int | include line |err
    Vlan1 is down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets
    Vlan11 is administratively down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets
    Vlan99 is down, line protocol is down
         0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
         0 packets output, 0 bytes, 0 underruns
         0 output errors, 0 interface resets

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors 
                                                                       ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |?    

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | |?
                                                                        ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | ?
      begin    Begin with the line that matches
      exclude  Exclude lines that match
      file     Save the configuration
      include  Include lines that match
      utility  A set of common unix utilities
      <cr>    
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |
    % Incomplete command.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |errors
                                                                       ^
    % Invalid input detected at '^' marker.
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#                                     
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | ?   
      begin    Begin with the line that matches
      exclude  Exclude lines that match
      file     Save the configuration
      include  Include lines that match
      utility  A set of common unix utilities
      <cr>    
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line |?

    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line | include er$
    Thu Jan 15 22:36:24.120 GMT
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#
    RP/0/RP0/CPU0:JA-DL-CR-1.MAN.CRS-1#show interfaces | include line           
    Thu Jan 15 22:37:05.013 GMT
    Loopback0 is up, line protocol is up
    Loopback1 is up, line protocol is up
    Loopback6 is up, line protocol is up
    Null0 is up, line protocol is up
    POS0/0/0/0 is up, line protocol is up  (APS not Configured )
    POS0/0/1/0 is up, line protocol is up  (APS not Configured )
    TenGigE0/0/4/0 is up, line protocol is up

Maybe you are looking for