show ip sla configuration

show ip sla configuration
import requests
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 ip sla configuration",
  "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)

{
  ""TABLE_configuration"": {
    ""ROW_configuration"": {
      ""index"": 1, 
      ""owner"": null, 
      ""tag"": null, 
      ""timeout"": 5000, 
      ""oper-type"": ""icmp-echo"", 
      ""dest-ip"": ""1.1.1.1"", 
      ""source-ip"": ""0.0.0.0"", 
      ""traffic-class"": 0, 
      ""tos"": 0, 
      ""switch-id"": 0, 
      ""profile-id"": 0, 
      ""interface"": null, 
      ""packet-size"": 28, 
      ""verify-data"": ""disabled"", 
      ""vrf-name"": ""default"", 
      ""frequency"": 60, 
      ""next-start-time"": ""Start Time already passed"", 
      ""group-scheduled"": ""disabled"", 
      ""randomly-scheduled"": ""disabled"", 
      ""life"": 3600000, 
      ""ageout"": 0, 
      ""recurring"": ""disabled"", 
      ""status-of-entry"": ""notInService"", 
      ""threshold"": 5000, 
      ""hours"": 2, 
      ""buckets"": 1, 
      ""interval"": ""Statistic distribution interval (milliseconds): 20"", 
      ""lives"": 0, 
      ""hsbuckets"": 15, 
      ""filter"": 1
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_s"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <configuration>
      <__readonly__>
       <TABLE_configuration>
        <ROW_configuration>
         <index>1</index>
         <owner></owner>
         <tag></tag>
         <timeout>5000</timeout>
         <oper-type>icmp-echo</oper-type>
         <dest-ip>1.1.1.1</dest-ip>
         <source-ip>0.0.0.0</source-ip>
         <traffic-class>0</traffic-class>
         <tos>0</tos>
         <switch-id>0</switch-id>
         <profile-id>0</profile-id>
         <interface></interface>
         <packet-size>28</packet-size>
         <verify-data>disabled</verify-data>
         <vrf-name>default</vrf-name>
         <frequency>60</frequency>
         <next-start-time>Start Time already passed</next-start-time>
         <group-scheduled>disabled</group-scheduled>
         <randomly-scheduled>disabled</randomly-scheduled>
         <life>3600000</life>
         <ageout>0</ageout>
         <recurring>disabled</recurring>
         <status-of-entry>notInService</status-of-entry>
         <threshold>5000</threshold>
         <hours>2</hours>
         <buckets>1</buckets>
         <interval>   Statistic distribution interval (milliseconds): 20</interval>
         <lives>0</lives>
         <hsbuckets>15</hsbuckets>
         <filter>1</filter>
        </ROW_configuration>
       </TABLE_configuration>
      </__readonly__>
     </configuration>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display configuration values including all defaults for all IP Service Level Agreements (SLAs) operations or a specified operation, use the show ip sla configuration command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla configuration**

IP SLAs Infrastructure Engine-III
Entry number: 1
Owner: 
Tag: 
Operation timeout (milliseconds): 5000
Type of operation to perform: icmp-echo
Target address/Source address: 1.1.1.1/0.0.0.0
Traffic-Class parameter: 0x0
Type Of Service parameter: 0x0
Switch ID: 0
Profile ID: 0
Interface: 
Request size (ARR data portion): 28
Verify data: No
Vrf Name: default
Schedule:
   Operation frequency (seconds): 60  (not considered if randomly scheduled)
   Next Scheduled Start Time: Start Time already passed
   Group Scheduled : FALSE
   Randomly Scheduled : FALSE
   Life (seconds): 3600
   Entry Ageout (seconds): never
   Recurring (Starting Everyday): FALSE
   Status of entry (SNMP RowStatus): notInService
Threshold (milliseconds): 5000
Distribution Statistics:
   Number of statistic hours kept: 2
   Number of statistic distribution buckets kept: 1
   Statistic distribution interval (milliseconds): 20
History Statistics:
   Number of history Lives kept: 0
   Number of history Buckets kept: 15
   History Filter Type: None"

show ip sla application

show ip sla application
import requests
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 ip sla application",
  "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)

{
  ""version"": ""2.2.0 Round Trip Time MIB, Infrastructure Engine-III"", 
  ""type-name"": ""icmpEcho, udpEcho, tcpConnect, http, dns, udpJitter, fabricPathEcho"", 
  ""feature-name"": null, 
  ""lowmemorymark"": 140411260, 
  ""max-entries"": 102840, 
  ""probe-cap"": 102839, 
  ""entries-config"": 1, 
  ""entries-active"": 0, 
  ""entries-pending"": 0, 
  ""entries-inactive"": 1, 
  ""last-change-time"": ""19:32:26 IST Wed Jul 18 2018"", 
  ""rttMonApplReset"": 1
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_s"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <application>
      <__readonly__>
       <version>2.2.0 Round Trip Time MIB, Infrastructure Engine-III</version>
       <type-name>icmpEcho, udpEcho, tcpConnect, http, dns, udpJitter, fabricPathEcho</type-name>
       <feature-name></feature-name>
       <lowmemorymark>140411260</lowmemorymark>
       <max-entries>102840</max-entries>
       <probe-cap>102839</probe-cap>
       <entries-config>1</entries-config>
       <entries-active>0</entries-active>
       <entries-pending>0</entries-pending>
       <entries-inactive>1</entries-inactive>
       <last-change-time>19:32:26 IST Wed Jul 18 2018
</last-change-time>
       <rttMonApplReset>1</rttMonApplReset>
      </__readonly__>
     </application>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display global information about IP Service Level Agreements (SLAs), use the show ip sla application command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla application**

        IP Service Level Agreements
Version: Round Trip Time MIB 2.2.0, Infrastructure Engine-III

Supported Operation Types: icmpEcho, udpEcho, tcpConnect, http, dns, udpJitter, fabricPathEcho

Supported Features:

IP SLAs low memory water mark: 0 Estimated system max number of entries: 102840

Estimated number of configurable operations: 102839 Number of Entries configured : 1 Number of active Entries : 0 Number of pending Entries : 0 Number of inactive Entries : 1 Time of last change in whole IP SLAs: 19:32:26 IST Wed Jul 18 2018

show ip sla statistics

show ip sla statistics
import requests
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 ip sla statistics",
  "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)

{
  ""print_type"": 18, 
  ""TABLE_stats"": {
    ""ROW_stats"": {
      ""index"": 1, 
      ""TABLE_detail"": {
        ""ROW_detail"": {
          ""update-count"": 1, 
          ""micro-accuracy"": ""disabled"", 
          ""nano-accuracy"": ""disabled"", 
          ""latest-RTT"": 1, 
          ""latest-return-code"": 1, 
          ""latest-start-time"": ""20:31:26 IST Wed Jul 18 2018"", 
          ""outstring1"": ""Number of successes: 52"", 
          ""outstring2"": ""Number of failures: 8""
        }
      }, 
      ""life-left"": 0
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_s"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <statistics>
      <__readonly__>
       <print_type>18</print_type>
       <TABLE_stats>
        <ROW_stats>
         <index>1</index>
         <TABLE_detail>
          <ROW_detail>
           <update-count>1</update-count>
           <micro-accuracy>disabled</micro-accuracy>
           <nano-accuracy>disabled</nano-accuracy>
           <latest-RTT>1</latest-RTT>
           <latest-return-code>1</latest-return-code>
           <latest-start-time>20:31:26 IST Wed Jul 18 2018</latest-start-time>
           <outstring1>Number of successes: 52</outstring1>
           <outstring2>Number of failures: 8</outstring2>
          </ROW_detail>
         </TABLE_detail>
         <life-left>0</life-left>
        </ROW_stats>
       </TABLE_stats>
      </__readonly__>
     </statistics>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display the current operational status and statistics of all IP Service Level Agreements (SLAs) operations or a specified operation, use the show ip sla statistics command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla statistics**

IPSLAs Latest Operation Statistics

IPSLA operation id: 1 Latest RTT: 1 milliseconds Latest operation start time: 20:31:26 IST Wed Jul 18 2018 Latest operation return code: OK Number of successes: 52 Number of failures: 8 Operation time to live: 0 sec

show ip sla statistics aggregated

show ip sla statistics aggregated
import requests
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 ip sla statistics aggregated",
  "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)

{
  ""print_type"": 25, 
  ""TABLE_stats"": {
    ""ROW_stats"": {
      ""index"": 1, 
      ""top"": ""Type of operation: icmp-echo"", 
      ""TABLE_detail"": {
        ""ROW_detail"": {
          ""sti"": ""Start Time Index: 19:32:26 IST Wed Jul 18 2018"", 
          ""rtt-count"": 52, 
          ""rtt-min"": 1, 
          ""rtt-avg"": 0, 
          ""micro-accuracy"": ""disabled"", 
          ""nano-accuracy"": ""disabled"", 
          ""rtt-max"": 1, 
          ""outstring1"": ""Number of successes: 52"", 
          ""outstring2"": ""Number of failures: 8""
        }
      }
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_s"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <statistics>
      <aggregated>
       <__readonly__>
        <print_type>25</print_type>
        <TABLE_stats>
         <ROW_stats>
          <index>1</index>
          <top>Type of operation: icmp-echo</top>
          <TABLE_detail>
           <ROW_detail>
            <sti>Start Time Index: 19:32:26 IST Wed Jul 18 2018</sti>
            <rtt-count>52</rtt-count>
            <rtt-min>1</rtt-min>
            <rtt-avg>0</rtt-avg>
            <micro-accuracy>disabled</micro-accuracy>
            <nano-accuracy>disabled</nano-accuracy>
            <rtt-max>1</rtt-max>
            <outstring1>Number of successes: 52</outstring1>
            <outstring2>Number of failures: 8</outstring2>
           </ROW_detail>
          </TABLE_detail>
         </ROW_stats>
        </TABLE_stats>
       </__readonly__>
      </aggregated>
     </statistics>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display the aggregated statistical errors and distribution information for all IP Service Level Agreements (SLAs) operations or a specified operation, use the show ip sla statistics aggregated command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla statistics aggregated**

IPSLAs aggregated statistics

IPSLA operation id: 1 Type of operation: icmp-echo RTT Values: Number Of RTT: 52 RTT Min/Avg/Max: 1/0/1 milliseconds Number of successes: 52 Number of failures: 8

show ip sla statistics details

show ip sla statistics details
import requests
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 ip sla statistics details",
  "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)

{
  ""print_type"": 22, 
  ""TABLE_stats"": {
    ""ROW_stats"": {
      ""index"": 1, 
      ""TABLE_detail"": {
        ""ROW_detail"": {
          ""update-count"": 1, 
          ""micro-accuracy"": ""disabled"", 
          ""nano-accuracy"": ""disabled"", 
          ""latest-RTT"": 1, 
          ""latest-return-code"": 1, 
          ""latest-start-time"": ""20:31:26 IST Wed Jul 18 2018"", 
          ""outstring1"": ""Number of successes: 52"", 
          ""outstring2"": ""Number of failures: 8""
        }
      }, 
      ""life-left"": 0, 
      ""oper-state"": ""Inactive"", 
      ""reset-time"": ""Never""
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_s"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <statistics>
      <details>
       <__readonly__>
        <print_type>22</print_type>
        <TABLE_stats>
         <ROW_stats>
          <index>1</index>
          <TABLE_detail>
           <ROW_detail>
            <update-count>1</update-count>
            <micro-accuracy>disabled</micro-accuracy>
            <nano-accuracy>disabled</nano-accuracy>
            <latest-RTT>1</latest-RTT>
            <latest-return-code>1</latest-return-code>
            <latest-start-time>20:31:26 IST Wed Jul 18 2018</latest-start-time>
            <outstring1>Number of successes: 52</outstring1>
            <outstring2>Number of failures: 8</outstring2>
           </ROW_detail>
          </TABLE_detail>
          <life-left>0</life-left>
          <oper-state>Inactive</oper-state>
          <reset-time>Never</reset-time>
         </ROW_stats>
        </TABLE_stats>
       </__readonly__>
      </details>
     </statistics>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display detailed information about the current operational status and statistics, use the show ip sla statistics details command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla statistics details**

IPSLAs Latest Operation Statistics

IPSLA operation id: 1 Latest RTT: 1 milliseconds Latest operation start time: 20:31:26 IST Wed Jul 18 2018 Latest operation return code: OK Number of successes: 52 Number of failures: 8 Operation time to live: 0 sec Operational state of entry: Inactive Last time this entry was reset: Never

show command

show command
import requests
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 command",
  "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)

{
  ""twamp-resp-status"": ""IP SLAs Responder TWAMP is: Enabled"", 
  ""TABLE_twamp-session"": {
    ""ROW_twamp-session"": {
      ""recv-addr"": ""Recvr Addr: 10.104.99.65"", 
      ""recv-port"": ""Recvr Port: 8430"", 
      ""send-addr"": ""Sender Addr: 10.104.99.193"", 
      ""send-port"": ""Sender Port: 44614"", 
      ""send-vrf"": ""Sender VRF: management"", 
      ""sess-id"": ""Session Id: 10.104.99.65:8275658843602257986:80d523c"", 
      ""conn-id"": ""Connection Id: 3""
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_r"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <twamp>
      <session>
       <__readonly__>
        <twamp-resp-status>IP SLAs Responder TWAMP is: Enabled</twamp-resp-status>
        <TABLE_twamp-session>
         <ROW_twamp-session>
          <recv-addr>Recvr Addr: 10.104.99.65</recv-addr>
          <recv-port>Recvr Port: 8430</recv-port>
          <send-addr>Sender Addr: 10.104.99.193</send-addr>
          <send-port>Sender Port: 44614</send-port>
          <send-vrf>Sender VRF: management</send-vrf>
          <sess-id>Session Id: 10.104.99.65:8275658843602257986:80d523c</sess-id>
          <conn-id>Connection Id: 3</conn-id>
         </ROW_twamp-session>
        </TABLE_twamp-session>
       </__readonly__>
      </session>
     </twamp>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display information and results for IP Service Level Agreements (SLAs) Two-Way Active Measurement Protocol (TWAMP) test sessions, use the show command command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show command**

IP SLAs Responder TWAMP is: Enabled
Recvr Addr: 10.104.99.65
Recvr Port: 8430
Sender Addr: 10.104.99.193
Sender Port: 44614
Sender VRF: management
Session Id: 10.104.99.65:8275658843602257986:80d523c
Connection Id: 3

show ip sla twamp connection detail

show ip sla twamp connection detail
import requests
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 ip sla twamp connection detail",
  "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)

{
  ""TABLE_twamp-connection-detail"": {
    ""ROW_twamp-connection-detail"": {
      ""Connection-Id"": ""Connection Id:          3"", 
      ""Client-Addr"": ""Client IP Address:    10.104.99.193"", 
      ""Client-Port"": ""Client Port:          34118"", 
      ""Client-VRF"": ""Client VRF:           management"", 
      ""Mode"": ""Mode:                 Unauthenticated"", 
      ""Connection-state"": ""Connection State:     Connected"", 
      ""Control-state"": ""Control State:        Active"", 
      ""Number-Of-Test-requests"": ""Number of Test Requests - 0:1""
    }
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:twamp"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <twamp>
      <connection>
       <detail>
        <__readonly__>
         <TABLE_twamp-connection-detail>
          <ROW_twamp-connection-detail>
           <Connection-Id>Connection Id:          3</Connection-Id>
           <Client-Addr>Client IP Address:    10.104.99.193</Client-Addr>
           <Client-Port>Client Port:          34118</Client-Port>
           <Client-VRF>Client VRF:           management</Client-VRF>
           <Mode>Mode:                 Unauthenticated</Mode>
           <Connection-state>Connection State:     Connected</Connection-state>
           <Control-state>Control State:        Active</Control-state>
           <Number-Of-Test-requests>Number of Test Requests - 0:1</Number-Of-Test-requests>
          </ROW_twamp-connection-detail>
         </TABLE_twamp-connection-detail>
        </__readonly__>
       </detail>
      </connection>
     </twamp>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display information for current IP Service Level Agreements (SLAs) Two-Way Active Measurement Protocol (TWAMP) connections, use the show ip sla twamp connection detail command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla twamp connection detail**

Connection Id:          3
  Client IP Address:    10.104.99.193
  Client Port:          34118
  Client VRF:           management
  Mode:                 Unauthenticated
  Connection State:     Connected
  Control State:        Active
  Number of Test Requests - 0:1

show ip sla twamp connection requests

show ip sla twamp connection requests
import requests
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 ip sla twamp connection requests",
  "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)

{
  ""TABLE_twamp-connection-request"": {
    ""ROW_twamp-connection-request"": {
      ""Connection-Id"": ""3"", 
      ""Client-Addr"": ""10.104.99.193"", 
      ""Client-Port"": ""34118"", 
      ""Client-VRF"": ""management""
    }
  }, 
  ""Total-Connections"": ""1""
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:twamp"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <twamp>
      <connection>
       <requests>
        <__readonly__>
         <TABLE_twamp-connection-request>
          <ROW_twamp-connection-request>
           <Connection-Id>3</Connection-Id>
           <Client-Addr>10.104.99.193</Client-Addr>
           <Client-Port>34118</Client-Port>
           <Client-VRF>management</Client-VRF>
          </ROW_twamp-connection-request>
         </TABLE_twamp-connection-request>
         <Total-Connections>1</Total-Connections>
        </__readonly__>
       </requests>
      </connection>
     </twamp>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display information about IP SLA TWAMP connection requests, use the show ip sla twamp connection requests command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla twamp connection requests**

Connection-Id    Client Address        Client Port   Client VRF                      
3                10.104.99.193         34118         management

show ip sla twamp standards

show ip sla twamp standards
import requests
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 ip sla twamp standards",
  "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)

{
  ""TABLE_twamp-standards"": {
    ""ROW_twamp-standards"": [
      {
        ""twamp-standard-feature"": ""TWAMP Server"", 
        ""twamp-standard-org"": ""IETF"", 
        ""twamp-standard"": ""RFC5357""
      }, 
      {
        ""twamp-standard-feature"": ""TWAMP Reflector"", 
        ""twamp-standard-org"": ""IETF"", 
        ""twamp-standard"": ""RFC5357""
      }
    ]
  }
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:twamp"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <twamp>
      <standards>
       <__readonly__>
        <TABLE_twamp-standards>
         <ROW_twamp-standards>
          <twamp-standard-feature>TWAMP Server</twamp-standard-feature>
          <twamp-standard-org>IETF</twamp-standard-org>
          <twamp-standard>RFC5357</twamp-standard>
         </ROW_twamp-standards>
         <ROW_twamp-standards>
          <twamp-standard-feature>TWAMP Reflector</twamp-standard-feature>
          <twamp-standard-org>IETF</twamp-standard-org>
          <twamp-standard>RFC5357</twamp-standard>
         </ROW_twamp-standards>
        </TABLE_twamp-standards>
       </__readonly__>
      </standards>
     </twamp>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display a list of Two-Way Active Measurement Protocol (TWAMP) standards that are implemented on a Cisco device, use the show ip sla twamp standards command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla twamp standards**

Feature                   Organization    Standard
TWAMP Server              IETF            RFC5357
CC23-N7K-SUP2E#           IETF            RFC5357

show ip sla responder

show ip sla responder
import requests
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 ip sla responder",
  "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)

{
  ""rttMonApplResponder"": ""true"", 
  ""gen-enabled"": ""enabled"", 
  ""ctrl-msg-count"": 2605778, 
  ""errors"": 0, 
  ""print-recent-hdr"": ""enabled"", 
  ""TABLE_recent"": {
    ""ROW_recent"": [
      {
        ""recent-addr"": ""202.1.0.0"", 
        ""recent-time"": ""12:39:27 IST Wed Aug 01 2018""
      }, 
      {
        ""recent-addr"": ""201.1.0.0"", 
        ""recent-time"": ""12:39:27 IST Wed Aug 01 2018""
      }, 
      {
        ""recent-addr"": ""202.1.0.0"", 
        ""recent-time"": ""12:39:16 IST Wed Aug 01 2018""
      }, 
      {
        ""recent-addr"": ""201.1.0.0"", 
        ""recent-time"": ""12:39:16 IST Wed Aug 01 2018""
      }, 
      {
        ""recent-addr"": ""202.1.0.0"", 
        ""recent-time"": ""12:39:06 IST Wed Aug 01 2018""
      }
    ]
  }, 
  ""print-recent-err-hdr"": ""enabled"", 
  ""perm-enabled"": ""disabled""
}
<?xml version=""1.0"" encoding=""ISO-8859-1""?>
<nf:rpc-reply xmlns=""http://www.cisco.com/nxos:8.3.0.SK.1.:sla_r"" xmlns:nf=""urn:ietf:params:xml:ns:netconf:base:1.0"">
 <nf:data>
  <show>
   <ip>
    <sla>
     <responder>
      <__readonly__>
       <rttMonApplResponder>true</rttMonApplResponder>
       <gen-enabled>enabled</gen-enabled>
       <ctrl-msg-count>2605774</ctrl-msg-count>
       <errors>0</errors>
       <print-recent-hdr>enabled</print-recent-hdr>
       <TABLE_recent>
        <ROW_recent>
         <recent-addr>202.1.0.0</recent-addr>
         <recent-time>12:39:06 IST Wed Aug 01 2018</recent-time>
        </ROW_recent>
        <ROW_recent>
         <recent-addr>201.1.0.0</recent-addr>
         <recent-time>12:39:06 IST Wed Aug 01 2018</recent-time>
        </ROW_recent>
        <ROW_recent>
         <recent-addr>40.1.50.2</recent-addr>
         <recent-time>12:38:59 IST Wed Aug 01 2018</recent-time>
        </ROW_recent>
        <ROW_recent>
         <recent-addr>40.1.49.2</recent-addr>
         <recent-time>12:38:59 IST Wed Aug 01 2018</recent-time>
        </ROW_recent>
        <ROW_recent>
         <recent-addr>40.1.48.2</recent-addr>
         <recent-time>12:38:59 IST Wed Aug 01 2018</recent-time>
        </ROW_recent>
       </TABLE_recent>
       <print-recent-err-hdr>enabled</print-recent-err-hdr>
       <perm-enabled>disabled</perm-enabled>
      </__readonly__>
     </responder>
    </sla>
   </ip>
  </show>
 </nf:data>
</nf:rpc-reply>

To display license usage information, use the show ip sla responder command. For command descriptions, see the Cisco Nexus 7000 Series Switches Command References.

Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).

CLI Output

switch# **show ip sla responder**

        General IP SLA Responder on Control port 1967
General IP SLA Responder is: Enabled
Number of control message received: 2605668 Number of errors: 0
Recent sources:
        202.1.0.0 [12:38:36 IST Wed Aug 01 2018]
        201.1.0.0 [12:38:36 IST Wed Aug 01 2018]
        202.1.0.0 [12:38:27 IST Wed Aug 01 2018]
        201.1.0.0 [12:38:27 IST Wed Aug 01 2018]
        202.1.0.0 [12:38:17 IST Wed Aug 01 2018]
Recent error sources:

    Permanent Port IP SLA Responder
    IP SLA Responder is: Disabled