How to measure bandwidth consumption on Linux server?

How can we monitor bandwidth consumption on Linux server?

Q: We need to know how much bandwidth consumes our Linux server. What is the simplest means to accomplish that?

A: IPHost Network Monitor, since version 3.5, offers SNMP Traffic Volume monitor. The sequence of its setup is described below.

SNMP Traffic Volume monitor description

Start New Monitor wizard and select Traffic category on the left and SNMP Traffic Volume monitor:

On the next screen select host name and check, if required, the checkbox to start monitor upon creation.

On the third screen set the monitor’s parameters. Note that we only will comment on monitor type-specific settings; all the rest are common settings for monitors, explained in online help.

Select network interface (if necessary) to measure traffic speed for. Click on Select button to the right of Interface Name value to see the entire list of interfaces reported by SNMP:

Most probably you will see several interfaces, but you only should be interested in those with assigned IP address. If a target host is powered by Windows OS, you can run ‘ipconfig /all’ command in cmd.exe on the target host to make sure you selected the correct interface. If the target host is a UNIX-like machine, you can run ‘ifconfig’ command in a shell window on the target host to view the list of its network interfaces and check if you selected to correct one.

Program will prefill Interface Bandwidth (network interface speed capacity). However, you can change that value if required. This value is used to normalize measured value, if percentage is selected (see below). Note: if set to zero, program will assume the value of 1.

Measure (traffic) drop-down list allows you to measure total (incoming and outgoing) traffic volume (by default), incoming or outgoing only. Note: when Data Set is changed, the statistics calculated so far will be reset. You will be warned by a pop-up window if you choose to alter Data Set.

and show (traffic) as allows you to choose how to display the calculated traffic volume: in kilobytes, megabytes or gigabytes. Default is in megabytes.

Store traffic data for allows you to set the time interval to store traffic data for monitor being created.

SNMP credentials are required to access data. Please refer to monitor parameters online help reference for explanations.

You can select granularity in minutes, hours, days, weeks or months. Note that time interval means from what distance in the past is traffic volume measured. I.e., if 1 hour is set, then the traffic measurement starts from exactly one hour ago till current moment.

WMI and SNMP monitoring comparison

SNMP (Simple Network Management Protocol) is actually standard protocol used to request information from network devices and/or control certain functions of those. In case of Windows you can use either WMI or SNMP traffic volume monitors. The choice is entirely up to you; if you have a heterogeneous network, SNMP method can be used for uniformity, since WMI is Windows-only means.

Note: you need to explicitly enable SNMP Services on Windows computer you need to monitor (via Add/Remove Windows Components). Don’t forget to right-click on the services to set up required parameters such as community names. Please refer to Net-SNMP documentation on the meaning of those settings.

The two methods to monitor traffic volume can return slightly different results, due to many a difference of measurement approaches.

Related topics

How to monitor Windows system traffic volume via WMI?