Internet Traffic, Data consumption monitoring

Yocto Implementation on

  • Apalis i.MX8qm
  • Ixora V1.2
  • Dunfell Branch

We want to monitor the network traffic on the board something like vnstat does. However the one implementation we found was of iftop, which doesn’t suit our needs.

The task is to record, the data rxd, txd over a period of time like vnstat offers. Any other implentations or ways to do this?

https://layers.openembedded.org/layerindex/recipe/152439/

vnstat seems to be available on yocto, did you try it?

We are building using the dunfell branch. vnstat is not available on that branch

https://layers.openembedded.org/layerindex/branch/dunfell/layer/meta-networking/

I just copied the BB file from the gatesgarth layer and placed it in my custom meta package, and it’s compiling and working pretty well.

@luciolis
We tried, and it works too. Thank you.

One more thing, I want to get the output for a specific duration of the day.

vnstat -i eth0 -b 2022-04-06 15:00 -e 2022-04-06 15:30 --json

Output:

Unknown parameter “15:00”. Use --help for help.

If the command is passed without time information, it gives the output. What am I missing here?

For future reference,

The date/time information should be in quotes

vnstat -i eth0 -b “2022-04-06 15:00” -e “2022-04-06 15:30” --json

Records are available with this.