Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Formatted output always reports 0 for initial tx/rx rate #86

Open
SLongofono opened this issue Nov 4, 2020 · 0 comments
Open

Formatted output always reports 0 for initial tx/rx rate #86

SLongofono opened this issue Nov 4, 2020 · 0 comments

Comments

@SLongofono
Copy link

Issue Type:
Bug report

What happened:
Using formatted output along with quitafter always incorrectly returns 0 traffic for the first output reported, regardless of the sampling interval or the number of outputs specified via quitafter.

Steps to reproduce:
Monitor an interface with active connections, for example 'eth*'.
Issue the command:

bmon -p eth* -o format:'fmt=$(element:name)\t$(attr:rxrate:bytes)\t$(attr:txrate:bytes)\n;quitafter=5'

If the rate interval is adjust downward, this behavior tends to appear on more of the outputs. For example, at a rate of 0.05, the first 3 outputs show 0 traffic on all interfaces.

What was the expected behavior:
The library should report only traffic it has actually observed. The fact that this behavior occurs on more than the first output as the rate interval is reduced suggests that this bug is related to not having enough time to make a traffic observation. Reporting 0 traffic because there has not been enough time to make an observation is misleading, and arguably worse than not reporting at all.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant