Home > Articles > Programming > C/C++

  • Print
  • + Share This
Like this article? We recommend

Trouble in Paradise

Let's assume that the server on Floor 3 handles various tasks such as email, print server hosting, and storage. Let's also assume that the server slows down to a crawl once a day, roughly around the same time. As mentioned above, the connection between the Floor 3 switch and the server is a 10Mbps Ethernet; let's call this Link 1. We want to look at the traffic traversing this link, and Figure 2 provides a closer look.

Figure 2

Figure 2 An important (Ethernet) network link

Link 1 in Figure 2 handles traffic sent to and from the server. To determine the link utilization, we must sample the number of octets (or bytes) received at Interface if2 at different times (T1 and T2) and then average it based on the speed of if2 and the intersample speed. Don't worry if this sounds complicated—it's not!

So, we must apply the following simple formulae to if2; the first one is used to determine the incoming direction, that is, traffic sent to if2 from if1.

Incoming Link Utilization = (T2 ifInOctets.1 – T1 ifInOctets.1) * 8 * 100
                       -----------------------------------------------------
                               ifSpeed * Sample speed

The next formula is used to determine the outgoing traffic from if2; that is, traffic sent to if1 from if2.

Outgoing Link Utilization = (T2 ifOutOctets.1 – T1 ifOutOctets.1) * 8 * 100
                       ---------------------------------------------------------
                                 ifSpeed * Sample speed

In the next section, I'll show how this can be done using SNMP by returning to the source code discussed in [1].

  • + Share This
  • 🔖 Save To Your Account