show diagnostic content module all
show diagnostic content module all
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show diagnostic content module all",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show diagnostic content module all",
"msg": "Success",
"code": "200",
"body": {
"attr_descr": "Diagnostics test suite attributes: \nB/C/* - Bypass bootup level test / Complete bootup level test / NA \nP/* - Per port test / NA \nM/S/* - Only applicable to active / standby unit / NA \nD/N/* - Disruptive test / Non-disruptive test / NA \nH/O/* - Always enabled monitoring test / Conditionally enabled test / NA \nF/* - Fixed monitoring interval test / NA \nX/* - Not a health monitoring test / NA \nE/* - Sup to line card test / NA \nL/* - Exclusively run this test / NA \nT/* - Not an ondemand test / NA \nA/I/* - Monitoring is active / Monitoring is inactive / NA",
"TABLE_Module": {
"ROW_Module": {
"module_id": "1",
"module_type": "48x10GT + 6x40G/100G Ethernet Module (Active)",
"TABLE_test": {
"ROW_test": [
{
"test_id": "1",
"testname": "USB",
"test_attr": "C**N**X**T*",
"test_interval": "-NA-"
},
{
"test_id": "2",
"testname": "NVRAM",
"test_attr": "***N******A",
"test_interval": "00:05:00"
},
{
"test_id": "3",
"testname": "RealTimeClock",
"test_attr": "***N******A",
"test_interval": "00:05:00"
},
{
"test_id": "4",
"testname": "PrimaryBootROM",
"test_attr": "***N******A",
"test_interval": "00:30:00"
},
{
"test_id": "5",
"testname": "SecondaryBootROM",
"test_attr": "***N******A",
"test_interval": "00:30:00"
},
{
"test_id": "6",
"testname": "BootFlash",
"test_attr": "***N******A",
"test_interval": "00:30:00"
},
{
"test_id": "7",
"testname": "SystemMgmtBus",
"test_attr": "**MN******A",
"test_interval": "00:00:30"
},
{
"test_id": "8",
"testname": "OBFL",
"test_attr": "C**N**X**T*",
"test_interval": "-NA-"
},
{
"test_id": "9",
"testname": "ACT2",
"test_attr": "***N******A",
"test_interval": "00:30:00"
},
{
"test_id": "10",
"testname": "Console",
"test_attr": "***N******A",
"test_interval": "00:00:30"
},
{
"test_id": "11",
"testname": "FpgaRegTest",
"test_attr": "***N******A",
"test_interval": "00:00:30"
},
{
"test_id": "12",
"testname": "Mce",
"test_attr": "***N******A",
"test_interval": "01:00:00"
},
{
"test_id": "13",
"testname": "AsicMemory",
"test_attr": "C**D**X**T*",
"test_interval": "-NA-"
},
{
"test_id": "14",
"testname": "Pcie",
"test_attr": "C**N**X**T*",
"test_interval": "-NA-"
},
{
"test_id": "15",
"testname": "PortLoopback",
"test_attr": "*P*N**XE***",
"test_interval": "-NA-"
},
{
"test_id": "16",
"testname": "L2ACLRedirect",
"test_attr": "*P*N***E**A",
"test_interval": "00:01:00"
},
{
"test_id": "17",
"testname": "BootupPortLoopback",
"test_attr": "CP*N**XE*T*",
"test_interval": "-NA-"
}
]
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show diagnostic content module all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show diagnostic result module all
show diagnostic result module all
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show diagnostic result module all ",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show diagnostic result module all ",
"msg": "Success",
"code": "200",
"body": {
"TABLE_Module": {
"ROW_Module": {
"module_id": "1",
"curr_diag_level": "complete",
"module_name": "48x10GT + 6x40G/100G Ethernet Module (Active)",
"TABLE_Test": {
"ROW_Test": [
{
"test_id": "1",
"testname": "USB",
"testresult": "Pass"
},
{
"test_id": "2",
"testname": "NVRAM",
"testresult": "Pass"
},
{
"test_id": "3",
"testname": "RealTimeClock",
"testresult": "Pass"
},
{
"test_id": "4",
"testname": "PrimaryBootROM",
"testresult": "Pass"
},
{
"test_id": "5",
"testname": "SecondaryBootROM",
"testresult": "Pass"
},
{
"test_id": "6",
"testname": "BootFlash",
"testresult": "Pass"
},
{
"test_id": "7",
"testname": "SystemMgmtBus",
"testresult": "Pass"
},
{
"test_id": "8",
"testname": "OBFL",
"testresult": "Pass"
},
{
"test_id": "9",
"testname": "ACT2",
"testresult": "Pass"
},
{
"test_id": "10",
"testname": "Console",
"testresult": "Pass"
},
{
"test_id": "11",
"testname": "FpgaRegTest",
"testresult": "Pass"
},
{
"test_id": "12",
"testname": "Mce",
"testresult": "Pass"
},
{
"test_id": "13",
"testname": "AsicMemory",
"testresult": "Pass"
},
{
"test_id": "14",
"testname": "Pcie",
"testresult": "Pass"
},
{
"test_id": "15",
"testname": "PortLoopback",
"testresult": "Untested",
"passed_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"untested_ports": "1-216",
"aborted_ports": "none",
"err_disabled_ports": "none"
},
{
"test_id": "16",
"testname": "L2ACLRedirect",
"testresult": "Pass"
},
{
"test_id": "17",
"testname": "BootupPortLoopback",
"testresult": "Pass",
"passed_ports": "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189",
"failed_ports": "none",
"incomplete_ports": "none",
"untested_ports": "2-4,6-8,10-12,14-16,18-20,22-24,26-28,30-32,34-36,38-40,42-44,46-48,50-52,54-56,58-60,62-64,66-68,70-72,74-76,78-80,82-84,86-88,90-92,94-96,98-100,102-104,106-108,110-112,114-116,118-120,122-124,126-128,130-132,134-136,138-140,142-144,146-148,150-152,154-156,158-160,162-164,166-168,170-172,174-176,178-180,182-184,186-188,190-216",
"aborted_ports": "none",
"err_disabled_ports": "none"
}
]
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show diagnostic result module all command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show diagnostic result module all detail
show diagnostic result module all detail
import json
"""
Modify these please
"""
url='http://<IP_Address>/ins'
switchuser='<User_ID>'
switchpassword='<Password>'
myheaders={'content-type':'application/json'}
payload={
"ins_api":{
"version": "1.0",
"type": "cli_show",
"chunk": "0",
"sid": "1",
"input": "show diagnostic result module all detail",
"output_format": "json"
}
response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()
output = json.dumps(response, indent=4, sort_keys=True)
{
"ins_api": {
"type": "cli_show",
"version": "1.0",
"sid": "eoc",
"outputs": {
"output": {
"input": "show diagnostic result module all detail",
"msg": "Success",
"code": "200",
"body": {
"TABLE_Module": {
"ROW_Module": {
"module_id": "1",
"curr_diag_level": "complete",
"module_name": "48x10GT + 6x40G/100G Ethernet Module (Active)",
"bootup_diag_level": "complete",
"TABLE_Test": {
"ROW_Test": [
{
"test_id": "1",
"testname": "USB",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1",
"last_execution_time": "Wed Aug 29 21:10:47 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Wed Aug 29 21:10:47 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
},
{
"test_id": "2",
"testname": "NVRAM",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "249",
"last_execution_time": "Thu Aug 30 17:51:27 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:51:27 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:56:27 2018"
},
{
"test_id": "3",
"testname": "RealTimeClock",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "249",
"last_execution_time": "Thu Aug 30 17:51:27 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:51:31 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:56:31 2018"
},
{
"test_id": "4",
"testname": "PrimaryBootROM",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "42",
"last_execution_time": "Thu Aug 30 17:41:26 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:41:35 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 18:11:35 2018"
},
{
"test_id": "5",
"testname": "SecondaryBootROM",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "42",
"last_execution_time": "Thu Aug 30 17:41:26 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:41:45 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 18:11:45 2018"
},
{
"test_id": "6",
"testname": "BootFlash",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "42",
"last_execution_time": "Thu Aug 30 17:41:26 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:41:46 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 18:11:46 2018"
},
{
"test_id": "7",
"testname": "SystemMgmtBus",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "2485",
"last_execution_time": "Thu Aug 30 17:53:38 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:53:38 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:54:08 2018"
},
{
"test_id": "8",
"testname": "OBFL",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1",
"last_execution_time": "Wed Aug 29 21:10:47 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Wed Aug 29 21:10:47 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
},
{
"test_id": "9",
"testname": "ACT2",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "42",
"last_execution_time": "Thu Aug 30 17:41:26 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:41:46 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 18:11:46 2018"
},
{
"test_id": "10",
"testname": "Console",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "2485",
"last_execution_time": "Thu Aug 30 17:53:38 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:53:38 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:54:08 2018"
},
{
"test_id": "11",
"testname": "FpgaRegTest",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "2485",
"last_execution_time": "Thu Aug 30 17:53:38 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:53:38 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:54:08 2018"
},
{
"test_id": "12",
"testname": "Mce",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "21",
"last_execution_time": "Thu Aug 30 17:11:26 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:11:45 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 18:11:45 2018"
},
{
"test_id": "13",
"testname": "AsicMemory",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1",
"last_execution_time": "Wed Aug 29 21:11:17 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Wed Aug 29 21:11:17 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
},
{
"test_id": "14",
"testname": "Pcie",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1",
"last_execution_time": "Wed Aug 29 21:11:17 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Wed Aug 29 21:11:17 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
},
{
"test_id": "15",
"testname": "PortLoopback",
"testresult": "Untested",
"passed_ports": "none",
"failed_ports": "none",
"incomplete_ports": "none",
"untested_ports": "1-216",
"aborted_ports": "none",
"err_disabled_ports": "none",
"err_code": "DIAG TEST UNTESTED(SUCCESS)",
"total_run_count": "0",
"last_execution_time": "n/a",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "n/a",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
},
{
"test_id": "16",
"testname": "L2ACLRedirect",
"testresult": "Pass",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1243",
"last_execution_time": "Thu Aug 30 17:53:33 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Thu Aug 30 17:53:33 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "Thu Aug 30 17:54:33 2018"
},
{
"test_id": "17",
"testname": "BootupPortLoopback",
"testresult": "Pass",
"passed_ports": "1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189",
"failed_ports": "none",
"incomplete_ports": "none",
"untested_ports": "2-4,6-8,10-12,14-16,18-20,22-24,26-28,30-32,34-36,38-40,42-44,46-48,50-52,54-56,58-60,62-64,66-68,70-72,74-76,78-80,82-84,86-88,90-92,94-96,98-100,102-104,106-108,110-112,114-116,118-120,122-124,126-128,130-132,134-136,138-140,142-144,146-148,150-152,154-156,158-160,162-164,166-168,170-172,174-176,178-180,182-184,186-188,190-216",
"aborted_ports": "none",
"err_disabled_ports": "none",
"err_code": "DIAG TEST SUCCESS",
"total_run_count": "1",
"last_execution_time": "Wed Aug 29 21:11:22 2018",
"first_failure_time": "n/a",
"last_failure_time": "n/a",
"last_pass_time": "Wed Aug 29 21:11:25 2018",
"total_fail_count": "0",
"consequtive_fail_count": "0",
"last_fail_reason": "No failures yet",
"next_execution_time": "n/a"
}
]
}
}
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show diagnostic result module all detail command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|