cancel
Showing results for 
Search instead for 
Did you mean: 

EXOS: execute command several times and prompt output to CLI

EXOS: execute command several times and prompt output to CLI

M_Nees
Contributor III
In EOS (S-Series) i use sometimes these to execute a custom command several times and look at the output:

loop 10 1 -r
sh flowlimit stats tg.4.4;tg.1.4;tg.5.4(loop the following command for 10 times with a delay of 1 sec and refresh cursor at home position)

I am looking for a similar command or mechanism in current EXOS.
(I know for counters this is build in output mechanism in EXOS. I need it for custom commands beyond counters ...)

Regards,
Matthias
7 REPLIES 7

If deployment of the Python script to all the switches is an obstacle, then you could consider using JSON-RPC from some management station; this would allow you to push the script to any switch, which then gets executed on the switch and you then harvest the result in JSON format. You can even do this from XMC.
See https://github.com/extremenetworks/EXOS_Apps/tree/master/JSONRPC

Drew_C
Valued Contributor III
There's also the GitHub downloader, which has to be installed just the same. Once it's on the switch, it will make it easier to get other scripts.
https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/git_download

You can also use the download list function to add a few scripts next time you upgrade.
https://documentation.extremenetworks.com/exos_22.4/exos_21_1/software_upgrade_and_boot_options/c_do...

The functionality of watch.py is one that we'd like to get added as a permanent command in EXOS, so your feedback is helpful.

M_Nees
Contributor III
Hi Oscar,

that is what i am looking for!

code:
run script watch.py -i 5 "show ospf neighbor"

Because i have several changing customers / environments - working with python scripts is not optimal because i have to copy them on the switch before i can use it. If this will be a build in command like in EOS i will be much more useful in my case.

In last time a lot of useful commands build as a python script and provide via guthub. That is good for a fast help but the the best or final solution. I wish that some of them will be included in firmware image sometimes.

But many thanks for that useful reply.

Regards,
Matthias
GTM-P2G8KFN