show cores
show cores
import requests
import json
"""
Modify these please
"""
url='http://<ip_address>:<port_number>/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 cores",
"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)
json_output = json.loads(output)["ins_api"]["outputs"]["output"]["body"]
print(json.dumps(json_output, indent=4, sort_keys=True))
{
"TABLE_cores": {
"ROW_cores": {
"instance": 1,
"module_id": 4,
"pid": "5233",
"process_name": "vni",
"sys_time": "2020-06-23 06:22:56"
}
}
}
<TABLE_cores>
<ROW_cores>
<module_id>4</module_id>
<instance>1</instance>
<process_name>vni</process_name>
<pid>5233</pid>
<sys_time>2020-06-23 06:22:56</sys_time>
</ROW_cores>
</TABLE_cores>
The show cores command displays all the cores available for uploading from an active supervisor.
For command descriptions, see the Cisco MDS 9000 Series Switches Command References.
Note: This sample output is generated for Cisco MDS 9000 Series NX-OS Release 8.4(2a) or later.
| CLI Output |
|---|
|
| Parameter | Description | Type |
|---|---|---|
| module_id | Module ID | Integer |
| instance | Instance number | Integer |
| pid | Process ID | String |
| process_name | Name of the process | String |
| sys_time | Core generate time (in 'yyyy'-'MM'-'dd' 'HH':'mm':'ss') | String |