Diagnosis-Netconf
此内容尚不支持你的语言。
Diagnosis
Section titled “Diagnosis”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /sdk-shell-enable | — | — | Y |
| show-diagnostic-information | — | — | Y |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage diagnosis tools on AsterNOS devices.
Enable sdk-shell
Section titled “Enable sdk-shell”Enable sdk-shell in debug mode.
Request example to enable sdk-shell in debug mode via rpc sdk-shell-enable
<sdk-shell-enable> <enable>true</enable></sdk-shell-enable>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4cba3f31-61e4-400a-ba1c-f7daff32ec01"> <ok/></rpc-reply>Disable sdk-shell
Section titled “Disable sdk-shell”Disable sdk-shell in debug mode.
Request example to disable sdk-shell in debug mode via rpc sdk-shell-enable
<sdk-shell-enable> <enable>false</enable></sdk-shell-enable>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:7b04a019-b101-42ef-8b89-bb9777103aa6"> <ok/></rpc-reply>Get diagnostic information
Section titled “Get diagnostic information”Retrieve diagnostic information and save it to the /var/dump directory. After Executing the rpc command, please wait for about 60 seconds. You can find the file sonic_dump_sonic_*.tar in the /var/dump directory.
Request example to retrieve diagnostic information via rpc show-diagnostic-information
<show-diagnostic-information/>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:d7e66a33-a219-4193-a3a8-e29236fef1c3"> <ok/></rpc-reply>Get diagnostic information from a specific time
Section titled “Get diagnostic information from a specific time”Retrieve diagnostic information from a specific time and save it to the /var/dump directory. After Executing the rpc command, please wait for about 60 seconds. You can find the file sonic_dump_sonic_*.tar in the /var/dump directory.
Request example to retrieve diagnostic information from a specific time via rpc show-diagnostic-information
<show-diagnostic-information> <start-date>2025-9-27</start-date></show-diagnostic-information>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:9a106f89-542c-4bc9-baf6-2b8e546daddd"> <ok/></rpc-reply>Get diagnostic information with a specified number of logs
Section titled “Get diagnostic information with a specified number of logs”Retrieve diagnostic information with a specified number of logs and save it to the /var/dump directory. After Executing the rpc command, please wait for about 60 seconds. You can find the file sonic_dump_sonic_*.tar in the /var/dump directory.
Request example to retrieve diagnostic information with a specified number of logs via rpc show-diagnostic-information
<show-diagnostic-information> <log-count>3</log-count></show-diagnostic-information>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:90ead5c6-f57f-4e14-b9b2-c65422997015"> <ok/></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Sdk Shell Enable
Section titled “Sdk Shell Enable”Tree Diagram
module: asternos-diagnosis
rpcs: +---x sdk-shell-enable +---w input +---w enable booleanTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| sdk-shell-enable | O | ||
| enable | M | ”true" "false” | If true, enable SDK shell. Otherwise, disable it. |
Show Diagnostic Information
Section titled “Show Diagnostic Information”Tree Diagram
module: asternos-diagnosis
rpcs: +---x show-diagnostic-information +---w input +---w start-date? string +---w log-count? uint32Table of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-diagnostic-information | O | ||
| start-date | O | string | The argument is a mostly free format human readable string such as ‘24 March’, ‘yesterday’, etc. |
| log-count | O | integer | Numbers of logs needed to be collected. |