Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

sflowtool 接收到数据,是如何来计算源IP到目的IP地址的流量?How to calculate the traffic from the source IP to the destination IP address after receiving data? #46

Open
315xiaoyao opened this issue Dec 4, 2023 · 1 comment

Comments

@315xiaoyao
Copy link

场景:

  1. SW--->sflowtool--->kafka<----python去消费数据,现在的问题就是能提取出具体的五元组信息,但是不知道如何计算这个带宽是多少?
    1
@sflow
Copy link
Owner

sflow commented Dec 4, 2023

Generating an estimate of the traffic total between IP addresses (or other potential keys) is outside the scope of sflowtool. There is an ecosystem of other tools that do this. However it's worth linking from here to documents that explain the principles.

Summary: The simplest way is to scale by the indicated sampling-rate, but this assumes the switch is actually sampling at that rate and that there is no packet loss. The more robust approach is to compute the effective sampling rate by observing the delta in the sample_pool field, and then scale by that. Statistically what you get is a best-estimate with a confidence-interval.

Here are the relevant documents:
http://www.sflow.org/packetSamplingBasics/index.htm
http://www.inmon.com/pdf/sFlowBilling.pdf

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

No branches or pull requests

2 participants