cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6020
Views
0
Helpful
24
Replies

EEM Script Conversion

Hello Community,

Can someone please show me how to convert the following EEM into Tcl?

I need action 4 to produce a carriage return

event manager applet backer
event none
action 1 cli command "enable"
action 2 cli command "copy running tftp:" pattern "Address"
action 3 cli command "10.44.97.254" pattern "Destination"
action 4 cli command "I WOULD LIKE A CARRIAGE RETURN HERE PLEASE"

Cheers

Carlton

24 Replies 24

Joe Clarke
Cisco Employee
Cisco Employee

The EEM converter at http://www.marcuscom.com/convert_applet will do this for you.  You can either retype the IP address or use "\n" for a newline.

Joseph,

Thanks.

Can you please, please show me how to remove/delete a tcl script.

The file I'm trying to delete the following script which in flash but not in the running config cpuHighCPUUsage.tcl

is a follows:


Brislington_DM001#show flash:

-#- --length-- -----date/time------ path

1     16925304 Aug 26 2008 13:02:06 +01:00 c181x-advipservicesk9-mz.1

24-6.T7.bi

n

19        4790 Feb 25 2013 15:05:22 +00:00 cpuHighCPUUsage.tcl



Brislington_DM001#dele flash:cpuHighCPUUsage.tcl

Delete filename [cpuHighCPUUsage.tcl]?

Delete flash:cpuHighCPUUsage.tcl?

[confirm]

%Error deleting flash:cpuHighCPUUsage.tcl (File in use in an incompatible mode)

Brislington_DM001#

Each time I attempt to delete the script I get the above error message.

Can you show me another way to get rid of the script?

Cheers mate.

Does the /force option to delete work?

Hi Joseph,

Thanks again for replying

No /force does not work.

I've tried almost everything I can think of.... its driving me crazy

Joseph,

I can't even find anything on google to help me delete/remove a tcl script....

One thing that you might try is to format the flash then copy the files back.

Wow! That's quite harsh. The flash contains the .bin file.

You can try a reboot first.  The image runs out of RAM, so a format isn't the end of the world.  I can certainly understand the hesitation, though.

Hi Joseph,

Unfortunately, its a production router and not in a position to reboot...

The format wouldn't require a reboot.

And while it shouldn't matter (since the policy is executed out of memory), has this EEM policy been unregistered with the EEM server?  Have you tried unconfiguring the EEM policy directory?

Hi Joseph, thanks for responding.

The strange thing is, the EEM isn't even registered in the router.

Can you show me how to unconfigure the EEM policy from the directory?

Cheers

If EEM isn't configured, then there's nothing to unregister.  It looks like you will need to either try a reload or a format.  There shouldn't be anything EEM-specific that is preventing you from deleting that file.

Carlton,

How was the flash formatted originally?  A flash formatted on something other than IOS or on a version of IOS other than the one that is running currently can introduce issues.  In addition some removable flash devices have locking switches that may cause the flash to be write protected and prevent files from being deleted.  In another thread I asked for the 'show flash: all' for this very reason.  I wanted to see what monlib information was in the flash so I could see if it was formatted by some other OS.

Mike

Hi all, thanks for sticking with me with this.

Mike, below is the show flash all.

I'm trying to delete cpuHighCPUUsage.tcl

Brislington_DM001#show flash all
-#- --length-- -----date/time------ path
1     16925304 Aug 26 2008 13:02:06 +01:00 c181x-advipservicesk9-mz.124-6.T7.bin
2         3278 Apr 30 2008 08:10:54 +01:00 sdmconfig-1811-1812.cfg
3       931840 Apr 30 2008 08:11:08 +01:00 es.tar
4      1505280 Apr 30 2008 08:11:28 +01:00 common.tar
5         1038 Apr 30 2008 08:11:42 +01:00 home.shtml
6       112640 Apr 30 2008 08:11:56 +01:00 home.tar
7         5598 Feb 21 2013 14:34:56 +00:00 configConfigchange.tcl
8           93 Feb 21 2013 14:35:16 +00:00 configConfigchange.cfg
9         4358 Feb 25 2013 23:21:56 +00:00 syslog_hist.log
10         498 Feb 25 2013 23:21:56 +00:00 cli_hist.log
11        6045 Feb 21 2013 15:08:18 +00:00 syslogOSPFEvent.tcl
12         144 Feb 21 2013 15:08:38 +00:00 syslogOSPFEvent.cfg
13        6038 Feb 22 2013 10:39:22 +00:00 syslogIPNAT.tcl
14         144 Feb 22 2013 10:39:42 +00:00 syslogIPNAT.cfg
15        6703 Feb 22 2013 12:14:02 +00:00 stateInterfacestatusv15.tcl
16         156 Feb 22 2013 12:14:22 +00:00 stateInterfacestatusv15.cfg
17        8174 Feb 22 2013 14:40:24 +00:00 utilisationHighInterfaceUtilization.tcl
18         133 Feb 22 2013 14:40:44 +00:00 utilisationHighInterfaceUtilization.cfg
19        4790 Feb 25 2013 15:05:22 +00:00 cpuHighCPUUsage.tcl
20        9116 Feb 25 2013 15:09:00 +00:00 errorsInterfaceErrorsv.tcl
21         113 Feb 25 2013 15:09:20 +00:00 errorsInterfaceErrorsv.cfg

12808192 bytes available (19591168 bytes used)

******** ATA Flash Card Geometry/Format Info ********

ATA CARD GEOMETRY
   Number of Heads:       4    
   Number of Cylinders    497  
   Sectors per Cylinder   32   
   Sector Size            512  
   Total Sectors          63616

ATA CARD FORMAT
   Number of FAT Sectors  31   
   Sectors Per Cluster    8    
   Number of Clusters     7910 
   Number of Data Sectors 63481
   Base Root Sector       165  
   Base FAT Sector        103  
   Base Data Sector       197  

ATA MONLIB INFO
   Image Monlib size = 49728
   Disk monlib size = 52736
   Name = c1800-atafslib-m
   Monlib Start sector = 2
   Monlib End sector = 96
   Monlib updated by = C181X-ADVIPSERVICESK9-M12.4(15)T4
   Monlib version = 1

Brislington_DM001#

Thanks

Carlton