Interactive CLI commands
I'm quite new to EEM, so please bear with me.
How can I handle interactive CLI commands. I want a script that detects when a configuration change has been made, and then copies the running configuration to a TFTP server. This is what I have tried:
event manager applet Configured
event syslog pattern ".*%SYS-5-CONFIG_I.*"
action 10 cli command "enable"
action 20 cli command "copy run tftp"
action 30 gets response
action 40 puts "MyTFTPServer"
action 50 gets response
action 60 puts "MyRtr.run"
action 70 end
All that happens is:
No. Job Id Proc Status Time of Event Event Type Name
1 1 Actv abort Mon May14 13:53:35 2012 syslog applet: Configured
2 2 Actv abort Mon May14 13:53:46 2012 syslog applet: Configured
3 3 Actv abort Mon May14 14:01:32 2012 syslog applet: Configured
4 4 Actv abort Mon May14 14:02:11 2012 syslog applet: Configured
5 5 Actv abort Mon May14 14:05:01 2012 syslog applet: Configured
6 6 Actv abort Mon May14 14:06:18 2012 syslog applet: Configured
7 7 Actv abort Mon May14 14:08:49 2012 syslog applet: Configured
(You see how many times I have tried to get it working ;-) The problem seems to be the interactivity of the "copy run tftp" command.
Can someone give me some guidance please?
Kevin Dorrell
Luxembourg
OK, I got it
event manager applet Configured
event syslog pattern ".*%SYS-5-CONFIG_I."
action 10 cli command "enable"
action 20 cli command "copy run tftp" pattern "Address or name of remote host.*"
action 30 cli command "MyTFTPServer" pattern "Destination filename.*"
action 40 cli command "MyRtr.run"
Kevin Dorrell
Luxembourg
Similar Messages
-
I am looking a cli command to run ut custom report with custom layout. currently I am using cli for generate report with custom layout but now I want include custom report. here my current command
/opt/CSCOpx/campus/bin/ut -u USER -p PASS -cli -query all -layout YELLOW. where I should add my custom report name "red" ? next to -query instead of "all" add "red" is that working or something different. Thanks, PaulInstead of "-query all" you would use your custom query name. For example, "-query RED".
-
What are the raw devices, CLI commands to take backup for raw devices
CLI commands to execute these using brtools for raw devices
1. Back up tablespace(s) online and offline using the BRBACKUP function util_file.
2. Back up tablespace(s) online using the BRBACKUP function util_file_online.
3.Back up offline redo log files using BRARCHIVE
please give reply
Thanks & RegardsHi,
RAW devices is when you store your data directly on device.
It is like you use devices directly instead of data files on file system. Can give you some performance benefits. -
Does EEM support action cli command "set clock hh:mm:ss Mmm dd yyyy" ?
conf t
no event manager applet TEST
event manager applet TEST
event snmp oid 1.3.6.1.2.1.1.3.0 get-type exact entry-op gt entry-val "0" poll-interval 6
action 001 cli command "clock set 00:00:00 Jan 1 1994"
end
show clockYou're missing an "enable" cli command, but the clock set should work once you add it.
-
LMS 3.2 - URL or CLI-Command to manually start a CM datacollection
Hello all,
does anybody of you know whether it is possible to start a CM-DataCollection via either invoking a URL-Command or a CLI-Command?
Thanks for any feedback
LotharNo, this is not possible. Data Collection must be scheduled, or started via the GUI.
-
Is there a CLI command to check DLU's?
available and used?
This is version 7.1.5
Thanks!
TraceeHi Tracee,
There are no commands via cli related to the
license/DLU's on 7.x. There are some new cli commands
on 9.x related to licensing/ELM
http://www.cisco.com/en/US/docs/voice_ip_comm/cucm/cli_ref/9_0_1/CUCM_BK_C3A58B83_00_cucm-cli-reference-guide-90_chapter_0100.html
Cheers!
Rob
"Why do the best things always disappear "
- The Band -
Need CLI commands for WPA2 Personal Mode
I've seen this example, but I need the CLI the gui generates. Can anyone help out please?
https://www.cisco.com/en/US/tech/tk722/tk809/technologies_configuration_example09186a008054339e.shtml#pers
This is what I need to accomplish w/o the gui interface on an 1142N running 12.4
Configure in Personal Mode
The term personal mode refers to products that are tested to be interoperable in the PSK-only mode of operation for authentication. This mode requires manual configuration of a PSK on the AP and clients. PSK authenticates users via a password, or identification code, on both the client station and the AP. No authentication server is necessary. A client can gain access to the network only if the client password matches the AP password. The password also provides the keying material that TKIP or AES uses to generate an encryption key for the encryption of the data packets. Personal mode is targeted to SOHO environments and is not considered secure for enterprise environments. This section provides the configuration that you need to implement WPA 2 in the personal mode of operation./* 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-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
Hi,
Below are the CLI commands for WPA2 personal mode
Configure terminal
interface dot11Radio 0
encryption mode ciphers aes-ccm
or
encryption vlan mode ciphers aes-ccm < --- If you have multiple vlans
exit
dot11 ssid
authentication open
authentication key-management wpa version 2
wpa-psk ascii
Regards,
Madhuri -
Hi guys,
I have an issue with an EEM applet that I have configured. Part of the applet is to run a kron occurrence. I know the applet is executing by viewing event manager history, but when I then run show kron schedule, the kron job is not set to run.
If I manually input the same CLI commands, the schedule starts without issue.
The config for the applet is below:
event manager applet RESTORED
event track 100 state up
action 1.0 cli command "enable"
action 1.1 cli command "conf t"
action 1.2 cli command "kron occurrence MONITOR in 0:10"
action 1.3 cli command "policy-list MONITOR"
action 1.4 syslog msg "ATTENTION:THE CCT HAS RESTORED"
exit
Any help with this would be greatly appreciated.
Thanks
ScottI have debugged event manager action cli, and discovered that the reason the CLI commands are not taking is that aaa (tacacs) is applied to this router, so when the system attempts to enter commands, command authorisation is failing.
*Jul 15 15:14:26.245: %TRACKING-5-STATE: 100 interface Lo100 ip routing Up->Down
*Jul 15 15:14:26.261: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : CTL : cli_open called.
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : CC
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : This is a test router for SNMP traps
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : WAKE-ANT-TEST-RTR>
*Jul 15 15:14:26.269: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : IN : WAKE-ANT-TEST-RTR>enable
*Jul 15 15:14:26.281: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : WAKE-ANT-TEST-RTR#
*Jul 15 15:14:26.281: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : IN : WAKE-ANT-TEST-RTR#conf t
*Jul 15 15:14:26.497: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : Command authorization failed.
*Jul 15 15:14:26.497: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.497: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : WAKE-ANT-TEST-RTR#
*Jul 15 15:14:26.497: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : IN : WAKE-ANT-TEST-RTR#no kron occurrence MONITOR in 0:03
*Jul 15 15:14:26.513: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : ^
*Jul 15 15:14:26.513: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : % Invalid input detected at '^' marker.
*Jul 15 15:14:26.513: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT :
*Jul 15 15:14:26.513: %HA_EM-6-LOG: DWNBT : DEBUG(cli_lib) : : OUT : WAKE-ANT-TEST-RTR#
Does anyone out there know if its possible for EEM to authenticate against aaa?
I did try adding a "login" command after
action 1.0 cli command "enable", but this failed authorisation also.
Thanks
Scott -
Brand new 2960X and 2960XR not responding to cli commands
I have 2 brand new 2960X switches and neither are responding to cli commands via the RJ45 to DB9 cisco cable. Text is displayed but when I hit enter on the keyboard nothing happens and the switches just sit at whatever the last boot ouput is. 2960-XR just sits at 'vlan1, changed state to up.....' and I am never prompted for the express setup and no response to any keyboard input.
I know the cable/keyboard works because I can connect it to a 2911 right beside the 2960's and have no problems using the same cable.
Anyone seen this before?
Cisco IOS Software, C2960X Software (C2960X-UNIVERSALK9-M), Version 15.0(2)EX1, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2013 by Cisco Systems, Inc.
Compiled Fri 28-Jun-13 13:20 by prod_rel_team
Nov 22 10:49:54.277: %USB_CONSOLE-6-MEDIA_RJ45: Console media-type is RJ45.
Nov 22 10:49:55.602: %LINK-3-UPDOWN: Interface FastEthernet0, changed state to down
Nov 22 10:49:56.493: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/47, changed state to up
Nov 22 10:49:56.493: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/48, changed state to up
Nov 22 10:49:58.370: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/47, changed state to up
Nov 22 10:49:58.412: %LINK-3-UPDOWN: Interface GigabitEthernet1/0/48, changed state to up
Nov 22 10:49:58.450: %PLATFORM_ENV-1-FAN_NOT_PRESENT: Fan is not present
Nov 22 10:50:26.384: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to upHello,
Recieved today also 2 2960-x switches.
Had the same issue...playing arround with secureCRT settings (rts/cts, xon/xoff etc) ...no results.
Tried Putty and it worked right away ...indeed strange have never seen this before.
Installed latest software 150.2ex4 still the same.
regards michel -
1142 Autonomous Cli commands for 40MhZ bonding DFS
Does anyone know of a command that I can issue from the CLI that will inform me of the two channels that the AP is using to bond for the 40MhZ width when I select DFS. I know I can choose either above or below. Does it just use the next channel ? So if DFS selects 36 does it just automatically the next channel up if I have 40Mhz Above selected?
I have autonomous 1142's and I would like to know what the 2nd Channel. Keep in mind these are Autonomous AP's.
Also would like to know a CLI command to find out what the channel currently is for either radio if DFS is selected?
Any docs on CLI commands for the 1142 would be appreciated.
Thank you!Yes, if you configure 40MHz above it will just use the next channel. Same with 40MHz below, it will just use the next channel down.
To see which channel the AP is currently using you can look under "show controller d1" -
My partner who was the ASA guy left, so I have been abruptly elected to fill the role.
I'm looking for some advise on some great cli commands.
The 2 I'd really love to know are how to tell phase 1 is up and how do I check to see if there is interesting traffic coming across.
Thanks guys, I appreciate any and all help.
Sent from Cisco Technical Support iPhone AppStart with those two:
show isakmp show crypto ipsec sa [peer ....]
You can always check the command reference if missing anything.
Marcin -
ACE 4710 responds very slow to CLI commands
I am expericing delayed responses to my CLI commands on the ACE 4710. The delays occur sporadically. I have check the cpu and memory and neither one appeared to show any abnormal behaviour. Has anybody else experienced unsual delay with your CLI commands? If so, where you able to isolate and correct the problem? If not, any suggestions on where and how to look for the problem?
I am experiencing the same exact problem. CLI commands are very slow. Although, i dont get any performance issues for my application when i issue the "show run" or "wr mem" commands at CLI i wait for over 1 minute to receive any output, commands like "show serverfarm" ,"show rserver" "show stats" are working fine. my resource usage is ok and cpu has no problems. The problem exists in all contexts of the specific ACE. I did a test by forcing the standby ace to become active and while the standby ACE had no problem in executing the command when it becomes the active one the problem shows up. is there a way to troubleshoot this?
Thank you in advance -
Cisco UCS PSU issues - CLI commands?
I have a few C200s that are showing one power supoply as "dead" put they are present in the inventory. Currently my power policies are still the default and I am wondering how to tell or see a log or graph of power coming into the PSU.
Also is there a way to modify the power state via CLI?Hello Eddie,
What is the version of CIMC ? Do you notice any fault logged for it ? What is the LED status of those PSUs ?
The stats can be viewed via CLI / GUI but it does not provide output over the time in a graph format.
In GUI, PSU information and stats are availabe under
Server > Inventory > Power Supplies
Server > Power Policies
Please refer following doc for related CLI commands
http://www.cisco.com/en/US/docs/unified_computing/ucs/c/sw/cli/config/guide/1.4.1/Cisco_UCS_C-Series_CLI_Configuration_Guide_141_chapter3.html
Padma -
How to change to.pac file using CLI command ?
I've asked this before but have not had much luck getting an easy fix.
I need to change a large number of machines over to using a pac file instead of the current settings for secure and web proxys.
It's not possible using 10.4 CLI command networksetup but I'm wondering if anyone may have another way of doing this ? Possibly a script or something ???
MitchHi Min,
You should move this question to Unified Communications Application community to get the expert answer on IP phone configuration. This community is for Cisco WebEx Meetings Server and Cisco Unified MeetingPlace products.
Thank you.
-Dejan -
Aironet Autonomous 1252 CLI command 802.11n disable
hi,
I am using Aironet Autonomous 1252 AP. The version used is:
Cisco IOS Software, C1260 Software (AP3G1-K9W7-M), Version 12.4(25d)JA1, RELEASE SOFTWARE (fc1)
I want to disable 802.11n on 2.4GHz interface. Please tell the CLI command to do this.
Thanks in advance.
uv.Why you want to disable 802.11n data rates ?
There are few other ways as well. For 802.11n you should have following
1. WMM enable
2. either Open Authentication or WPA2/AES
So if you are not using 1 & 2 both, you won't get 802.11n data rates. Refer this
https://supportforums.cisco.com/discussion/12078656/aironet-ap-1252-how-use-80211g-only
HTH
Rasika
**** Pls rate all useful responses ****
Maybe you are looking for
-
Hi There everyone. I have a problem with Logic Pro 7 (latest updated version 7.2.3) at the moment. Since I Bought it 2 Years Ago, Everything has been fine, well almost. But I have never had this happen before: When I open logic,9 times out of 10 it F
-
Drag and drop option not active - Captivate 8
Is there a particular slide you need to use or something else you need to have on your slide in order to activate the drag and drop menu item? All other menu items in the Interaction menu are active, but drag and drop.
-
Tehnical upgrade from 4.6C MDMP to ECC 6.0 using CU &UC approach
Hi SAP Experts, We are embarking on a project for Technical upgrade from SAP R/3 4.6C MDMP system to ECC 6.0 using the CU & UC approach for our Asian operations (comprising of India, Japan, Taiwan & Singapore). Please share with me the Best Practices
-
Multiple Libraries, One on Internal HD, One on External HD
I have a macbook with an 80GB hard drive. I also have it hooked up to two firewire external drives when I have it at home. I have a small iTunes library on the internal drive that I use to listen to music. I also have a huge library on one of the ext
-
Is it possible to Edit Bankchallan posted thru J_1EWT_BANK_UPDATE
Hi All, I have updated Bank Challan number wrongly in J_1EWT_BANK_UPDATE. This Tcode is similar to J1INBANK. Is there any option to edit this? OR, need to reverse thru J1INREV and post a new challan? thnx in advance. Edited by: Santosh Babu on Jun 10