cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1998
Views
0
Helpful
2
Replies

Debugging output blocking script execution

daleschultz
Level 1
Level 1

Hi:

I have a timer watchdog script that runs once a day to evaluate whether there is dialtone on the phone line attached to an external modem on aux 0.

I have no problems with the script if Tcl cli debugging is disabled, but as soon as I enable 'event manager tcl cli' and run the script then the output of the debugging appears to block the script's execution.  It appears to block on line limit or character limit, I'm not certain which.

This runs on a Cisco 877 with IOS Version 12.4(4)T3 which I cannot upgrade as there is no support contract on it.

Here's a sample debug session output for the script when debugging is active.  After 10 minutes the script is forcefully terminated by the system, but the vty remains active as a result of the forced termination and I have to clear the line vty manually.

---------------------------------------------------------------------------------------------

8U22#sh deb
Embedded Event Manager:
  Debug EEM Tcl CLI library debugging is on
8U22#sh eve man pol reg
No.  Class   Type    Event Type          Trap  Time Registered           Name
1    script  user    none                Off   Wed Dec 18 12:11:04 2013  tm_dialtone_chk.tcl
policyname {tm_dialtone_chk.tcl}
nice 1 queue-priority low maxrun 240.000


8U22#term mon
8U22#even man run tm_dialtone_chk.tcl
8U22#
DEBUG(cli_lib) : CTL : cli_open called.
DEBUG(cli_lib) : OUT :
DEBUG(cli_lib) : OUT : ************************************************************************
DEBUG(cli_lib) : OUT : **       UNAUTHORIZED ACCESS TO THIS DEVICE IS PROHIBITED             **
DEBUG(cli_lib) : OUT : ************************************************************************
DEBUG(cli_lib) : OUT :     ALL ACTIVITIES PERFORMED ON THIS DEVICE MAY BE LOGGED,
DEBUG(cli_lib) : OUT :     AND VIOLATIONS OF THIS POLICY MAY RESULT IN DISCIPLINARY ACTION,
DEBUG(cli_lib) : OUT :     AND MAY BE REPORTED TO LAW ENFORCEMENT.
DEBUG(cli_lib) : OUT :     THERE IS NO RIGHT TO PRIVACY ON THIS DEVICE.
DEBUG(cli_lib) : OUT :
DEBUG(cli_lib) : OUT : 8U22>
--More--

---------------------------------------------------------------------------------------------

That --More-- prompt appears on the screen and that's when the execution is blocked.  Then 10 minutes later I get this:

---------------------------------------------------------------------------------------------

DEBUG(cli_lib) : IN  : 8U22>enable

Process Forced Exit

    while executing

"notifyError "cli_exec: 'enable' failed: $result""

    invoked from within

"$slave eval $Contents"

    (procedure "eval_script" line 7)

    invoked from within

"eval_script slave $scriptname"

    invoked from within

"if {$security_level == 1} {       #untrusted script

     interp create -safe slave

     interp share {} stdout slave

     interp share {} stderr slave..."

    (file "system:/lib/tcl/base.tcl" line 50)

Tcl policy execute failed: Process Forced Exit

---------------------------------------------------------------------------------------------

The script appears blocked by the --More-- it waits at a cli execute command in the script that enters the 'enable' command as follows:

if [catch {cli_exec $cli(fd) "enable"} result] {

  notifyError "cli_exec: 'enable' failed: $result"

}

Is there a command or setting that I need to issue before using debug mode that will not block the script execution?

1 Accepted Solution

Accepted Solutions

mtimm
Cisco Employee
Cisco Employee

Hi Dale,

This is really old code.  This is caused by CSCsg01644.  You can workaround it by setting:

term len 0

You are far better off upgrading if you can though.  What you upgrade to is a choice you have to make on your own though and I do realize that this is not an easy thing to decide on.  877 routers may be limited in what they can run.

Mike

View solution in original post

2 Replies 2

mtimm
Cisco Employee
Cisco Employee

Hi Dale,

This is really old code.  This is caused by CSCsg01644.  You can workaround it by setting:

term len 0

You are far better off upgrading if you can though.  What you upgrade to is a choice you have to make on your own though and I do realize that this is not an easy thing to decide on.  877 routers may be limited in what they can run.

Mike

Thanks for the reply.  That seems to fix my problem.

I find it odd though as my term length was 24 and there was not 24 lines displayed before the --More-- prompt.