cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1750
Views
0
Helpful
1
Replies

TCL show commands in IOS-XR

jon_panes24
Level 1
Level 1

Hi There,

 

Im getting an error running show commands on an IOS-XR device.

 

the script looks like this:

run tclsh

foreach i {

VOICE_BEARER_CLASS

VOICE_SIGNAL_CLASS

} { show class-map cmap-name $i }

 

Im getting the error: invalid command name "show"

 

I dont have any issues running show commands on IOS or on NX-OS devices. Am i missing a tcl keyword before the show command, I know on the Nexus platform youve got to use the cli keyword.

1 Reply 1

Joe Clarke
Cisco Employee
Cisco Employee

I'm not a big fan of tclsh.  I think it may actually be broken on XR.  You would need to use the exec keyword to run show commands.  This is the same for IOS.  IOS does let you run "raw" show commands, but that behavior is really undefined and varies between releases.

 

What I would recommend instead (even for IOS) is to use EEM Tcl policies with a "none" event detector to build out custom commands.  These will give you better control over the CLI and provide AAA integration.