Skip to content

Monitoring

Amy Buck edited this page Jun 6, 2017 · 17 revisions

OPX supports network monitoring features such as sFlow and port mirroring which monitor and capture network traffic in the system. It also provides tools to collect port and VLAN statistics, and port media information.

Port mirroring

Mirroring copies packets from a mirroring source port to a mirroring destination port. In local port mirroring, packets are forwarded from a source port to a destination port on the same system.

In remote port mirroring, mirrored packets are forwarded using a dedicated L2 VLAN.

User application can provision mirroring capabilities using the CPS API:

  • Create a mirroring session
  • Update a mirroring session
  • Delete a mirroring session

See Programming examples for information on how to program port mirroring using the CPS API.

NOTE: OPX does not support Linux modeling of port mirroring.

SFlow

sFlow monitors network traffic by sampling incoming and outgoing packets on physical ports. User applications can provision sFlow functionality using the CPS API:

  • Enable packet sampling on a physical port
  • Disable packet sampling on a physical port
  • Set the sampling interval rate
  • Forward the sampled packet to an IP address/port

See Programming examples for information on how to program sFlow using the CPS API.

NOTE: OPX does not support Linux modeling of sFlow.

Statistics

Use the base-show-stats and base-ethtool commands to display statistical information about ports/VLANs, and installed transceivers.

Command Description
opx-show-stats if_stat [iface_name] {filter_list} Displays port statistics for all (or a specified) Linux interfaces which map to physical ports. Enter a filter_list value.
opx-show-stats vlan_stat [vlan_ifname] {filter_list} Displays statistics from all (or a specified) VLANs. Enter a filter_list value to display specified statistics.
opx-show-stats clear [iface_name] Deletes port statistics for all (or a specified) Linux interfaces. The base-show-stats command does not support deleting VLAN statistics.
opx-ethtool [-v -e -s -S] Retrieves statistics and media information from a Linux interface with maps to a physical port. The command output is a subset of the opx-show-stats command for the same physical port interface (-v — Version information, -e — EEPROM media information, -s — Port speed, duples, and auto-negotation settings, and -S — Port statistics).

View statistics for Linux interface e101-001-0

$ opx-show-stats if_stat e101-001-0

Key:
opx-stats/interface/ip/in-discards = 0
opx-stats/interface/ether-octets = 13442942147
opx-stats/interface/ether-out/pkts-64-octets = 0
opx-stats/interface/ether-collisions = 0
...
opx-stats/interface/if-in-multicast-pkts = 0
opx-stats/interface/ether-in/pkts-64-octets = 0
opx-stats/interface/ether-in/pkts-512-to-1023-octets = 0

View statistics for VLAN Linux bridge interface Br1

$ opx-show-stats vlan_stat br1

Key:
opx-stats/vlan/time-stamp:  1455586573
opx-stats/vlan/in-octets:  16381983058
opx-stats/vlan/in-pkts:  16101053
opx-stats/vlan/out-octets:  55146334258
opx-stats/vlan/out-pkts:  67419926

Delete statistics for port that maps to e101-001-0

$ opx-show-stats clear e101-001-0
Success

View port statistics

$ opx-ethtool -S e101-001-0
Statistics for interface e101-001-0
  Ether statistics:
    rx_bytes: 9185614848
    rx_no_errors: 0
    tx_no_errors: 9003181
    tx_total_collision: 0
    rx_undersize_packets: 0
    rx_jabbers: 0
    rx_fragments: 0
    rx_align_errors: 0
    rx_discards: 0
    rx_mcast_packets: 35445

View media (transceiver) statistics for e101-001-0

$ opx-ethtool -e e101-001-0
Show media info for e101-001-0
if_index is 17

Key: 2.19.1245389.1245248.1245249.1245250.
opx-pas/media/rate-identifier = 0
opx-pas/media/oper-status = 0
opx-pas/media/category = 3
opx-pas/media/voltage-state = 1
opx-pas/media/bias-low-warning-threshold =
opx-pas/media/vendor-pn = 568400002
opx-pas/media/current-temperature = ??
opx-pas/media/insertion-cnt = 0
opx-pas/media/voltage-low-warning-threshold =
opx-pas/media/cc_ext = 162
opx-pas/media/length-om2 = 0
opx-pas/media/length-om3 = 0
opx-pas/media/rx-power-low-alarm-threshold =
opx-pas/media/length-om1 = 0

opx-pas/media/vendor-id = AP
opx-pas/media/media-category/sfp-plus/br-max = 0
opx-pas/media/connector = 33
opx-pas/media/ext-transceiver = 0
opx-pas/media/vendor-Specific =
ffffffffffffff00000000000000000000000000000000000000000000000000
opx-pas/media/media-category/sfp-plus/br-min = 0
opx-pas/media/encoding = 0
opx-pas/media/tx-power-high-warning-threshold =
opx-pas/media/vendor-name = Amphenol
opx-pas/media/rx-power-low-warning-threshold =
opx-pas/media/slot = 1
opx-pas/media/port = 1
opx-pas/media/vendor-rev = 4700
opx-pas/media/slot = 1
opx-pas/media/port = 1
opx-pas/media/tx-power-low-alarm-threshold =
opx-pas/media/bias-low-alarm-threshold =
opx-pas/media/capability = 6
opx-pas/media/media-category/sfp-plus/sff-8472-compliance = 0
opx-pas/media/diag-mon-type = 0
opx-pas/media/temp-state = 1
opx-pas/media/type = 43
opx-pas/media/media-category/qsfp-plus/wavelength-tolerance = 0
opx-pas/media/ext-identifier = 0
opx-pas/media/temp-low-warning-threshold =
opx-pas/media/voltage-high-warning-threshold =
opx-pas/media/temp-high-alarm-threshold =
opx-pas/media/length-sfm = 0
opx-pas/media/rate-select-state = 0
opx-pas/media/rx-power-measurement-type = 0
opx-pas/media/wavelength = 0
opx-pas/media/cc_base = 54
opx-pas/media/temp-low-alarm-threshold =
opx-pas/media/tx-power-low-warning-threshold =
opx-pas/media/insertion-timestamp = 0
opx-pas/media/current-voltage =
opx-pas/media/bias-high-alarm-threshold =
opx-pas/media/high-power-mode = 1
opx-pas/media/br-nominal = 0
opx-pas/media/options = 0
opx-pas/media/rx-power-high-warning-threshold =
opx-pas/media/date-code = 3131303632322000
opx-pas/media/present = 1
opx-pas/media/transceiver = 0000000000000000205c
opx-pas/media/length-cable = 2
opx-pas/media/voltage-high-alarm-threshold =
opx-pas/media/identifier = 12
opx-pas/media/voltage-low-alarm-threshold =
opx-pas/media/dell-qualified = 0
opx-pas/media/length-sfm-km = 0
opx-pas/media/rx-power-high-alarm-threshold =
opx-pas/media/admin-status = 0
opx-pas/media/serial-number = APF11240020140
opx-pas/media/tx-power-high-alarm-threshold =
opx-pas/media/temp-high-warning-threshold =
opx-pas/media/bias-high-warning-threshold =
opx-pas/media/enhanced-options = 0
opx-pas/media/media-category/qsfp-plus/max-case-temp = 70
Clone this wiki locally