Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Use counters to shutdown ports automatically

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).

Everyone's tags (3)
1 REPLY

I use ciscocmd to get the

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

 

304
Views
0
Helpful
1
Replies