cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2193
Views
0
Helpful
3
Replies

Copy command output to TFTP

Artur Akhmerov
Level 1
Level 1

Hello!

Can anyone suggest the correct syntax and is this possible? 

I have a lot of switches (over 500), and I am trying on each switch to execute the "show int status" command and save the output on tftp server with the name of the switch on which the command was executed.

The file is saved: 

"show interfaces status | redirect tftp://a.b.c.d/hostname.txt"

but hostname.txt - is static name that i write myself

what can i write here that woulde be dynamic ?

3 Replies 3

marce1000
Hall of Fame
Hall of Fame

 

         - This is not possible.

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

balaji.bandi
Hall of Fame
Hall of Fame

high level that should work, but depends on model and IOS running, each way is here.

 

Get CATTOOLS it automatically download or email all the details of each device.

 

https://www.solarwinds.com/kiwi-cattools

 

you can add devices using CVS format. it automatically generate required output.

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Joseph W. Doherty
Hall of Fame
Hall of Fame

The possible approaches come to mind.

First, have an EEM script run on the host that constructs the filename.  (Assume switches supports EEM.)

Second, have an external program access the device, either via scripted console (VTY) access or SNMP (although for this you'll need to construct OID variable into something readable.

Third, (unsure this is possible on a command line) determine if a banner variable might be used.