[c-nsp] Cisco - TCL script document
Rodney Dunn
rodunn at cisco.com
Fri Sep 8 16:26:14 EDT 2006
Stay tuned. :)
Here is a cool applet example:
! Cut and paste this to make a command repeat evey 10 seconds and write to
! output to syslog
!
!
event manager applet t1
event none
action 2.0 cli command "enable"
action 2.1 cli command "conf t"
action 2.2 cli command "event manager applet t2"
action 2.3 cli command "event timer countdown time 10"
action 2.4 cli command "exit"
!
event manager applet t2
event none
action 1.0 syslog msg "applet called"
action 1.6 cli command "sh int fa0/0 | inc packets input|packets output"
action 1.7 syslog msg "pkts-in/out fa0/0: $_cli_result"
action 2.0 cli command "enable"
action 2.1 cli command "conf t"
action 2.2 cli command "event manager applet t2"
action 2.3 cli command "event timer countdown time 10"
action 2.4 cli command "exit"
!
event manager applet t3
event none
action 1.0 cli command "sh int fa0/0 | inc packets input|packets output"
action 2.0 syslog msg "result: $_cli_result"
!
event manager applet t4
event none
action 1.0 syslog msg "disabling applet t2"
action 2.0 cli command "enable"
action 2.1 cli command "conf t"
action 2.2 cli command "event manager applet t2"
action 2.3 cli command "event none"
action 2.4 cli command "exit"
!
alias exec stc event manager run t1
alias exec etc event manager run t4
!
alias exec eem event manager run
!
On Fri, Sep 08, 2006 at 09:55:49PM +0200, Gert Doering wrote:
> Hi,
>
> On Fri, Sep 08, 2006 at 01:28:08PM -0400, Ed Ravin wrote:
> > Ooh, but I need examples... How about this one:
>
> ... now that's an interesting point. Is there a "collector's corner"
> of Cisco TCL scripts somewhere?
>
> I think most of us would re-invent the wheel numerous times - and
> possibly in inelegant ways, due to not much experience with TCL in
> general.
>
> gert
> --
> USENET is *not* the non-clickable part of WWW!
> //www.muc.de/~gert/
> Gert Doering - Munich, Germany gert at greenie.muc.de
> fax: +49-89-35655025 gert at net.informatik.tu-muenchen.de
More information about the cisco-nsp
mailing list