Calculating traffic usage

From ISPWiki
Revision as of 10:56, 15 December 2014 by Ksenya (talk | contribs) (Burstable)
Jump to: navigation, search

Traffic collection methods

DCImanager uses the following methods to collect traffic statistics:

  • From switch poerts.
  • Using NetFlow/IPFIX.

In the "Global settings module" you can select a desired method

Global settings

If the «Enable NetFlow/IPFIX» is not selected, traffic usage information will be collected from switch ports.

Collecting statistics from switch ports

When collecting traffic usage information from switch ports, DCImanager connects to switches and runs the corresponding cron job.

The information is placed into the directory


The cron job is called collectstat. It starts every 5 minutes by default.

NetFlow/IPFIX traffic

To activate traffic collection using NetFlow/IPFIX, select the NetFlow/IPFIX check box in the "Global settings" module and enter an IP address and port to get the information from.


After NetFlow/IPFIX is activated. DCImanager configures and activates the NetFlow collector (nfacctd).

Path to the nfacctd configuration file:


Configure nfacctd by default. We do not recommend that you change the nfacctd settings, as DCImanager regularly rewrites it.

Traffic usage statistics is placed into the /usr/local/mgr5/var/flow/ directory

In the nfacctd configuration file you can select a period to save statistics. The default value is 5 minutes

Once a minute DCImanager checks the /usr/local/mgr5/var/flow/ directory for new files, processes and locates them into /usr/local/mgr5/var/stat/raw/ . Information from the flow directory is deleted.

Processing results

Regardless the collection method selected, the information is placed into the /usr/local/mgr5/var/stat/raw/ directory. DCImanager processes that information once an hour. The data are placed into the DCImanager database. The files that were processed are removed from the raw directory.

Statistical information in the control panel is updated once an hour. This period is specified in the DCImanager code and cannot be changed.


Burstable is the channel load collected every 5 minutes. Top 5% are ignored.

Please note, if NetFlow/IPFIX is used to collect traffic usage, Burstable statistics can be innacurate, as the NetFlow collector records only long connections into the file.

Data for collecting burstable are taken from the directory:


Data from the raw directory are placed into the mon directory. I.e. after DCImanager processed the information from the raw directory, the data are placed into the mon directory to collectburstable.


If NetFlow/IPFIX is used for traffic collection, make sure that:

  • nfacctd is up and running
  • the statistics files are added into the flow director (please note that the files will be shown in that directory for a shot period of time, as DCImanager deletes data once a minute).

  • traffic from the NetFlow agent (tcpdump) is sent to the IP address and port that you selected in the Global settings module, ip и порт прилетает трафик от NetFlow агента (tcpdump вам в помощь)

If traffic is collected from switch ports, go to the "Switches" section -- Ports to check that the load is changed every 5 minutes. If not, this means connection problems with that switch or the switch might be not compatible with the control panel.

Moreover, if the server is connected to incorrect port switches (Servers--Connected devices), traffic wont' be collected or incorrect results will be shown.

When the traffic statistics is placed into the raw directory, in the control panel's log you can see the following information:



From switch ports

Add Stat For server 2 ip * NetFlowStat is OFF pilicy all_server

(NetFlow data are sent in one flow, switches send them in a separate flow).