Skip to content

Commit 95fd12b

Browse files
authored
[Mellanox][Smartswitch]Added dpu status output (#4014)
<!-- Please make sure you've read and understood our contributing guidelines: https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md failure_prs.log skip_prs.log Make sure all your commits include a signature generated with `git commit -s` ** If this is a bug fix, make sure your description includes "closes #xxxx", "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related issue when the PR is merged. If you are adding/modifying/removing any command or utility script, please also make sure to add/modify/remove any unit tests from the tests directory as appropriate. If you are modifying or removing an existing 'show', 'config' or 'sonic-clear' subcommand, or you are adding a new subcommand, please make sure you also update the Command Line Reference Guide (doc/Command-Reference.md) to reflect your changes. Please provide the following information: --> #### What I did Add output for `dpuctl dpu-status` for mellanox specific smartswitch devices in the generate_dump command #### How I did it Add `save_cmd` output for `dpuctl dpu-status` it will be written to `dpu_status` file as part of the dump #### How to verify it Generate dump using `show techsupport` command and checked the output to see if the `dpu_status` file is created #### Previous command output (if the output of a command-line utility has changed) #### New command output (if the output of a command-line utility has changed)
1 parent 070aae0 commit 95fd12b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/generate_dump

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,7 @@ collect_mellanox() {
13431343
local platform=$(python3 -c "from sonic_py_common import device_info; print(device_info.get_platform())")
13441344
local platform_folder="/usr/share/sonic/device/${platform}"
13451345
local hwsku=$(python3 -c "from sonic_py_common import device_info; print(device_info.get_hwsku())")
1346+
local is_smartswitch=$(python3 -c "from sonic_py_common import device_info; print(device_info.is_smartswitch())")
13461347
local sku_folder="/usr/share/sonic/device/${platform}/${hwsku}"
13471348
local cmis_host_mgmt_files=(
13481349
"/tmp/nv-syncd-shared/sai.profile"
@@ -1404,6 +1405,9 @@ collect_mellanox() {
14041405
fi
14051406

14061407
save_cmd "get_component_versions.py" "component_versions"
1408+
if [[ $is_smartswitch == "True" ]]; then
1409+
save_cmd "dpuctl dpu-status" "dpu_status"
1410+
fi
14071411

14081412
# Save CMIS-host-management related files
14091413
local cmis_host_mgmt_path="cmis-host-mgmt"

0 commit comments

Comments
 (0)