Package onep :: Package interfaces :: Module InterfaceStatistics :: Class InterfaceStatistics
[frames] | no frames]

Class InterfaceStatistics


This class represents the Interface Statistics properties of the network interface.

The interface statistics are dynamic software properties, such as number of packets in, number of errors, and number of out packets. These properties must always be received on demand from the Network Element, because they are constantly changing.

The interface statistics can be obtained via two methods:

  1. Using the NetworkInterface.get_statistics() method to get an InterfaceStatistics instance.
  2. Using the NetworkInterface.add_interface_statistics_listener() method to register a statistics event listener.

The get_statistics() API only gets a snapshot of the interface statistics on each invocation. Thus, an application that requires periodic updates of the statistics must use this API in a loop.

The preferred way of retrieving the interface statistics is to use the add_interface_statistics_listener() method, and register for periodically receiving the interface statistics when the filter criteria (specified through InterfaceStatisticsFilter) are met.

This class contains various property attributes corresponding to the statistics contained in the snapshot. The application must call get_statistics() on the NetworkInterface whenever it requires the latest updated values.

Instance Methods
int
reliability(self)
The reliability of the associated interface.
int
transmit_load(self)
The transmit load on the associated interface.
int
transmit_rate_pps(self)
The number of packets transmitted in packets per second (PPS) on the associated interface.
int
transmit_rate_bps(self)
The number of packets transmitted in bits per second (BPS) on the associated interface.
int
receive_rate_pps(self)
The number of packets received in packets per second (PPS) on the associated interface.
int
receive_rate_bps(self)
The number of packets received in bits per second (BPS) on the associated interface.
int
transmit_rate_cum_byte(self)
The cumulative number of bytes transmitted from the associated interface since the last bootup.
int
receive_rate_cum_byte(self)
The cumulative number of bytes received on the associated interface since the last bootup.
int
receive_load(self)
The receive load on the associated interface.
int
receive_broadcast(self)
The number of broadcast packets received on the associated interface.
int
receive_multicast(self)
The number of multicast packets received on the associated interface.
int
receive_unicast(self)
The number of unicast packets received on the associated interface.
int
transmit_broadcast(self)
The number of broadcast packets transmitted on the associated interface.
int
transmit_multicast(self)
The number of multicast packets transmitted on the associated interface.
int
transmit_unicast(self)
The number of unicast packets transmitted on the associated interface.
int
receive_runt(self)
The number of runt packets received on the associated interface.
int
receive_giant(self)
The number of giant packets received on the asssociated interface.
int
receive_throttle(self)
The number of throttle packets received on the associated interface.
int
in_unknown_protocol_drop(self)
The number of unknown protocol messages received on the associated interface.
int
in_packet_drop(self)
The number of input packets dropped on the associated interface because the maximum queue size was exceeded.
int
in_error(self)
Get the number of errors received on the associated interface.
int
in_error_crc(self)
The the number of cyclic redundancy check (CRC) errors on the associated interface.
int
in_error_frame(self)
The number of input frame errors received on the associated interface.
int
in_error_overrun(self)
The number of input buffer overrun errors on the associated interface.
int
in_error_ignore(self)
The number of input errors that are ignored on the associated interface.
int
out_packet_drop(self)
The number of output packets dropped on the associated interface.
int
out_error(self)
The number of outgoing errors received on the associated interface.
int
out_error_underrun(self)
The number of output buffer underrun errors on the associated interface.
int
out_error_reset(self)
The number of output error resets on the associated interface.
int
out_buffer_fail(self)
The number of output buffer failures on the associated interface.
int
out_buffer_swap(self)
The number of output buffers that were swapped out to DRAM on the associated interface.
int
transmit_cum_packet(self)
The cumulative number of packets transmitted from the associated interface since the last bootup.
int
receive_cum_packet(self)
The cumulative number of packets received by the associated interface since the last bootup.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  InterfaceStatisticsParameter = enum('ONEP_IF_STAT_RELIABILITY'...
ONEP_IF_STAT_RELIABILITY - Reliability of the interface, as a fraction of 255 (255/255 is 100 percent reliability), calculated as an exponential average over 5 minutes.
Properties

Inherited from object: __class__

Method Details

reliability(self)

 

The reliability of the associated interface.

The value returned is from 1 to 255, and is calculated as an exponential average over 5 minutes. A value of 255/255 means the interface is 100 percent reliable.

Returns: int
The reliability.
Decorators:
  • @property

transmit_load(self)

 

The transmit load on the associated interface.

The transmit load returned is a fraction of 255 (255/255 is completely saturated), calculated as an exponential average over 5 minutes.

Returns: int
The transmit load.
Decorators:
  • @property

transmit_rate_pps(self)

 

The number of packets transmitted in packets per second (PPS) on the associated interface.

The returned value is the average number of packets transmitted per second over the load interval time, which is 300 seconds (5 minutes). The number is an approximation of the rate per second.

Returns: int
The transmit rate PPS.
Decorators:
  • @property

transmit_rate_bps(self)

 

The number of packets transmitted in bits per second (BPS) on the associated interface.

The returned value is the average number of bits transmitted per second over the load interval time, which is 300 seconds (5 minutes). The number is an approximation of the rate per second.

Returns: int
The transmit rate BPS.
Decorators:
  • @property

receive_rate_pps(self)

 

The number of packets received in packets per second (PPS) on the associated interface.

The returned value is the average number of packets received per second over the load interval time, which is 300 seconds (5 minutes). The number is an approximation of the rate per second.

Returns: int
The receive rate PPS.
Decorators:
  • @property

receive_rate_bps(self)

 

The number of packets received in bits per second (BPS) on the associated interface.

The returned value is the average number of bits received per second over the load interval time, which is 300 seconds (5 minutes). The number is an approximation of the rate per second.

Returns: int
The receive rate BPS.
Decorators:
  • @property

transmit_rate_cum_byte(self)

 

The cumulative number of bytes transmitted from the associated interface since the last bootup.

Returns: int
The cumulative number of bytes transmitted.
Decorators:
  • @property

receive_rate_cum_byte(self)

 

The cumulative number of bytes received on the associated interface since the last bootup.

Returns: int
The cumulative number of bytes received.
Decorators:
  • @property

receive_load(self)

 

The receive load on the associated interface.

The receive load returned is a fraction of 255 (255/255 is completely saturated) calculated as an exponential average over 5 minutes.

Returns: int
The receive load.
Decorators:
  • @property

receive_broadcast(self)

 

The number of broadcast packets received on the associated interface.

Returns: int
The number of broadcast packets received.
Decorators:
  • @property

receive_multicast(self)

 

The number of multicast packets received on the associated interface.

Returns: int
The number of multicast packets received.
Decorators:
  • @property

receive_unicast(self)

 

The number of unicast packets received on the associated interface.

Returns: int
The number of unicast packets received.
Decorators:
  • @property

transmit_broadcast(self)

 

The number of broadcast packets transmitted on the associated interface.

Returns: int
The number broadcast packets transmitted.
Decorators:
  • @property

transmit_multicast(self)

 

The number of multicast packets transmitted on the associated interface.

Returns: int
The number multicast packets transmitted.
Decorators:
  • @property

transmit_unicast(self)

 

The number of unicast packets transmitted on the associated interface.

Returns: int
The number unicast packets transmitted.
Decorators:
  • @property

receive_runt(self)

 

The number of runt packets received on the associated interface.

The runt packets correspond to packets discarded because they are smaller in length than the physical medium minimum packet size. For example, any Ethernet packet that is less than 64 bytes in length is considered a runt.

Returns: int
The number of runt packets received.
Decorators:
  • @property

receive_giant(self)

 

The number of giant packets received on the asssociated interface.

The giant packets correspond to packets discarded because they exceed the physical medium's maximum packet size. For example, any Ethernet packet that is greater than 1518 bytes in length is considered a giant.

Returns: int
The number of giant packets received.
Decorators:
  • @property

receive_throttle(self)

 

The number of throttle packets received on the associated interface.

The returned value indicates the number of times the input buffers of an interface were cleaned because they were not serviced fast enough or because they were overwhelmed. Typically, an explorer storm can cause the throttles counter to increment. Note that all packets in the input queue are dropped every time there is a throttle, which causes very slow performance and may also disrupt existing sessions.

Returns: int
The number of throttle packets received.
Decorators:
  • @property

in_unknown_protocol_drop(self)

 

The number of unknown protocol messages received on the associated interface.

Returns: int
The number of unknown protocol messages received.
Decorators:
  • @property

in_packet_drop(self)

 

The number of input packets dropped on the associated interface because the maximum queue size was exceeded.

Returns: int
The number of input packets dropped.
Decorators:
  • @property

in_error(self)

 

Get the number of errors received on the associated interface.

The returned value includes runts, giants, no buffer, cyclic redundancy check (CRC), frame, overrun, and ignored counts. Other input related errors can also cause the input errors count to be increased. Some datagrams may have more than one error; the error count may not balance with the sum of the enumerated errors, because some datagrams may have more than one error and others may have errors that do not fall into any of the specific categories.

Returns: int
The number of errors received.
Decorators:
  • @property

in_error_crc(self)

 

The the number of cyclic redundancy check (CRC) errors on the associated interface.

The returned value corresponds to CRC-generated mismatches. CRC errors are also reported when a far-end abort occurs and when the idle flag pattern is corrupted. The CRC errors can occur even when there is no data traffic.

Returns: int
The number of CRC errors received.
Decorators:
  • @property

in_error_frame(self)

 

The number of input frame errors received on the associated interface.

The returned value corresponds to the number of times the receiver hardware was unable to hand received data to a hardware buffer, because the input rate exceeded the receiver's ability to handle the data.

Returns: int
The number of input frame errors received.
Decorators:
  • @property

in_error_overrun(self)

 

The number of input buffer overrun errors on the associated interface.

The returned value corresponds to the number of received packets ignored by the interface because the interface hardware ran low on internal buffers.

Returns: int
The number of input buffer overrun errors.
Decorators:
  • @property

in_error_ignore(self)

 

The number of input errors that are ignored on the associated interface.

Returns: int
The number of input errors that are ignored.
Decorators:
  • @property

out_packet_drop(self)

 

The number of output packets dropped on the associated interface.

The returned value corresponds to the sum of all errors that prevented the final transmission of datagrams out of the interface. A common cause is a low Output Queue size.

Returns: int
The number of output packets dropped.
Decorators:
  • @property

out_error(self)

 

The number of outgoing errors received on the associated interface.

The returned value corresponds to the number of times that the far-end router's transmitter ran faster than the near-end router's receiver was able to handle. This situation may never occur or be reported on some interfaces.

Returns: int
The number of outgoing errors received.
Decorators:
  • @property

out_error_underrun(self)

 

The number of output buffer underrun errors on the associated interface.

Returns: int
The number of output buffer underrun errors.
Decorators:
  • @property

out_error_reset(self)

 

The number of output error resets on the associated interface.

Returns: int
The number of output error resets.
Decorators:
  • @property

out_buffer_fail(self)

 

The number of output buffer failures on the associated interface.

Returns: int
The number of output buffer failures.
Decorators:
  • @property

out_buffer_swap(self)

 

The number of output buffers that were swapped out to DRAM on the associated interface.

Returns: int
The number of output buffers that were swapped out.
Decorators:
  • @property

transmit_cum_packet(self)

 

The cumulative number of packets transmitted from the associated interface since the last bootup.

Returns: int
The cumulative number of packets transmitted.
Decorators:
  • @property

receive_cum_packet(self)

 

The cumulative number of packets received by the associated interface since the last bootup.

Returns: int
The cumulative number of packets received.
Decorators:
  • @property

Class Variable Details

InterfaceStatisticsParameter


    ONEP_IF_STAT_RELIABILITY - Reliability of the interface, as a fraction of
          255 (255/255 is 100 percent reliability), calculated as an exponential
          average over 5 minutes.
    
    ONEP_IF_STAT_RESETS - Number of times that an interface has
      been completely reset.
    
    ONEP_IF_STAT_RX_LOAD - Receive rate of the interface, as a fraction of
      255 (255/255 is 100 percent).
    
    ONEP_IF_STAT_RX_BYTES_PER_SEC - Interface receive rate, in bytes per second.
    
    ONEP_IF_STAT_RX_PKTS_PER_SEC - Interface receive rate, in packets per second.
    
    ONEP_IF_STAT_RX_BYTES - Interface receive cumulative bytes.
    
    ONEP_IF_STAT_RX_PKTS_UCAST - Number of unicast packets
      received by the interface.
    
    ONEP_IF_STAT_RX_PKTS_MCAST - Number of multicast packets
      received by the interface.
    
    ONEP_IF_STAT_RX_PKTS_BCAST - Number of broadcast packets
      received by the interface.    
    
    ONEP_IF_STAT_IN_PKTS_DROP - Number of packets dropped
      because of a full input queue.

    ONEP_IF_STAT_RX_PKTS_ERRORS - Includes runts, giants, no buffer, CRC,
      frame, overrun, and ignored counts. Other input-related errors can
      also cause the input errors count to increase, and some datagrams
      may have more than one error. This sum may not balance with
      the sum of enumerated input error counts.
    
    ONEP_IF_STAT_IN_PKTS_UNKNOWN - Number of packets received with
      unknown protocol errors.
    
    ONEP_IF_STAT_RX_PKTS_RUNTS - Number of packets that are discarded
      because they are smaller than the minimum packet size of the medium.
    
    ONEP_IF_STAT_RX_PKTS_GIANTS - Number of packets that are discarded
      because they exceed the maximum packet size of the medium.
`    
    ONEP_IF_STAT_RX_PKTS_THROTTLE - Number of times the receiver on
      the port was disabled, possibly because of a buffer or processor overload.
    
    ONEP_IF_STAT_RX_PKTS_CRC Cyclic redundancy checksum generated by
      the originating LAN station or far-end device does not match the
      checksum calculated from the data received.
    
    ONEP_IF_STAT_RX_PKTS_FRAME - Number of packets received
      incorrectly having a CRC error and a noninteger number of octets.
    
    ONEP_IF_STAT_RX_PKTS_OVERRUN - Number of times the receiver
      hardware was
      unable to hand received data to a hardware buffer, because the input rate
      exceeded the receiver's ability to handle the data.
    
    ONEP_IF_STAT_TX_LOAD - Transmit rate of the interface as a fraction of
      255 (255/255 is 100 percent).
    
    ONEP_IF_STAT_TX_BYTES_PER_SEC - Interface transmit rate in bytes per
      second.
    
    ONEP_IF_STAT_TX_PKTS_PER_SEC - Interface transmit rate in packets per second.

    ONEP_IF_STAT_TX_BYTES - Interface transmit cumulative bytes.
    
    ONEP_IF_STAT_TX_PKTS_UCAST - Number of unicast packets
      transmit by the interface.
    
    ONEP_IF_STAT_TX_PKTS_MCAST - Number of multicast packets
      transmit by the interface.
    
    ONEP_IF_STAT_TX_PKTS_BCAST - Number of broadcast packets
      transmit by the interface.
    
    ONEP_IF_STAT_OUT_PKTS_DROP - Number of packets dropped
      because of a full output queue.
      
    ONEP_IF_STAT_TX_PKTS_ERRORS - Sum of all errors that prevented the final
      transmission of datagrams out of the interface from being examined. 
      This may not balance with the sum of the enumerated output errors,
      because some datagrams may have more than one error, and others may have
      errors that do not fall into any of the specifically tabulated
      categories.
    
    ONEP_IF_STAT_TX_PKTS_UNDERRUN - Number of times the
      transmitter has been running faster than the router can handle.
       
    ONEP_IF_STAT_TX_PKTS_BUFFER_FAILURES - Number of failed buffers and
      number of buffers swapped out.
    
    ONEP_IF_STAT_TX_PKTS_BUFFER_SWAPPEDOUT - Number of packets swapped to DRAM.
    
    ONEP_IF_STAT_TX_PKTS_TAIL_DROPS - Number of tail drop packets.
    
    ONEP_IF_STAT_TX_PKTS_VOQ_DROPS - Number of VoQ drop packets.
    
    ONEP_IF_STAT_TX_PKTS_REP_ENG_DROP - Number of replication engine drop packets.
    
    ONEP_IF_STAT_RX_PKTS - Number of packets received.
    
    ONEP_IF_STAT_TX_PKTS - Number of packets transmitted.

    

Value:
enum('ONEP_IF_STAT_RELIABILITY', 'ONEP_IF_STAT_RESETS', 'ONEP_IF_STAT_\
RX_LOAD', 'ONEP_IF_STAT_RX_BYTES_PER_SEC', 'ONEP_IF_STAT_RX_PKTS_PER_S\
EC', 'ONEP_IF_STAT_RX_BYTES', 'ONEP_IF_STAT_RX_PKTS_UCAST', 'ONEP_IF_S\
TAT_RX_PKTS_MCAST', 'ONEP_IF_STAT_RX_PKTS_BCAST', 'ONEP_IF_STAT_IN_PKT\
S_DROP', 'ONEP_IF_STAT_RX_PKTS_ERRORS', 'ONEP_IF_STAT_IN_PKTS_UNKNOWN'\
, 'ONEP_IF_STAT_RX_PKTS_RUNTS', 'ONEP_IF_STAT_RX_PKTS_GIANTS', 'ONEP_I\
F_STAT_RX_PKTS_THROTTLE', 'ONEP_IF_STAT_RX_PKTS_CRC', 'ONEP_IF_STAT_RX\
_PKTS_FRAME', 'ONEP_IF_STAT_RX_PKTS_OVERRUN', 'ONEP_IF_STAT_TX_LOAD', \
...