Header Only - DO NOT REMOVE - Extreme Networks

EXOS: execute command several times and prompt output to CLI


Userlevel 6
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[/code](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

Userlevel 6
Maybe this python script can help ?

https://github.com/extremenetworks/ExtremeScripting/tree/master/EXOS/Python/watch
Userlevel 6
Hi Oscar,

that is what i am looking for!

code:
run script watch.py -i 5 "show ospf neighbor"
[/code]
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
Userlevel 7
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.
Userlevel 2
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

Userlevel 7
Following Ludo comment (which requires EXOS 21.1+), you could also consider Extreme Management Center (XMC) to do the job, if you have it. Since 8.0.4 it supports Python scripting, so you could have your script on XMC and run it from there.

I see a potential to automate all of that with coming XMC 8.1.
Userlevel 6
Hi Drew,

thanks for your advice with download url and *.lst file! It works fine and i am able to distribute very fast useful python scripts to my switches.

I use XMC for providing this couple of files:

SW-TEST.28 # download url http://netsight/Clients/scripts.lst vr VR-Default
Downloading http://10.1.1.200/Clients/scripts.lst
Downloading http://10.1.1.200/Clients/flowtrack.py
Downloading http://10.1.1.200/Clients/mlag_config_check.py
Downloading http://10.1.1.200/Clients/conf_diff.py
Downloading http://10.1.1.200/Clients/watch.py
SW-TEST.28 # [/code]Thanks
Userlevel 7
Glad that worked for you, Matthias!

Reply