Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Cisco > Running TCL from cisco kron

Reply
Thread Tools

Running TCL from cisco kron

 
 
rm-throwaway4@gunlab.com.ru
Guest
Posts: n/a
 
      12-20-2005
Is it possible to run tcl script from cisco kron?

sh ver
.....
Cisco IOS Software, C831 Software (C831-K9O3Y6-M), Version 12.3(2)XE3,
RELEASE SOFTWARE (fc1)
....
Cisco C831 (MPC857DSL) processor (revision 0x500) with 58983K/6553K
bytes of memory.
Processor board ID FCZ094451NC (385101830), with hardware revision 041F
CPU rev number 7
2 Ethernet interfaces
4 FastEthernet interfaces
128K bytes of NVRAM.
12288K bytes of processor board System flash (Read/Write)
2048K bytes of processor board Web flash (Read/Write)

% cat p.tcl:

proc dosomepingingandstuff {} {
ping 10.1.1.1
return "ok for now"
}

copy scp://xxx@10.1.1.1/p.tcl nvram.tcl
....

conf t
scripting tcl init nvram.tcl
^z

cs-nonexistant#tclsh
cs-nonexistant(tcl)#dosomepingingandstuff
ok for now
cs-nonexistant(tcl)#tclquit
cs-nonexistant#

So far p.tcl works (I ran tcpdump icmp on 10.1.1.1 and saw these pings)

But:

conf t
kron occurrence pinging in 1 recurring
policy-list pinging
!
kron policy-list pinging
cli tclsh
cli dosomepingingandstuff
cli tclquit
!
^z
debug kron all

*Mar 1 00:10:17.987: Major 1, Minor 0
*Mar 1 00:10:17.987: Timer Event pinging
*Mar 1 00:10:17.987: Kron delay for next pinging 60000
*Mar 1 00:10:17.987: Call parse_cmd 'tclsh'
*Mar 1 00:10:17.995: Kron CLI return 0
''
*Mar 1 00:10:17.995: Major 4, Minor 7
*Mar 1 00:10:17.995: Respond to end of CLI Process
*Mar 1 00:10:17.995: Call parse_cmd 'dosomepingingandstuff'
*Mar 1 00:10:18.007: Kron CLI return 2
''
*Mar 1 00:10:18.007: Major 4, Minor 7
*Mar 1 00:10:18.007: Respond to end of CLI Process
*Mar 1 00:10:18.011: Call parse_cmd 'tclquit'
*Mar 1 00:10:18.011: Kron CLI return 0
''
*Mar 1 00:10:18.015: Major 4, Minor 7
*Mar 1 00:10:18.015: Respond to end of CLI Process

It doesn't work. 10.1.1.1 sees no pings and apparently
dosomepingingandstuff wasn't called. Worse, free memory in sh mem stat
slowly goes down until I get out of memory message when I try to invoke
tclsh again. Much worse, sometimes router console mysteriously blocks
console (I can log in from the network, but serial console doesn't
respond, clear line console doesn't help)...

What's wrong? Is it possible to run tcl scripts from kron at all? No, I
don't want to just ping 10.1.1.1, I want to ping it and do several
configuration changes if 10.1.1.1 is not available and revert them back
if 10.1.1.1 is back online. And no, I don't have extra
fbsd/obsd/linux/whatever computers on the remote locations where 831s
installed, only dumb citrix terminals, so 831 has to figure out some
logic without external help.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to build a loadable tcl dll with visual studio (microsoft C compiler)?[crosspost in comp.lang.tcl and comp.lang.c++] Michael Reichenbach C++ 5 02-08-2010 02:38 PM
Cisco 1811 Kron: pfunknasty Cisco 0 05-28-2009 07:49 PM
Inline::Tcl vs. Inline::Tcl Mumia W. Perl Misc 0 08-23-2006 04:09 PM
Running ping with kron Patrick A Cisco 9 04-09-2005 07:18 AM
Running ping with kron Andreas Tikart Cisco 0 06-28-2004 08:12 AM



Advertisments