Aruba & ProVision-based
1748181 Members
3741 Online
108759 Solutions
New Discussion юеВ

Help needed in installing a script file on the switch

 
Ramzah_Rehman
Advisor

Help needed in installing a script file on the switch

Dear team,

There are certian commands I need to repeatedly run on switch CLI. I am thinking about creating a script file with those commands and installing it on the switch. I have an Aruba 2930F switch. Please guide me on how I can do this task.

4 REPLIES 4
Emil_G
HPE Pro

Re: Help needed in installing a script file on the switch

Hello, 

Please review this document which describes how you can use the show tech custom feature.

https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c02597268

It allows you to upload a text file which contains the commands that should be run . After this is done, this commands will be run every time you enter the command "show tech custom"

And if you want to run "show tech custom" repeatedly there is the "repeat" command which allows you to repeat a certain command. Here an example on how it works

Run the command you want to be repeated, for example show tech custom. Here there is no output because I didnt install a text file.

Aruba-VSF-2930F# show tech custom
Cmd Info : show tech Custom
No SHOW-TECH file found.

Run show history to view the index of the command
Aruba-VSF-2930F# show history
6 walkmib ifdescr
5 show rmon statistics 2/25
4 show interface 2/25
3 show interface 2/25 hc
2 exit
1 show tech custom

The index of show tech custom is 1 because this is the last command

Here is the syntax of repeat


Aruba-VSF-2930F# repeat ?
CMDLIST The command number to repeat.
count The number of times to repeat the command.
delay The delay in seconds between command repeats.
<cr>

Here is an example on how to repeat the command 20 times every 3 seconds

Aruba-VSF-2930F# repeat 1 count 20 delay 3

I am not aware of any way to use any other script on the switch. It may be possible to run a script with commands from an external device.

 

I am an HPE employee

Accept or Kudo


Emil_G
HPE Pro

Re: Help needed in installing a script file on the switch

One additional information which may be unrelated to the main topic. If you want to repeat commands in order to check how interface counters develop in real time, you can use the command "show interface display"

Once it is run you are presented with a list of all ports and a menu which allows you to navigate with arrow keys. Select a port a click on Show Details to see detailed statistics for this port.

I am an HPE employee

Accept or Kudo


Ramzah_Rehman
Advisor

Re: Help needed in installing a script file on the switch

Thanks a lot for the detailed answer. I checked the repeat command, turns out I can give a delay of 1 second minimum between commands. I am looking for getting stats at millisecond or microsecond granularity on the switch and being able to save them in a file that I can later get from the switch for analysis. Do you think anything of this sort is possible? 

I found an option of USB autorun in the "Aruba 2930F / 2930M Management and
Configuration Guide for ArubaOSSwitch 16.05" documentation. It saves the result file in the USB automatically. Unfortunately, after checking the 2930F switch I did not find any USB port. There's a micro USB port but it's for the console. So, I cannot use autorun in my switch.

Do you think anything similar to USB autorun is available in 2930F? Thanks again for all the help and support.

Emil_G
HPE Pro

Re: Help needed in installing a script file on the switch

Hello, 

Sorry, I didnt think of USB autorun. You are correct that 2930F dont have USB ports. The feature is available in the OS but without USB port it shouldnt be working. I am not aware of any way to use it via another medium. At the moment I also cannot think of any other way to automatically run commands. 

Anyone else has an idea, please feel free to share!

I am an HPE employee

Accept or Kudo