DELL Networking SONiC How to generate and collect Tech-support
Summary: This article explains how to generate and collect tech-support in Dell Networking SONiC Version 4.0 and above.
Instructions
Index
What is tech-support File?
Command Syntax
How to generate tech-support file in Dell SONiC
How to track tech-support file generation status
How to retrieve tech-support File From the Switch
FTP
HTTP
USB
SCP Client application
Tech-support file name and format
How to restrict the old entries and reduce the size of tech-support File
Delete old tech-support file to save space.
What is tech-support File
Tech-support file is a compressed archive file consisting of information about the state of the Switch like Syslog, database state, core dump, and so on. Dell Technical support agents need a tech-support file for detailed analysis of an event.
- The tech-support file is a compressed file and is saved in /var/dump. The content of this folder can be viewed by using command:
dir tech-support:/
- Tech-support file has .tar.gz extension
- Tech-support file may take more than 15-30 Minutes to generate.
- The file size varies depending on the data and time duration of log samples. To reduce size, we can use "since" option
- If possible try to generate a Tech-support file in the problem state
Command Syntax
| COMMAND | EXPLANATION |
|---|---|
admin@sonic:~$ sonic-cli |
Enter Dell Sonic |
sonic# show tech-support |
Generate a tech-support file. |
sonic# show tech-support status |
Show tech-support file generation status |
sonic# dir tech-support:/ |
Show the content of the /var/dump directory where the tech-support file is generated. |
sonic# copy tech-support://<filename> ftp/home/http/scp/usb://<filename> |
Copy a tech-support file to a remote location using ftp, http, scp protocol, or an usb or home directory |
Optional
| COMMAND | EXPLANATION |
|---|---|
sonic# show tech-support since <date/time> |
Generate a tech-support file from a date and time. Click here for more info. |
sonic# delete tech-support:/ <filename> |
Delete old tech-support file. This saves flash space. |
How to generate tech-support file in Dell SONiC
Use "show tech-support" command to generate a tech-support file.
Example
admin@DELLSONiC:~$ sonic-cli DELLSONiC# DELLSONiC# show tech-support %Info: Tech-support process started, please check "show tech-support status" for tech-support progress DELLSONiC#
How to track tech-support file generation status
Use "show tech-support status" command to stack the status of tech-support file generation. The output shows Status: Completed when file generation is completed.
Use "dir tech-support:/" command to see the content of the /var/tmp folder. The tech-support file is generated in this folder.
Bellow is a sample output of "show tech-support status"and "dir tech-support:/"
During tech-support file generation:
DELLSONiC# show tech-support status Status: In Progress (Collecting Counters-1) Total items collected: 12
DELLSONiC# dir tech-support:/ ------------------------------------------------------------------------- Date(Last Modified) Size(Bytes) Type Filename ------------------------------------------------------------------------- 2023-04-15 20:21 4096 d sonic_dump_DELLSONiC_20230415_202048 2023-04-15 20:22 11100160 - sonic_dump_DELLSONiC_20230415_202048.tar
After tech-support file generation is successfully completed.
DELLSONiC# show tech-support status Status: Completed File Name: /var/dump/sonic_dump_DELLSONiC_20230415_202048.tar.gz
DELLSONiC# dir tech-support:/ ------------------------------------------------------------------------- Date(Last Modified) Size(Bytes) Type Filename ------------------------------------------------------------------------- 2023-04-15 20:27 252932846 - sonic_dump_DELLSONiC_20230415_202048.tar.gz
How to retrieve tech-support file from the switch
Use "copy tech-support://<tech-support filename> <destination>//<filename>" command to copy the tech-support file to home directory or usb or remote ftp/http/scp server.
Below are the destination options available and their usage.
- ftp: Copy to remote FTP server (ftp://userid:passwd@hostip/filepath)
- home: Copy to home directory (home://filename)
- http: Copy to remote HTTP server (http://hostip/filepath)
- scp: Copy to remote SCP server (scp://userid:passwd@hostip/filepath)
- usb: Copy to usb media directory (usb://filename)
We would explain the options below with an example.
FTP
For copying a file to a remote FTP server, use following syntax.
copy techsupport://<techsupport file.tag.gz> ftp://userid:passwd@hostip/filepath
Consider we are copying the tech-support file to a remote FTP server with IP 10.0.0.1, username: TEST and password PASS
Sample Out
DELLSONiC# copy tech-support://sonic_dump_DELLSONiC_20230415_202048.tar.gz ftp://TEST:PASS@10.0.0.1/sonic_dump_DELLSONiC_20230415_202048.tar.gz
HTTP
For copying a file to a remote HTTP server, use following syntax.
copy techsupport://<techsupport file.tag.gz> http://hostip/filepath
Consider we are copying the tech-support file to a remote HTTP server with IP 10.0.0.1.
Sample Out
DELLSONiC# copy tech-support://sonic_dump_DELLSONiC_20230415_202048.tar.gz http://10.0.0.1/sonic_dump_DELLSONiC_20230415_202048.tar.gz
USB
For using USB on a DELL SONiC in a Networking switch, we must ensure that the usb enable command is configured. By default usb is disabled.
Run the usb mount command after inserting usb into the switch.
Dell Networking SONiC How to mount and unmount USB
Sample Out
sonic# sonic# configure terminal sonic(config)# usb enable sonic(config)# exit sonic# usb mount DELLSONiC# copy tech-support://sonic_dump_DELLSONiC_20230415_202048.tar.gz usb://sonic_dump_DELLSONiC_20230415_202048.tar.gz
SCP Client application
You may use any SCP client applications to extract tech-support file in the switch.
Use Switch login credentials in the SCP client application to log in to switch. The tech-support file is located in Directory /var/dump/.
Some SCP client applications have a graphical interface which makes it even easier to copy a file from switch /var/dump/ to a location in your local machine.
Tech-support file name and format
The tech-support file has a name in format "sonic_dump_<Hostname>_ _YYYYMMDD_HHMMSS.tar.gz"
*YYYYMMDD_HHMMSS is Year Month Day _ Hour Minute Second. This is the time of tech-support file generation.
For example, "sonic_dump_DELLSONiC_20230415_202048.tar.gz" is the generated tech-support file. Here, YYYYMMDD_HHMMSS is 20230415_202048, and DELLSONiC is the hostname of the switch.
How to restrict the old entries and reduce Size of tech-support File
The tech-support file may be a large file based on the switch uptime. In Dell SONiC, we can reduce the size of the tech by limiting the logging duration.
Use "show tech-support since <date/time>" command to capture tech-support from a particular time.
Sample Out
DELLSONiC# show tech-support since "2023-04-14T12:30:30Z" %Info: Tech-support process started, please check "show tech-support status" for tech-support progress
It is recommended to capture up to the 0 hour of the day before for any possible preemptive actions before the event.
Sample Out
DELLSONiC# show tech-support since "2023-04-14T00:00:00Z" %Info: Tech-support process started, please check "show tech-support status" for tech-support progress
Command Syntax
| Command | Explanation |
|---|---|
sonic# show tech-support since <date/time> |
Below is the format for date/time. "YYYY-MM-DDTHH:MM:SS[.ddd…]Z" or "YYYY-MM-DDTHH:MM:SS[.ddd…]+hh:mm" or "YYYY-MM-DDTHH:MM:SS[.ddd…]-hh:mm" Where: YYYY = year, MM = month, DD = day, T (required before time), HH = hours, MM = minutes, SS = seconds, (optional) .ddd… = decimal fraction of a second (for example ".323") Z indicates a zero offset from local time. +/- hh:mm indicates hour:minute offset from local time. |
Delete old tech-support file to save space
We can safely delete tech-support file in the dump folder after extracting the file from the switch.
Use the command "delete tech-support:/ <techsupport file.tar.gz>" to delete the tech-support file.
Sample Out
DELLSONiC# delete tech-support:/ sonic_dump_DELLSONiC_20230415_202048.tar.gz Proceed to delete tech-support:/sonic_dump_DELLSONiC_20230415_202048.tar.gz? [y/N]:y
Use the command "dir tech-support:/" to verify if the file is deleted.
Sample Out
DELLSONiC# dir tech-support:/ ------------------------------------------------------------------------- Date(Last Modified) Size(Bytes) Type Filename -------------------------------------------------------------------------