EEM Applet - Restarts Router

From: Rares Donca <rares.donca_at_gmail.com>
Date: Tue, 1 Mar 2011 17:53:52 +0200

Hello all,

It seems that Cisco IOS does not do very much to protect memory.

I have the following applet:

event manager applet PROC
 event none
 action 1.0 cli command "enable"
 action 2.0 cli command "show processes cpu sorted 5min"
 action 3.0 set i 0
 action 4.0 set output ""
 action 5.0 foreach line "$_cli_result" "\n"
 action 6.0 append output "$line"
 action 7.0 increment counter
 action 8.0 if $i eq 9
 action 9.0 break
 action 9.1 end
 action 9.2 end
 action 9.3 puts $output

This will output only first 9 lines from show processes cpu sorted.
Well, actually there is a typo( and I lost some time until i saw that),
but for that "increment counter" the router is restarting.

I tested this on all my lab routers, 2811 with the following IOS,
(C2800NM-ADVENTERPRISEK9-M), Version 12.4(24)T4, and all routers
are restarting.

Has anyone seen something like this before?

Definitely not something to try in the lab :).

Regards,
Rares

Blogs and organic groups at http://www.ccie.net
Received on Tue Mar 01 2011 - 17:53:52 ART

This archive was generated by hypermail 2.2.0 : Fri Apr 01 2011 - 06:35:41 ART