show environment fan
show environment fan
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 environment fan",
"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 environment fan",
"msg": "Success",
"code": "200",
"body": {
"fandetails": {
"TABLE_faninfo": {
"ROW_faninfo": [
{
"fanname": "Fan1(sys_fan1)",
"fanmodel": "NXA-FAN-30CFM-B",
"fanhwver": "--",
"fandir": "front-to-back",
"fanstatus": "Ok"
},
{
"fanname": "Fan2(sys_fan2)",
"fanmodel": "NXA-FAN-30CFM-B",
"fanhwver": "--",
"fandir": "front-to-back",
"fanstatus": "Ok"
},
{
"fanname": "Fan3(sys_fan3)",
"fanmodel": "NXA-FAN-30CFM-B",
"fanhwver": "--",
"fandir": "front-to-back",
"fanstatus": "Ok"
},
{
"fanname": "Fan4(sys_fan4)",
"fanmodel": "NXA-FAN-30CFM-F",
"fanhwver": "--",
"fandir": "back-to-front",
"fanstatus": "Ok"
},
{
"fanname": "Fan_in_PS1",
"fanmodel": "--",
"fanhwver": "--",
"fandir": "front-to-back",
"fanstatus": "Ok"
},
{
"fanname": "Fan_in_PS2",
"fanmodel": "--",
"fanhwver": "--",
"fandir": "back-to-front",
"fanstatus": "Ok"
}
]
},
"TABLE_fan_zone_speed": {
"ROW_fan_zone_speed": {
"zone": "1",
"zonespeed": "0x7b"
}
},
"fan_filter_status": "NotSupported"
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show environment fan command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show environment power
show environment power
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 environment power",
"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 environment power",
"msg": "Success",
"code": "200",
"body": {
"powersup": {
"voltage_level": "12",
"TABLE_psinfo": {
"ROW_psinfo": [
{
"psnum": "1",
"psmodel": "NXA-PAC-650W-PI",
"actual_out": "94 W",
"actual_input": "105 W",
"tot_capa": "650 W",
"ps_status": "Ok"
},
{
"psnum": "2",
"psmodel": "NXA-PAC-650W-PE",
"actual_out": "93 W",
"actual_input": "104 W",
"tot_capa": "650 W",
"ps_status": "Ok"
}
]
},
"power_summary": {
"ps_redun_mode": "PS-Redundant",
"ps_oper_mode": "PS-Redundant",
"tot_pow_capacity": "650.00 W",
"tot_gridA_capacity": "650.00 W",
"tot_gridB_capacity": "650.00 W",
"cumulative_power": "1300.00 W",
"tot_pow_out_actual_draw": "187.00 W",
"tot_pow_input_actual_draw": "209.00 W",
"tot_pow_alloc_budgeted": "N/A",
"available_pow": "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 environment power command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show environment temperature
show environment temperature
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 environment temperature",
"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 environment temperature",
"msg": "Success",
"code": "200",
"body": {
"TABLE_tempinfo": {
"ROW_tempinfo": [
{
"tempmod": "1",
"sensor": "FRONT",
"majthres": "70",
"minthres": "42",
"curtemp": "32",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "BACK",
"majthres": "80",
"minthres": "70",
"curtemp": "42",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "CPU",
"majthres": "90",
"minthres": "80",
"curtemp": "49",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "Sugarbowl",
"majthres": "100",
"minthres": "90",
"curtemp": "64",
"alarmstatus": "Ok"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show environment temperature command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|
show environment temperature module 1
show environment temperature module 1
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 environment temperature module 1",
"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 environment temperature module 1",
"msg": "Success",
"code": "200",
"body": {
"TABLE_tempinfo": {
"ROW_tempinfo": [
{
"tempmod": "1",
"sensor": "FRONT",
"majthres": "70",
"minthres": "42",
"curtemp": "32",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "BACK",
"majthres": "80",
"minthres": "70",
"curtemp": "42",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "CPU",
"majthres": "90",
"minthres": "80",
"curtemp": "49",
"alarmstatus": "Ok"
},
{
"tempmod": "1",
"sensor": "Sugarbowl",
"majthres": "100",
"minthres": "90",
"curtemp": "64",
"alarmstatus": "Ok"
}
]
}
}
}
}
}
}
The CLI output example below corresponds to the payload example in the code pane on the right. For more information about the show environment temperature module 1 command, see the CLI command reference:
Note: This example was added in Cisco NX-OS Release 9.2(1).
CLI Output |
---|
|