• How to store and view previous contents of ‘show tech-support’

 
 
Print Friendly, PDF & Email

Introduction

Starting with EOS 4.8.1, Arista introduced a unique feature called CLI Scheduler. Besides helping with troubleshooting and debugging Arista switches, this feature is used in order to automatically save the last 100 outputs of show tech-support (taken every hour).

Please see an Arista EOS Manual for further details on the CLI Scheduler.

Scheduling a show tech-support command

The schedule command facilitates the periodic execution of a specified CLI command. Command parameters can be used in order to configure:

  • the interval between consecutive executions of the command
  • the maximum number of log files to be saved

Starting with 4.8.1, by default, the show tech-support command is run in the background every hour and the last 100 log files are zipped (using gzip) and saved in /mnt/flash/schedule. The scheduled command which is actually used is similar to:

Arista#schedule tech-support interval 60 max-log-files 100 command show tech-support

How to view the details of each scheduled CLI command?

To view a summary of the CLI Scheduler, use the following command:

Arista#show schedule summary 
Name              At time    Last       Inter\      Max     Logfile Location                   Status
                             time       val         log                                              
                             (mins)      files                                                
----------------- ---------- ---------- ----------- ------- ---------------------------------- ------ 
tech-support        now      22:06        60        100     flash:/schedule/tech-support/      Success

The above output shows that there is a schedule called tech-support, running every hour (interval 60 mins), which saves a maximum of 100 log files in the specified location; the last time the schedule ran was at 10:06pm.

To view the details of a specific schedule, use the following command:

Arista#show schedule tech-support 
The last CLI command execution was successful
CLI command "show tech-support" is scheduled next at "23:09:05 01/21/2014", interval is 60 min
Maximum of 100 log files will be stored
Verbose logging is off
100 log files currently stored in flash:/schedule/tech-support

Start time               Size         Filename                            
----------------------- ------------- ----------------------------------- 
Jan 21 2014 22:06       37.5 KB       tech-support_2014-01-21.2206.log.gz 
Jan 21 2014 21:06       36.8 KB       tech-support_2014-01-21.2106.log.gz 
Jan 21 2014 20:06       36.8 KB       tech-support_2014-01-21.2006.log.gz 
Jan 21 2014 19:06       36.9 KB       tech-support_2014-01-21.1906.log.gz 
Jan 21 2014 18:06       36.8 KB       tech-support_2014-01-21.1806.log.gz 
Jan 21 2014 17:06       36.7 KB       tech-support_2014-01-21.1706.log.gz 
Jan 21 2014 16:06       37.3 KB       tech-support_2014-01-21.1606.log.gz 
Jan 21 2014 15:06       37.4 KB       tech-support_2014-01-21.1506.log.gz 
Jan 21 2014 14:06       37.4 KB       tech-support_2014-01-21.1406.log.gz 
Jan 21 2014 13:06       37.3 KB       tech-support_2014-01-21.1306.log.gz 
....
(output truncated)

The latest files are listed at the top. Note that the last time the schedule was run was at 10.06am on January 21st (same as in the previous output).

Where to find the last 100 logs of show tech-support?

The files are located in directory on flash.  To view the contents of this directory use:

Arista#dir flash:/schedule/tech-support/
or
Arista#bash ls -ltr /mnt/flash/schedule/tech-support

To view the contents of each file, simply use the more command:

Arista#more flash:/schedule/tech-support/tech-support_2014-01-21.2206.log.gz

------------- show version detail -------------

Arista DCS-7048T-4S-R
Hardware version:    04.10
Deviations:          
Serial number:       JSH10530646
System MAC address:  001c.730c.c9a6

Software image version: 4.13.0-1583673.coboulder.1 (engineering build)
Architecture:           i386
Internal build version: 4.13.0-1583673.coboulder.1
Internal build ID:      a76635bd-0c64-42df-bf4c-31fd0d66eb2b

Uptime:                 13 hours and 6 minutes
Total memory:           1999008 kB
Free memory:            30376 kB

Installed software packages:

Package              Version         Release
--------------------------------------------
Aaa                  1.0.0           1583316.coboulderdev.1
......
(output truncated)

Why are all log files listed with a .gz extension?

In order to save space, the files are automatically zipped.  The more command automatically unzips the files and displays the output.

If you want to manually unzip the files, you can use zcat (linux command to unzip .gz extension files) and save the resulting files in flash:

Arista#bash zcat /mnt/flash/schedule/tech-support/tech-support_2014-01-21.2206.log.gz > /mnt/flash/tech-support_2014-01-21.2206.log

Now you can then either use the more CLI command or the Linux cat command to view the output of the log file:

Arista#bash cat /mnt/flash/tech-support_2014-01-21.2206.log
or
Arista#more flash:tech-support_2014-01-21.2206.log
     ------------- show version detail -------------

     Arista DCS-7048T-4S-R
     Hardware version:    04.10
     Deviations:          
     Serial number:       JSH10530646
     System MAC address:  001c.730c.c9a6

     Software image version: 4.13.0-1583673.coboulder.1 (engineering build)
     Architecture:           i386
     Internal build version: 4.13.0-1583673.coboulder.1
     Internal build ID:      a76635bd-0c64-42df-bf4c-31fd0d66eb2b

     Uptime:                 13 hours and 6 minutes
     Total memory:           1999008 kB
     Free memory:            30376 kB

     Installed software packages:

     Package              Version         Release
     --------------------------------------------
     Aaa                  1.0.0           1583316.coboulderdev.1
     ......
     (output truncated)

One of the many advantages of having these snapshots of the system is the ability to go back to when a problem occurred in the network (for example, to when an unwanted configuration change was made or a connectivity issue was detected) and be able to examine the state of the switch both prior to the event, and also after the event.


Follow

Get every new post on this blog delivered to your Inbox.

Join other followers: