How to Check Interface Statistics via CLI on Cisco Nexus 9508 Switch

cisco-nexus

Suppose for some reasons I don't have access to Cisco APIC GUI and I need to check interface statistics of a physical interface of a spine/leaf switch? Which command should I use? Should I go to some special mode of CLI before issuing "show interface x/x"? How?

Because now, if I login to a switch via ssh, I get the following output:

leaf# show interface status
URL: http://127.0.0.1:7777/api//class/nwIf.xml?&target-subtree-class=mgmtMgmtIf&query-target=subtree&order-by=nwIf.id|asc
Code: 403
Output: <?xml version="1.0" encoding="UTF-8"?><imdata totalCount="1"><error code="403" text="Need a valid webtoken cookie (named APIC-Cookie) or a signed request with signature in the cookie APIC-Request-Signature for all REST API requests"/></imdata>
Data Posted:
None
Error executing command, check logs for details
leaf# show logging
Incorrect command "show logging"
leaf#
leaf# ls
aci  bin  controller  debug  dev  etc  isan  lc  lib  mit  proc  sbin  sys  tmp  usr  var
leaf#
leaf# show ?
Incorrect command "show ?"
leaf#

Best Answer

I think you are looking for the show interface <slot/port> command. This is run from the enable mode. For example

switch# show interface e4/2
Ethernet4/2 is down (Link not connected)
  Dedicated Interface
  Hardware: 10/100/1000 Ethernet, address: 0018.bad8.80d1 (bia 0024.f71c.739d)
  MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec
  reliability 153/255, txload 1/255, rxload 1/255
  Encapsulation ARPA
  auto-duplex, auto-speed
  Beacon is turned off
  Auto-Negotiation is turned on
  Input flow-control is off, output flow-control is off
  Auto-mdix is turned on
  Switchport monitor is off
  EtherType is 0x8100
  Last link flapped 01:56:44
  Last clearing of "show interface" counters 1d04h
  30 seconds input rate 0 bits/sec, 0 packets/sec
  30 seconds output rate 0 bits/sec, 0 packets/sec
  Load-Interval #2: 5 minute (300 seconds)
    input rate 0 bps, 0 pps; output rate 0 bps, 0 pps
  L3 in Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  L3 out Switched:
    ucast: 0 pkts, 0 bytes - mcast: 0 pkts, 0 bytes
  RX
    4 unicast packets  2 multicast packets  0 broadcast packets
    6 input packets  730 bytes
    0 jumbo packets  0 storm suppression packets
    0 runts  0 giants  0 CRC  0 no buffer
    4 input error  0 short frame  0 overrun   0 underrun  0 ignored
    0 watchdog  0 bad etype drop  0 bad proto drop  0 if down drop
    0 input with dribble  0 input discard
    0 Rx pause
  TX
    0 unicast packets  4 multicast packets  0 broadcast packets
    4 output packets  916 bytes
    0 jumbo packets
    0 output error  0 collision  0 deferred  0 late collision
    0 lost carrier  0 no carrier  0 babble  0 output discard
    0 Tx pause
  10 interface resets

There are mayany variations of the show interface command that are detail in various Cisco document, like Cisco NX-OS Interfaces Commands.