Comparing overall link Utilization with the types of protocols and errors occurring over the same link


 

Introduction

 

The most sought after Statistics collection processes are those processes that calculates Link Bandwidth Utilization. Link utilization is calculated primarily to study the network’s bottleneck points, in an attempt to anticipate those bottlenecks and avoid congestion and packet drops before they actually occur.

 

Utilization calculations could be compromised by the interface speed value deviation from the default speed according to the interface type. Hence, care must be taken to ensure that the value of the interface speed has not been changed; if it was changed however the proper interface speed value should be used in the utilization calculation. 

 

Links could either be LAN based or WAN based. They could also be either full duplex or half duplex mode links. While LAN links vary between full versus half duplex modes; WAN links tend to be typically full duplex. Utilization calculations are inherently inaccurate when applied to the total link if the link is on full duplex mode; this is due to the fact that calculations would have to be applied to either inbound traffic or outbound traffic and not both, typically the larger of the two. Therefore utilization should be calculated independently for both inbound and outbound traffic.   

 

Following are the equations that should be used to calculate link traffic utilizations in each direction:

 

                                                      

Inbound Traffic Utilization

 

 

InOctets * 8bits  * 100

 

 

(Time Interval) * ifSpeed

 

 

 

Outbound Traffic Utilization

 

 

OutOctets * 8bits  * 100

 

 

(Time Interval) * ifSpeed

 

 

                                       

Where;

 

InOctets:

is in fact the difference in the ifInOctets counter reading between consecutive poll cycles.

 

ifSpeed:

is the speed of the interface as reported by the MIB-II ifSpeed object.

 

OutOctets:

is in fact the difference in the ifOutOctets counter reading between two consecutive poll cycles.

 

Time Interval:

is in fact the difference in the value of the sysUpTime MIB object varbinded to each poll of the relevant octets counter.  

 

Integrating the Overhead into the formulas above will give us the Data Utilization:

 

 

                                                    

Inbound Data Utilization

 

 

InOctets * 8bits  - (TotalInPkts * PktOVHead) * 100

 

 

(Time Interval) * ifSpeed

 

 

 

                                             

Outbound Data Utilization

 

 

OutOctets * 8bits  - (TotalOutPkts * PktOVHead) * 100

 

 

(Time Interval) * ifSpeed

 

 

 

Where;

 

TotalInPkts:

Is the total number of packets inbound on the particular interface. The packets could include unicast, multicast, and broadcast packet types depending on the type of interface.

 

TotalOutPkts:

Is the total number of packets outbound on the particular interface. The packets could include unicast, multicast, and broadcast packet types depending on the type of interface.

 

PktOVHead:

Is the traffic overhead bits which includes interpacket delay bits and preamble bits. Overhead is also interface type dependant.

 

The Time Interval used in the formulas above deserves a closer look. While it is indeed the time difference between each Octets counter’s consecutive poll cycles; if used in the formulas above, it will compromise the accuracy of the final calculated value due to the time skew between both poll cycles. Hence the actual time used in the formulas above should be derived from device being polled and not from the host NMS server.

 

In looking more closely at link utilization; overhead traffic, broadcast and multicast traffic, and maybe management related traffic or indeed other protocols related traffic could be either discounted or indeed independently measured and compared to the overall utilization in each link direction.

 

Solution Overview

 

This management solution focuses on managing ONLY Ethernet type interfaces that are NOT in a up administrative state as is set by the network administrator on the managed network devices.

 

The solution defines a module name, description, and initiates the polling process under which the Devices in the specified AMZ are fed into the polling SNMP engine. interfaces descriptions ifDescr MIB Objects are polled and mapped to their corresponding interfaces indexes. A variable handler is then defined to store the values of the polled ifAdminStatus, ifType, and IfOperStatus MIB Objects. Interfaces ‘up’ and of type Ethernet with an operational state of ‘up’ will then have their octet counters, packet counters, system up time, discontinuity time polled along with the number of Errors and Discards for the particular interface all   bundled in a single SNMP data unit representing the Get-Request message.

 

The MIB Objects values are then stored into the appropriate variable handlers for two consecutive polls which are subtracted form each other using the SOSL function CounterData which stores the results in the database.

 

The main goal of the management process is to calculate link utilization. In doing so it differentiates between two types of utilization calculations: Traffic and Data utilization calculation. The differentiator is whether the traffic overhead is integrated (accounted for) in the formula or not.  For Ethernet interfaces the traffic overhead 160 bits per Ethernet frame packet.

 

Finally the management process script stores the second set of handler values in the first set of handler variables and polls the devices to populate the second set again. This process is repeated every 300 seconds (5 minutes).

 

Number of Inbound
Octects Detected
Sample Graph

Inbound Utilization
Sample Graph
   

SOSL Based Management Process Script Configuration

 

MODULE IfUtilization();

DESCRIPTION "Interface group information";

BEGIN

   MSG-MGR("Interfaces group Management Process started..");

 

          ALL-DEV (ZONE "LondonOffice") BY DEV

          {

 

          SET-INDEX ifTable ( ifDescr [ ifIndex, INT ] );

          WITH-INDEX ifTable

          { 

            POLL (ifType; ifAdminStatus;ifOperStatus);

 

            DEFINE ifType                 DB DISPL;

            DEFINE ifAdminStatus      DB DISPL;

            DEFINE ifOperStatus        DB DISPL;

 

              IF   ( ifAdminStatus == "^up$")

              THEN

                   IF       ( ifTypeVar ==  "^ethernetCsmacd$" )

                   THEN

                             IF       ( ifOperStatus == "^up$")

                             THEN

                                      DEFINE ifInOctetsT1                   MAP INT;

                                      DEFINE ifInUcastPktsT1 MAP INT;

                                      DEFINE ifInNUcastPktsT1            MAP INT;

                                      DEFINE ifInErrorsT1                    MAP INT;

                                      DEFINE ifInDiscardsT1    MAP INT;

 

                                      POLL (             ifInOctets; 

                                                ifInUcastPkts;

                                                ifInNUcastPkts;

                                                ifInErrors;

                                                ifInDiscards; 

                                                sysUpTime;

                                                ifCounterDiscontinuityTime);

         

                                      DEFINE ifInOctets                      DB INT;

                                      DEFINE ifInUcastPkts     DB INT;

                                      DEFINE ifInNUcastPkts    DB INT;

                                      DEFINE ifInErrors                       DB INT;

                                      DEFINE ifInDiscards                  DB INT;

 

                                     IfInOctetsT1      = IfInOctets;

                                     ifInUcastPktsT1             = ifInUcastPkts;

                                     ifInNUcastPktsT1            = ifInNUcastPkts;

                                     ifInErrorsT1       = ifInErrors;

                                     ifInDiscardsT1   = ifInDiscards;

 

                                      DEFINE sysUpTime                                DB INT;

                                      DEFINE ifCounterDiscontinuityTime          DB INT;    

 

                                      DEFINE Time1               MAP INT;

                                      DEFINE ifDisconTime1    MAP INT;    

 

                                      Time1 = sysUpTime;

                                      ifDisconTime1= ifCounterDiscontinuityTime;

                             ENDIF;

                ENDIF;

              ENDIF;

          };

          };

 

POLL-FREQ 5

   {

 

   WAIT (3000);

 

          ALL-DEV (ZONE "LondonOffice") BY DEV

          {

          SET-INDEX ifTable ( ifDescr [ ifIndex, INT ] );

          WITH-INDEX ifTable

          {

            POLL (ifType; ifAdminStatus;ifOperStatus);

 

            DEFINE ifType                 DB DISPL;

            DEFINE ifAdminStatus      DB DISPL;

            DEFINE ifOperStatus        DB DISPL;

 

              IF   ( ifAdminStatus == "^up$")

              THEN

                   IF       ( ifTypeVar ==  "^ethernetCsmacd$" )

                   THEN

                             IF       ( ifOperStatus == "^up$")

                             THEN

                                      DEFINE ifInOctetsT2                   MAP INT;

                                      DEFINE ifInUcastPktsT2 MAP INT;

                                      DEFINE ifInNUcastPktsT2            MAP INT;

                                      DEFINE ifInErrorsT2                    MAP INT;

                                      DEFINE ifInDiscardsT2    MAP INT;

 

                                      POLL (             ifInOctets; 

                                                ifInUcastPkts;

                                                ifInNUcastPkts;

                                                ifInErrors;

                                                ifInDiscards; 

                                                sysUpTime;

                                                ifCounterDiscontinuityTime);

         

                                      DEFINE ifInOctets          DB INT;

                                      DEFINE ifInUcastPkts     DB INT;

                                      DEFINE ifInNUcastPkts    DB INT;

                                      DEFINE ifInErrors            DB INT;

                                      DEFINE ifInDiscards         DB INT;

 

                                     IfInOctetsT2          = IfInOctets;

                                     IfInUcastPktsT2     = ifInUcastPkts;

                                     ifInNUcastPktsT2    = ifInNUcastPkts;

                                     ifInErrorsT2           = ifInErrors;

                                     ifInDiscardsT2       = ifInDiscards;

 

                                      DEFINE sysUpTime                                DB INT;

                                      DEFINE ifCounterDiscontinuityTime          DB INT;    

 

                                      DEFINE Time2               MAP INT;

                                      DEFINE ifDisconTime2    MAP INT;    

 

                                      Time2             = sysUpTime;

                                      IfDisconTime2  = ifCounterDiscontinuityTime;

                             ENDIF;

                ENDIF;

              ENDIF;

 

              CounterData ( ifInOctets,           ifInOctetsT1,          ifInOctetsT2);

              CounterData ( ifInUcastPkts,      ifInUcastPktsT1,      ifInUcastPktsT2);            

              CounterData ( ifInNUcastPkts,    ifInNUcastPktsT1,     ifInNUcastPktsT2);

              CounterData ( ifInErrors,            ifInErrorsT1,            ifInErrorsT2);

              CounterData ( ifInDiscards,        ifInDiscardsT1,        ifInDiscardsT2);

 

                   DEFINE InPkts                      MAP INT;

                   InPkts = ifInUcastPkts + ifInNUcastPkts;

  

                   DEFINE DeltaT          MAP INT;

                   DeltaT =  Time2 – Time1;

 

                   DEFINE ifDisconTime             MAP INT;

                   ifDisconTime =        ifDisconTime2 – ifDisconTime1;

 

                   IF       (ifDisconTime == 0)

                   THEN

                            

                  DEFINE InTrafUtilization         DB INT;

                    InTrafUtilization = (ifInOctets * 800) / (DeltaT * 10000);

 

                  DEFINE InDataUtilization        DB INT;

                    InDataUtilization = (ifInOctets*8-(InPkts*160))*100 / (DeltaT * 10000);  

 

                   ifInOctetsT1           = ifInOctetsT2;

                   ifInUcastPktsT1      = ifInUcastPktsT2;

                   ifInNUcastPktsT1    = ifInUcastPktsT2;

                   ifInErrorsT1            = ifInErrorsT2;

                   ifInDiscardsT1        = ifInDiscardsT2;

 

                   ENDIF;

          };

          };

   };

END

 


[SOSL Case Studies], [Management Concepts], [NMS Technology R&D]

[Home], [About], [Solutions Center], [NMS Market], [Products & Services],
[Management Technology], [Technical Support], [Contact us], [Site Map]