cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1209
Views
5
Helpful
0
Comments
alanssie
Cisco Employee
Cisco Employee

Version 1.1 Oct 1 2018

Purpose
=======
This script will capture information of the RPD, this is ran from a command line
an alias can be used to call the full command

 


How to install
==============

A- Create a directory for scripts (if not done yet)
router#cd harddisk:
router#mkdir EEM

B- copy the script sh_tech_rpd.tcl in harddisk:EEM/

 

2 configure IOS
===============
Mandatory event manager configuration:
event manager directory user policy "harddisk:/EEM"
event manager policy sh_tech_rpd.tcl type user
or
event manager policy sh_tech_rpd.tcl type user authorization bypass


Security note :
----------------
The EEM script will be subject to authorization, in case aaa authorization is configured
make sure EEM as enough privilege to execute command
you can also use the "authorization bypass" keywords as shown above


3 How to run
=============
from the router exec type:
event manager run sh_tech_rpd.tcl -r [ip address of the RPD]

example :
---------
cbr8_prompt#event manager run sh_tech_rpd.tcl -r 172.16.1.1
The above start the collection of show command on the rpd registered with IP address 172.16.1.1


4 Options
=========
Additional to -r option which is mandatory, there are the following other options

-v This option is to enter the VRF name in which the RPD is accessible

-m This set the message level
0 Display error (this is on by default)
1 Display info in the syslog
2 Display script debugging in the syslog

-c This option provide the file name where additional command can be requested on the RPD as well as the Supervisor
example of file coding:

# This line is a comment, the script will not look at it
# Every line starting with SHOW_CMD_RPHY will act on the rpd
# Every line starting with SHOW_CMD_SUP will act on the supervisor
#
#

##Test the rphy capture
SHOW_CMD_RPHY show downstream channel configuration

##Test the supervisor capture
SHOW_CMD_SUP show cable modem cable 6/0/1 flap

note you can paste the above into a file, send it to the cbr8 and calling the -c option, you will see that the
script will capture those additionally

-t This option provide the type of sh tech
basic In this case logging and show version is captured
This is useful in case the developer would only need a few commands, in that case there is no
need to capture all he sh tech, you could correlate -t basic with -c [file with command requested by the devloper]

 


example of INFO message
=======================
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:collecting command 1 of 2
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:collecting command 2 of 2
May 9 14:16:04: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:Show Tech RPD supervisor command saved in harddisk:/shtech_rpd_10.8.17.12-supervisor_cmd-1525868119
May 9 14:16:04: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:Show Tech RPD for 10.8.17.12 is completed and saved in harddisk:/shtech_rpd_10.8.17.12-1525868119


example of debug message
=======================

acdc-cbr8-2#event manager run sh_tech_rpd.tcl -r 10.8.17.12 -t basic -m 2 -c te
May 9 14:15:06.890: %SMART_LIC-3-COMM_FAILED: Communications failure with the Cisco Smart Software Manager or satellite : Fail to send out Call Home HTTP message.
May 9 14:15:06.890: %SMART_LIC-3-AUTH_RENEW_FAILED: Authorization renewal with the Cisco Smart Software Manager or satellite : verify RESP fail
acdc-cbr8-2#event manager run sh_tech_rpd.tcl -r 10.8.17.12 -t basic -m 2 -c harddisk:/EEM/capture_other_rpd

May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:argv = -r 10.8.17.12 -t basic -m 2 -c harddisk:/EEM/capture_other_rpd
May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Setting tech level for 10.8.17.12 to BASIC
May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Additional command to capture in file harddisk:/EEM/capture_other_rpd
May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Number of command for show tech 2
May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Number of command from special file 1
May 9 14:15:19: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Number of command from special file 1
May 9 14:15:21: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 2497
May 9 14:15:22: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 22
May 9 14:15:36: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 33
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Captured enable prompt ==>R-PHY#<=====
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:collecting command 1 of 2
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Executing in rp : show logging error
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Catching read_patterm
May 9 14:15:38: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:pattern is R-PHY#
May 9 14:15:39: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 604
May 9 14:15:39: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 5182
May 9 14:15:39: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 5267
May 9 14:15:39: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 8719
May 9 14:15:39: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 9369
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-INFO:collecting command 2 of 2
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Executing in rp : show version
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:Catching read_patterm
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:pattern is R-PHY#
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 295
May 9 14:15:40: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 251
May 9 14:15:41: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 59
May 9 14:15:42: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 219
May 9 14:15:44: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 2497
May 9 14:15:45: %HA_EM-6-LOG: sh_tech_rpd.tcl: EEM-RPD-TECH-1.0-DEBUG:String length = 22
acdc-cbr8-2#

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: