cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1782
Views
20
Helpful
6
Replies

5520 wireless controller command's output to a file and then ftp

lpalpac
Level 1
Level 1

Hello,

i have the following problem:

 

on a 5520 WLC i can execute the following command from the CLI

show netuser summary

 

is there a way to save the output (say output.txt) of this command to a file on the 5520 filesystem and then

use transfer upload and specify output.txt as the source and transmit that over sftp to a remote server?

 

could someone give me a complete example of the command sequence that would do that?

 

and then:

 

is there a way, a command, for the 5520 to view the content of a file? something  like a unix cat?

and a command to delete a specific file?

 

thank you everybody

 

6 Replies 6

Leo Laohoo
Hall of Fame
Hall of Fame

@lpalpac wrote:

is there a way to save the output (say output.txt) of this command to a file on the 5520 filesystem and then

use transfer upload and specify output.txt as the source and transmit that over sftp to a remote server?


Why not just log the session?

Hi !

because the next step would be to automate the task, running it each day at a certain hour..

 

 - Standard methodologies would imply, a syslog-server for general logging purposes, and the value(s) you are looking for, try if they can be fetched or are supported in any of the snmp  MIBS.

 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! '


@lpalpac wrote:

because the next step would be to automate the task, running it each day at a certain hour..


SNMP and/or API 

marce1000
VIP
VIP

 

 - These items or questions are generally not possible, note that AireOS is not Unix or Linux. You could use operator-terminal tools such as Putty , which can usually save a session or from a Linux, you can first type % script my_controller_log.txt , then connect to the controller.

 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! '

and another option "ssh 5520wlc | tee mysavedoutput.txt"

that logs your entire ssh session to file.

You can then use script to extract the part you're looking for from the file.

Like the others have said AireOS was not designed to do what you want to do.  It doesn't provide user access to the file system.

Review Cisco Networking for a $25 gift card