cancel
Showing results for 
Search instead for 
Did you mean: 
cancel

Simple CMD Builder Script to do clear counters and then show interface

77
Views
0
Helpful
0
Comments
This document was generated from CDN thread

Created by: Dharmesh Shah on 13-09-2010 12:35:24 PM
Friends,
Basically you would want to do something like below via NV Cmd Builder Script




The IOS-XR syntax for it is

RP/0/RSP0/CPU0:testASR9006#clear counters TenGigE 0/0/0/0

Mon Sep 13 05:38:07.646 EDT

Clear "show interface" counters on this interface







Here is an illustration on how to use cmd builder scripts to do clear counters on IOS-XR v3.9.1






Create a BeanShell , Telnet Interface CMD Builder Script
The variables are
my_counter  Type Combo, Values Yes = 1 and No = 0, default = No

my_interface Type String


Then Create a Tab and include the above two variables
FInally paste this code in the script window









prompt="";



 if (my_counter.equals("1"))

{

    command = "clear counters "+my_interface;

    telnetInterface.config(prompt,command,true);



  prompt="#";

  command="";

    telnetInterface.config(prompt,command,true);

}


command="show interface "+my_interface;
telnetInterface.config("#", command, true);

Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.