Querying the Environment Settings

Querying the Environment Settings
GET http://<IP_Address>/api/mo/sys/ch/ftslot-1.json 

For the fan:
  

{
    "totalCount": "1",
    "imdata": [
        {
            "eqptFtSlot": {
                "attributes": {
                    "childAction": "",
                    "descr": "Fan Slot",
                    "dn": "sys/ch/ftslot-1",
                    "id": "1",
                    "loc": "rear",
                    "modTs": "2000-01-22T22:53:20.975+00:00",
                    "monPolDn": "",
                    "operSt": "inserted",
                    "persistentOnReload": "false",
                    "physId": "1",
                    "status": "",
                    "type": "fantray"
                }
            }
        }
    ]
}
 
GET: http://<IP_Address>/api/mo/sys/ch/ftslot-1/ft.json
 
Response:
{
    "totalCount": "1",
    "imdata": [
        {
            "eqptFt": {
                "attributes": {
                    "childAction": "",
                    "descr": "NXA-FAN-30CFM-B-1",
                    "dn": "sys/ch/ftslot-1/ft",
                    "fanName": "NXA-FAN-30CFM-B-1",
                    "hwVer": "V01",
                    "id": "1",
                    "mfgTm": "not-applicable",
                    "modTs": "2000-01-22T22:53:20.975+00:00",
                    "model": "NXA-FAN-30CFM-B",
                    "monPolDn": "",
                    "operSt": "absent",
                    "persistentOnReload": "false",
                    "rev": "",
                    "ser": "",
                    "status": "",
                    "vendor": ""
                }
            }
        }
    ]
}
 
For power:
 
GET: http://<IP_Address>/api/mo/sys/ops/psgp.json
 
Response:
 
{
    "totalCount": "1",
    "imdata": [
        {
            "eqptPsgP": {
                "attributes": {
                    "acRdnCap": "9166",
                    "adminRdnM": "ps-rdn",
                    "alPwr": "0",
                    "avPwr": "9166",
                    "childAction": "",
                    "descr": "",
                    "dn": "sys/ops/psgp",
                    "flRdnCap": "0",
                    "grdRdnCap": "0",
                    "modTs": "2000-01-18T20:10:29.576+00:00",
                    "monPolDn": "",
                    "nRdnCap": "18332",
                    "name": "",
                    "operRdnM": "comb",
                    "persistentOnReload": "true",
                    "psRdnCap": "9166",
                    "rsdPwr": "0",
                    "status": "",
                    "tc": "9166",
                    "uid": "0"
                }
            }
        }
    ]
}
 
Request:

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get>
    <filter>
      <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
        <ch-items>
          <ftslot-items/>
        </ch-items>
      </System>
    </filter>
  </get>
</rpc>

Response:
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:54474711-5301-4a65-bac5-dcbab9397654">
    <data>
        <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
            <ch-items>
                <ftslot-items>
                    <FtSlot-list>
                        <id>4</id>
                        <descr>Fan Slot</descr>
                        <ft-items>
                            <descr>NXA-FAN-30CFM-B-4</descr>
                            <fan-items>
                                <Fan-list>
                                    <id>1</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>46</speedInPercent>
                                    <speedInRpm>7161</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                                <Fan-list>
                                    <id>2</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>47</speedInPercent>
                                   <speedInRpm>5341</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                            </fan-items>
                            <fanName>NXA-FAN-30CFM-B-4</fanName>
                            <hwVer>1.0</hwVer>
                            <id>4</id>
                            <mfgTm>not-applicable</mfgTm>
                            <model>NXA-FAN-30CFM-B</model>
                            <operSt>ok</operSt>
                            <rev/>
                            <ser/>
                            <vdrId>V01</vdrId>
                            <vendor/>
                        </ft-items>
                        <loc>rear</loc>
                        <operSt>inserted</operSt>
                        <physId>4</physId>
                        <type>fantray</type>
                    </FtSlot-list>
                    <FtSlot-list>
                        <id>3</id>
                        <descr>Fan Slot</descr>
                        <ft-items>
                            <descr>NXA-FAN-30CFM-B-3</descr>
                            <fan-items>
                                <Fan-list>
                                    <id>1</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>46</speedInPercent>
                                    <speedInRpm>7133</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                                <Fan-list>
                                    <id>2</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                   <rev/>
                                    <ser/>
                                    <speedInPercent>46</speedInPercent>
                                    <speedInRpm>5309</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                            </fan-items>
                            <fanName>NXA-FAN-30CFM-B-3</fanName>
                            <hwVer>1.0</hwVer>
                            <id>3</id>
                            <mfgTm>not-applicable</mfgTm>
                            <model>NXA-FAN-30CFM-B</model>
                            <operSt>ok</operSt>
                            <rev/>
                            <ser/>
                            <vdrId>V01</vdrId>
                            <vendor/>
                        </ft-items>
                        <loc>rear</loc>
                        <operSt>inserted</operSt>
                        <physId>3</physId>
                        <type>fantray</type>
                    </FtSlot-list>
                    <FtSlot-list>
                        <id>2</id>
                        <descr>Fan Slot</descr>
                        <ft-items>
                            <descr>NXA-FAN-30CFM-B-2</descr>
                            <fan-items>
                                <Fan-list>
                                    <id>1</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>46</speedInPercent>
                                    <speedInRpm>7180</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                                <Fan-list>
                                    <id>2</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>47</speedInPercent>
                                    <speedInRpm>5314</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                            </fan-items>
                            <fanName>NXA-FAN-30CFM-B-2</fanName>
                            <hwVer>1.0</hwVer>
                            <id>2</id>
                            <mfgTm>not-applicable</mfgTm>
                            <model>NXA-FAN-30CFM-B</model>
                            <operSt>ok</operSt>
                            <rev/>
                            <ser/>
                            <vdrId>V01</vdrId>
                            <vendor/>
                        </ft-items>
                        <loc>rear</loc>
                        <operSt>inserted</operSt>
                        <physId>2</physId>
                        <type>fantray</type>
                    </FtSlot-list>
                    <FtSlot-list>
                        <id>1</id>
                        <descr>Fan Slot</descr>
                        <ft-items>
                            <descr>NXA-FAN-30CFM-B-1</descr>
                            <fan-items>
                                <Fan-list>
                                    <id>1</id>
                                    <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>45</speedInPercent>
                                    <speedInRpm>6949</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                                <Fan-list>
                                    <id>2</id>
                                   <descr>fan</descr>
                                    <dir>front2back</dir>
                                    <mfgTm>not-applicable</mfgTm>
                                    <model>NXA-FAN-30CFM-B</model>
                                    <operSt>ok</operSt>
                                    <rev/>
                                    <ser/>
                                    <speedInPercent>46</speedInPercent>
                                    <speedInRpm>5242</speedInRpm>
                                    <vendor>Cisco</vendor>
                                </Fan-list>
                            </fan-items>
                            <fanName>NXA-FAN-30CFM-B-1</fanName>
                            <hwVer>1.0</hwVer>
                            <id>1</id>
                            <mfgTm>not-applicable</mfgTm>
                            <model>NXA-FAN-30CFM-B</model>
                            <operSt>ok</operSt>
                            <rev/>
                            <ser/>
                            <vdrId>V01</vdrId>
                            <vendor/>
                        </ft-items>
                        <loc>rear</loc>
                        <operSt>inserted</operSt>
                        <physId>1</physId>
                        <type>fantray</type>
                    </FtSlot-list>
                </ftslot-items>
            </ch-items>
        </System>
    </data>
</rpc-reply>

Request:

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get>
    <filter>
      <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
        <ops-items>
          <psgp-items/>
        </ops-items>
      </System>
    </filter>
  </get>
</rpc>

Response:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:84640f21-c4f2-4df2-b4d2-a213e82c0c88">
    <data>
        <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
            <ops-items>
                <psgp-items>
                    <acRdnCap>649</acRdnCap>
                    <adminRdnM>ps-rdn</adminRdnM>
                    <alPwr>0</alPwr>
                    <avPwr>649</avPwr>
                    <flRdnCap>0</flRdnCap>
                    <grdRdnCap>0</grdRdnCap>
                    <nRdnCap>649</nRdnCap>
                    <operRdnM>comb</operRdnM>
                    <psRdnCap>649</psRdnCap>
                    <rsdPwr>0</rsdPwr>
                    <rspsuInstPolCons-items>
                        <tCl>psuInstPol</tCl>
                        <tDn>UNRES:uni/fabric/psuInstP-default</tDn>
                    </rspsuInstPolCons-items>
                    <tc>649</tc>
                    <unit>W</unit>
                </psgp-items>
            </ops-items>
        </System>
    </data>
</rpc-reply>

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

CLI Output
Switch# show environment 

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-B      --     front-to-back   Ok
Fan_in_PS1      --                   --     front-to-back   Ok
Fan_in_PS2      --                   --     front-to-back   Shutdown
Fan Zone Speed: Zone 1: 0x80
Fan Air Filter : NotSupported


Power Supply:
Voltage: 12 Volts
Power                      Actual             Actual        Total
Supply    Model            Output             Input      Capacity       Status
                           (Watts )           (Watts )     (Watts )
-------  ----------  ---------------  ------  ----------  --------------------
1        NXA-PAC-650W-PI       151 W              166 W       650 W      Ok
2        NXA-PAC-650W-PI         0 W                0 W         0 W   Shutdown


Power Usage Summary:
--------------------
Power Supply redundancy mode (configured)                PS-Redundant
Power Supply redundancy mode (operational)               Non-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         0.00 W
Total Power of all Inputs (cumulative)                      650.00 W
Total Power Output (actual draw)                            151.00 W
Total Power Input (actual draw)                             166.00 W
Total Power Allocated (budget)                                N/A
Total Power Available for additional modules                  N/A



Temperature:
--------------------------------------------------------------------
Module   Sensor        MajorThresh   MinorThres   CurTemp     Status
                       (Celsius)     (Celsius)    (Celsius)
--------------------------------------------------------------------
1        FRONT           70              42          28         Ok
1        BACK            80              70          32         Ok
1        CPU             90              80          50         Ok
1        Homewood        110             90          52         Ok

Note: The property information for this example was added in Release 9.3(3).


eqptFtSlot Properties

The following table contains information about the eqptFtSlot properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

Property NameData TypeDescriptionValues
childAction
mo:ModificationChildAction
scalar:Bitmask32
Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • descreqpt:Descr
    Description of the specified attribute
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    ideqpt:Id
    (scalar:Uint32)
    The item identifier.
    RANGE: [1 , 64]
    loceqpt:SlotLoc
    (scalar:Enum8)
    location of the slot in the chassis (front/back)SELECTION:
    0 - unknown
    1 - front
    2 - rear
    DEFAULT: unknown
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The monitoring policy attached to this observable object.
    operSteqpt:SlotOpSt
    (scalar:Enum8)
    slot status: is it empty or if there's a card or mismatch or...SELECTION:
    0 - empty
    1 - inserted
    DEFAULT: empty
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • physIdeqpt:Id
    (scalar:Uint32)
    Physical Slot IDRANGE: [0, 4294967295]
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    typeeqpt:SlotT
    (scalar:Enum8)
    The type.SELECTION:
    0 - unknown
    1 - supslot
    2 - lcslot
    3 - fcslot
    4 - scslot
    5 - extchslot
    6 - psuslot
    7 - fantray
    8 - bslot
    9 - nslot
    DEFAULT: unknown


    eqptFt Properties

    The following table contains information about the eqptFt properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

    Property NameData TypeDescriptionValues
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • descreqpt:Descr
    Description of the specified attribute
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    fanNamestring:Basic
    The fan name: 'front', 'back', 'chassis', and 'fan-in-ps' used in fanlet-fan-fail fault message.A sequence of characters
    hwVercap:Version
    (string:Basic)
    The hardware version of a card.A sequence of characters
    ideqpt:Id
    (scalar:Uint32)
    The item identifier.
    RANGE: [1 , 4]
    mfgTmscalar:Date
    Manufacturing TimeDATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z
    DEFAULT: not-applicable
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    modeleqpt:Model
    (string:Basic)
    ModelA sequence of characters
    monPolDn
    reference:BinRef
    The monitoring policy associated with the fan tray.
    operSteqpt:OpSt
    (scalar:Enum8)
    Value is same as 'Status' shown in `show environment fan`
    The fan tray operational status.
    SELECTION:
    0 - unknown
    1 - ok
    2 - fail
    3 - absent
    4 - shut
    5 - mismatch
    DEFAULT: unknown
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • reveqpt:Revision
    (string:Basic)
    RevisionA sequence of characters
    DEFAULT: 0
    sereqpt:Serial
    (naming:Name)
    Serial Number
    MAX SIZE: 16
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    vendoreqpt:Vendor
    (string:Basic)
    VendorA sequence of characters
    DEFAULT: Cisco Systems, Inc


    eqptPsgP Properties

    The following table contains information about the eqptPsgP properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.

    Property NameData TypeDescriptionValues
    acRdnCapeqpt:Watts
    (scalar:Uint32)
    AC Redundant CapacityRANGE: [0, 4294967295]
    adminRdnMeqpt:PsRdnM
    (scalar:Enum8)
    Admin redundancy mode
    comb, comb-force, insrc-rdn, ps-rdn
    SELECTION:
    0 - unknown
    1 - not-supp
    2 - rdn
    3 - comb
    4 - n-rdn
    5 - ps-rdn
    6 - insrc-rdn
    7 - sinin-rdn
    8 - comb-force
    DEFAULT: ps-rdn
    alPwreqpt:Watts
    (scalar:Uint32)
    Value is same as 'Total Power Allocated (budget)' shown in `show environment power`
    Allocated power in watts
    RANGE: [0, 4294967295]
    avPwreqpt:Watts
    (scalar:Uint32)
    Value is same as 'Total Power Available for additional modules' shown in `show environment power`
    The available power measured in watts.
    RANGE: [0, 4294967295]
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • descrpol:Descr
    Description of the specified attribute
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    flRdnCapeqpt:Watts
    (scalar:Uint32)
    Power capacity under full redundancy. It is calculated as the minimum of ps and grid redundancyRANGE: [0, 4294967295]
    grdRdnCapeqpt:Watts
    (scalar:Uint32)
    power capacity under grid redundancyRANGE: [0, 4294967295]
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    The monitoring policy attached to this observable object.
    nRdnCapeqpt:Watts
    (scalar:Uint32)
    Available power under various redundancy modes Cumulative power available in non-redundant mode. It is obtained by summing the individual power provided by all present and functioning psuRANGE: [0, 4294967295]
    namepol:ObjName
    (naming:Name256)
    Object name
    MAX SIZE: 64
    operRdnMeqpt:PsRdnM
    (scalar:Enum8)
    Value is same as 'Power Supply redundancy mode (operational)' shown in `show environment power`
    The power supply redundancy operational mode
    SELECTION:
    0 - unknown
    1 - not-supp
    2 - rdn
    3 - comb
    4 - n-rdn
    5 - ps-rdn
    6 - insrc-rdn
    7 - sinin-rdn
    8 - comb-force
    DEFAULT: ps-rdn
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • psRdnCapeqpt:Watts
    (scalar:Uint32)
    power capacity under power supply redundancyRANGE: [0, 4294967295]
    rsdPwreqpt:Watts
    (scalar:Uint32)
    Reserved power in wattsRANGE: [0, 4294967295]
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    tceqpt:Watts
    (scalar:Uint32)
    Value is same as 'Total Power Capacity (based on configured mode)' shown in `show environment power`
    total power capacity in watts. It depends on the redundancy mode and is equal to one of cumCap
    RANGE: [0, 4294967295]
    uid
    scalar:Uint16
    A unique identifier for this object.


    Related Documentation

    For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

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

    See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload:

    https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/

    For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide:

    https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html