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

Use counters to shutdown ports automatically

pranav312
Level 1
Level 1

Hello All,

We are shuting switch ports, whose counters showing no value. Is there any way to automate this. We have Ciscoworks to automate things, but I couldnt find any thing there.

I was looking in Cisco IOS commands. I could not find anythign to pipe the commands (show inter counters | shutdown particular port).

1 Reply 1

I use ciscocmd to get the "show int" output into FILE and then run 

egrep -A 20 "is down," FILE | egrep "is down|Last input"  | 

egrep -B 1 never | grep -v never |

awk '{print "int " $1 "\v shut" }' > FILE.cmd

 

this products a file of 

 

int GigabitEthernet1/1
                       shut
int GigabitEthernet1/2
                       shut
int GigabitEthernet1/7
                       shut
int GigabitEthernet1/12
                        shut

 

and I can then push it back

 

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: