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 Name Data Type Description Values childAction
mo:ModificationChildAction
scalar:Bitmask32Delete or ignore. For internal use only. SELECTION:
descr eqpt:Descr Description of the specified attribute dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. id eqpt:Id
(scalar:Uint32)The item identifier. loc eqpt:SlotLoc
(scalar:Enum8)location of the slot in the chassis (front/back) SELECTION: modTs mo:TStamp
(scalar:Date)The time when this object was last modified. SELECTION: monPolDn
reference:BinRefThe monitoring policy attached to this observable object. operSt eqpt:SlotOpSt
(scalar:Enum8)slot status: is it empty or if there's a card or mismatch or... SELECTION: persistentOnReload
mo:Persistent
scalar:Enum8NO COMMENTS SELECTION:
physId eqpt:Id
(scalar:Uint32)Physical Slot ID RANGE: [0, 4294967295] status mo:ModificationStatus
(scalar:Bitmask32)The upgrade status. This property is for internal use only. SELECTION: type eqpt:SlotT
(scalar:Enum8)The type. SELECTION:
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 Name Data Type Description Values childAction
mo:ModificationChildAction
scalar:Bitmask32Delete or ignore. For internal use only. SELECTION:
descr eqpt:Descr Description of the specified attribute dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. fanName string:Basic The fan name: 'front', 'back', 'chassis', and 'fan-in-ps' used in fanlet-fan-fail fault message. A sequence of characters hwVer cap:Version
(string:Basic)The hardware version of a card. A sequence of characters id eqpt:Id
(scalar:Uint32)The item identifier. mfgTm scalar:Date Manufacturing Time DATE FORMAT: %Y-%m-%dT%H:%M:%S.%f%z modTs mo:TStamp
(scalar:Date)The time when this object was last modified. SELECTION: model eqpt:Model
(string:Basic)Model A sequence of characters monPolDn
reference:BinRefThe monitoring policy associated with the fan tray. operSt eqpt:OpSt
(scalar:Enum8)SELECTION: persistentOnReload
mo:Persistent
scalar:Enum8NO COMMENTS SELECTION:
rev eqpt:Revision
(string:Basic)Revision A sequence of characters ser eqpt:Serial
(naming:Name)Serial Number status mo:ModificationStatus
(scalar:Bitmask32)The upgrade status. This property is for internal use only. SELECTION: vendor eqpt:Vendor
(string:Basic)Vendor A sequence of characters
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 Name Data Type Description Values acRdnCap eqpt:Watts
(scalar:Uint32)AC Redundant Capacity RANGE: [0, 4294967295] adminRdnM eqpt:PsRdnM
(scalar:Enum8)Admin redundancy mode alPwr eqpt:Watts
(scalar:Uint32)RANGE: [0, 4294967295] avPwr eqpt:Watts
(scalar:Uint32)RANGE: [0, 4294967295] childAction
mo:ModificationChildAction
scalar:Bitmask32Delete or ignore. For internal use only. SELECTION:
descr pol:Descr Description of the specified attribute dn
reference:BinRefA tag or metadata is a non-hierarchical keyword or term assigned to the fabric module. flRdnCap eqpt:Watts
(scalar:Uint32)Power capacity under full redundancy. It is calculated as the minimum of ps and grid redundancy RANGE: [0, 4294967295] grdRdnCap eqpt:Watts
(scalar:Uint32)power capacity under grid redundancy RANGE: [0, 4294967295] modTs mo:TStamp
(scalar:Date)The time when this object was last modified. SELECTION: monPolDn
reference:BinRefThe monitoring policy attached to this observable object. nRdnCap eqpt: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 psu RANGE: [0, 4294967295] name pol:ObjName
(naming:Name256)Object name operRdnM eqpt:PsRdnM
(scalar:Enum8)SELECTION: persistentOnReload
mo:Persistent
scalar:Enum8NO COMMENTS SELECTION:
psRdnCap eqpt:Watts
(scalar:Uint32)power capacity under power supply redundancy RANGE: [0, 4294967295] rsdPwr eqpt:Watts
(scalar:Uint32)Reserved power in watts RANGE: [0, 4294967295] status mo:ModificationStatus
(scalar:Bitmask32)The upgrade status. This property is for internal use only. SELECTION: tc eqpt:Watts
(scalar:Uint32)RANGE: [0, 4294967295] uid
scalar:Uint16A unique identifier for this object.
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: