Calculating traffic usage

From ISPWiki
Revision as of 10:45, 15 December 2014 by Ksenya (talk | contribs) (NetFlow/IPFIX traffic)
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).

Файл конфигурации nfacctd имеет следующий путь


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 - нагрузка на канал связи - рассчитывается как набор измерений нагрузки собранных с интервалом в 5 минут. 5 % максимальных измерений отбрасывается.

Нужно учитывать, что если трафик собирается по NetFlow/IPFIX , то статистика по Burstable может быть немного искажена, так как NetFlow коллектор длинные соединения записывает в файл только по завершении соединения.

Данные для расчета burstable нагрузки берутся из диреткории


В директорию mon данные складываются из директории raw. То есть после того, как DCImanager обработал новую статистику из raw директории, данные складываются в mon директорию для расчета burstable.


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).