show log chronological

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hi,

is it possible to set

show log

to always display entries in chronological order?
I mean without appending each time 'chronological' to the command.

thank you
--
antonio
Photo of Antonio Prado

Antonio Prado

  • 610 Points 500 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of Andrew Maldonado

Andrew Maldonado, Extreme Alumnus

  • 2,302 Points 2k badge 2x thumb
Antonio,

There does not appear to be a command to set the "show log" command to display logs in chronological order without specifying chronological in the show command.

-Andrew
Photo of Mel78, CISSP, ECE

Mel78, CISSP, ECE

  • 1,044 Points 1k badge 2x thumb
Use Scripting EXOS CLI Modules
http://www.extremenetworks.com/wp-content/uploads/2015/02/Python_Getting_Started_Guide.pdf

You can get anything you want. 
Photo of Antonio Prado

Antonio Prado

  • 610 Points 500 badge 2x thumb
Thank you for your reply.

Scripting should not be a solution for basic tasks.
Everywhere logs are exposed in chronological order with no need of switching words, simply because it's the logical way to go.
--
antonio
Photo of Lane, Mike

Lane, Mike, Employee

  • 904 Points 500 badge 2x thumb
I am not sure what would be simpler than "sh lo ch"  versus "sh lo".  In EXOS, there is no customization of default behavior of cli output, other than scripting.  That having been said, there is a simpler method if you are automating your output.

You can write whatever commands you choose in any way you choose in an .xsf file and then just run it.  This function only outputs to console by default.    

The python method is really quite simple as well.  Simply do:

   vi shloch.py
   i
   print exsh.clicmd('show log chronological', True)
   <esc>
   :wq
   run script shloch.py

and enjoy!
Photo of Brandon Clay

Brandon Clay, Escalation Support Engineer

  • 13,608 Points 10k badge 2x thumb
For anyone coming across this thread in the future, I've created a GTAC Knowledge article discussing this as well:

https://gtacknowledge.extremenetworks.com/articles/Q_A/Is-there-a-way-to-show-logs-in-chronological-...