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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show environment fan




Fan:
---------------------------------------------------------------------------
Fan             Model                Hw     Direction       Status
---------------------------------------------------------------------------
Fan1(sys_fan1)  NXA-FAN-30CFM-B      --     front-to-back   Ok 
Fan2(sys_fan2)  NXA-FAN-30CFM-B      --     front-to-back   Ok 
Fan3(sys_fan3)  NXA-FAN-30CFM-B      --     front-to-back   Ok 
Fan4(sys_fan4)  NXA-FAN-30CFM-F      --     back-to-front   Ok 
Fan_in_PS1      --                   --     front-to-back   Ok
Fan_in_PS2      --                   --     back-to-front   Ok
Fan Zone Speed: Zone 1: 0x7b
Fan Air Filter : NotSupported

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show environment power
Power Supply:
Voltage: 12 Volts
Power                      Actual             Actual        Total
Supply    Model            Output             Input      Capacity       Status
                           (Watts )           (Watts )     (Watts )
-------  ----------  ---------------  ------  ----------  --------------------
1        NXA-PAC-650W-PI        94 W              105 W       650 W      Ok
2        NXA-PAC-650W-PE        92 W              103 W       650 W      Ok


Power Usage Summary:
--------------------
Power Supply redundancy mode (configured)                PS-Redundant
Power Supply redundancy mode (operational)               PS-Redundant

Total Power Capacity (based on configured mode)             650.00 W
Total Grid-A (first half of PS slots) Power Capacity        650.00 W
Total Grid-B (second half of PS slots) Power Capacity       650.00 W
Total Power of all Inputs (cumulative)                     1300.00 W
Total Power Output (actual draw)                            186.00 W
Total Power Input (actual draw)                             208.00 W
Total Power Allocated (budget)                                N/A
Total Power Available for additional modules N/A

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show environment temperature
Temperature:
--------------------------------------------------------------------
Module   Sensor        MajorThresh   MinorThres   CurTemp     Status
                       (Celsius)     (Celsius)    (Celsius)
-------------------------------------------------------------------- 1 FRONT 70 42 32 Ok
1 BACK 80 70 42 Ok
1 CPU 90 80 49 Ok
1 Sugarbowl 100 90 64 Ok

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:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html

Note: This example was added in Cisco NX-OS Release 9.2(1).

CLI Output
Switch# show environment temperature  module 1
Temperature:
--------------------------------------------------------------------
Module   Sensor        MajorThresh   MinorThres   CurTemp     Status
                       (Celsius)     (Celsius)    (Celsius)
-------------------------------------------------------------------- 1 FRONT 70 42 32 Ok
1 BACK 80 70 42 Ok
1 CPU 90 80 49 Ok
1 Sugarbowl 100 90 64 Ok