[c-nsp] Cisco - TCL script document
Rodney Dunn
rodunn at cisco.com
Sat Sep 9 00:13:47 EDT 2006
I just filed a bug where some new buffer configuration commands were
not parsing on reload because we coded it wrong.
I was able to use an EEM applet as a simple workaround that looked
like this:
Symptom:
When tuning particle clone, F/S, and header pools after these were made
configurable
via CSCuk47328 the commands may be lost on a reload.
Conditions:
If the device is reloaded the commands are not parsed on a reload and this results
in the defaults being active. This may result in traffic loss if the increased
buffers
were needed to enable greater forwarding performance for the specific network
design.
Workaround:
To workaround the problem an applet can be configured to enter the buffer
values again after a reload. A sample applet would be:
event manager applet add-buffer
event syslog occurs 1 pattern ".*%SYS-5-RESTART: System restarted --.*"
action 1.0 cli command "enable"
action 2.0 cli command "configure terminal"
action 3.0 cli command "buffers particle-clone 16384"
action 4.0 cli command "buffers header 4096"
action 5.0 cli command "buffers fastswitching 8192"
action 6.0 syslog msg "Reinstated buffers command"
So on reload it would enter the configuration commands back for me.
Take that Mr. Bug. :)
Rodney
On Fri, Sep 08, 2006 at 01:28:08PM -0400, Ed Ravin wrote:
> On Fri, Sep 08, 2006 at 08:49:29AM -0400, Rodney Dunn wrote:
> > And it gets much more powerful when you evaluate it in conjunction
> > with EEM.
> >
> > It's amazing the corner case workaround and detection scnearios
> > I see it being used for nowadays.
> >
> > ie: when a link comes up trigger a script to wait X seconds and check
> > to see if it's a Cisco IP phone, if it is apply a specific QOS policy.
>
> Ooh, but I need examples... How about this one:
>
> I need a script to work around a nasty bug in IOS - the script should
> wake up every minute (I think that can be done with "kron"), test something
> (either object tracking, a couple of pings, or check the status of a
> couple of interfaces, or maybe look for the presence of a couple of
> routes), and execute an IOS command ("like clear interface fastethernet0")
> if the test result is negative.
>
> If someone familiar with TCL scripting on IOS could post a skeleton to
> get me started, I would be very grateful.
>
> -- Ed
More information about the cisco-nsp
mailing list