Skip to content

Allow show techsupport to save with a custom filename#4504

Open
donggyu-nexthop wants to merge 4 commits into
sonic-net:masterfrom
nexthop-ai:allow-show-techsupport-to-save-with
Open

Allow show techsupport to save with a custom filename#4504
donggyu-nexthop wants to merge 4 commits into
sonic-net:masterfrom
nexthop-ai:allow-show-techsupport-to-save-with

Conversation

@donggyu-nexthop
Copy link
Copy Markdown

What I did

fixes #4503
added the ability to specify custom techsupport dump filenames

How I did it

  • Added support for an optional -f/--filename flag for show techsupport.
  • updated generate_dump script to take in the same flag

In the event of filename collisions, generate_dump will log the warning to stdout, and exit with code 1 without overwriting.

How to verify it

on a DUT:

show techsupport -f testdump

# verify the dump appeared
ls -l /var/dump | grep testdump

Previous command output (if the output of a command-line utility has changed)

The --filename flag wasn't supported before this PR, so the command would error out.

New command output (if the output of a command-line utility has changed)

$ show techsupport -f testdump
Lock successfully acquired and installed signal handlers
mkdir: created directory '/var/dump/testdump'
'/var/dump/testdump/generate_dump' -> '/usr/local/bin/generate_dump'

...

Cleaning up working directory /var/dump/testdump
Removing lock. Exit: 0
removed '/tmp/techsupport-lock/PID'
removed directory '/tmp/techsupport-lock'
/var/dump/testdump.tar.gz

Signed-off-by: donggyu-nexthop <donggyu@nexthop.ai>
Signed-off-by: Donggyu Kim <donggyu@nexthop.ai>
Signed-off-by: Donggyu Kim <donggyu@nexthop.ai>
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Signed-off-by: Donggyu Kim <donggyu@nexthop.ai>
@donggyu-nexthop donggyu-nexthop force-pushed the allow-show-techsupport-to-save-with branch from ca2df16 to 56eb860 Compare April 29, 2026 00:48
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow show techsupport to save with a custom filename

2 participants