Velocity Reviews - Computer Hardware Reviews

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

Thread Tools

Running TCL from cisco kron
Posts: n/a
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,
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 {} {
return "ok for now"

copy scp://xxx@ nvram.tcl

conf t
scripting tcl init nvram.tcl

ok for now

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


conf t
kron occurrence pinging in 1 recurring
policy-list pinging
kron policy-list pinging
cli tclsh
cli dosomepingingandstuff
cli tclquit
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. 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, I want to ping it and do several
configuration changes if is not available and revert them back
if 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

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