cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
739
Views
0
Helpful
4
Replies

automate show command

mikegrous
Level 3
Level 3

So we have a very strange connectivity issue. To troubleshoot down i would like to have the outputs of "show arp" and the output of "show mac-address-table" before and after this connectivity issue happens. The connectivity issue doesnt last long so it is hard to get into the 2 core L3 switches and get this info in a quick enough time. Is there a way to automate this process so say the switch will send the output of those to commands to a tftp server or a syslog etc every say 10 minutes or something

4 Replies 4

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello Mike,

you need to use a specialized scripting language like TCL/TK with Expect that allows to automate login to device to send commands and to get output back.

see

http://www.activestate.com/activetcl/

http://expect.nist.gov/

Hope to help

Giuseppe

mattkaya56
Level 1
Level 1

eborcher
Level 1
Level 1

You could try to automate this with an EEM Applet. Show arp and show mac-address-table are executed every 10 minutes with the below script and the output is stored in your log buffer of your router. If you have syslog server setup then that output can be exported.

However, the caveat is that your log buffer might get filled quickly.

event manager applet test

event timer watchdog time 600

action 1.0 cli command "show arp"

action 2.0 syslog msg "$_cli_result"

action 3.0 cli command "show mac-address-table"

action 4.0 syslog msg "$_cli_result"

Thanks guys. I will give your ideas a shot when i have some time.

Review Cisco Networking products for a $25 gift card