Fernando
you have to grab the sampling rate from the sflow packets and multiply incoming 
traffic by such factor. See (in sflowplugin.c)

  u_int32_t sampling_rate;        /* fsPacketSamplingRate */
  u_int32_t sample_pool;          /* Total number of packets that could have 
been                                              
                                     sampled (i.e. packets skipped by sampling  
                                               
                                     process + total number of samples) */

it should pretty trivial. The only thing to do it to make sure that you handle 
this for all sflow versions. Please try to hack some come and come back to me 
so we can refine it together

luca

On Mar 3, 2010, at 4:05 PM, Fernando Calvelo Vazquez wrote:

> Luca... could you give some tips about where to code it?
> Thanks in advance.
> 
> 
> Fernando wrote:
>> Luca Deri wrote:
>>> On Feb 19, 2010, at 5:30 PM, Fernando Calvelo Vazquez wrote:
>>> 
>>> 
>>>> Yes, that's it! To get a more realistic output. Right now it's only 
>>>> summarizing info from sampled packet (only reporting a few bits), it's not 
>>>> performing any estimation about real traffic.
>>>> How I could achieve that?
>>>>    
>>> 
>>> You need to code this into the sflow plugin and expand each packet by the 
>>> sampling rate. Is this something you're willing to do?
>>> 
>>>  
>> It is something that is already done, in this way, by some others of your 
>> competitors (like InterMapper Flows). They simply multiply received sFlow 
>> info by the sampling rate (and it gives to you a more approximately global 
>> vision of real traffic).
>> So... what I should modify then on the sflow plugin?
>> Thanks a lot in advance for your help Luca.
>> Cheers,
>> 
>>    Fernando.
>> 
>>> Luca
>>> 
>>>> Cheer,
>>>> 
>>>>  Fernando.
>>>> 
>>>> Luca Deri wrote:
>>>>   
>>>>> Fernando
>>>>> you basically would like ntop to scale up numbers based on the sampling 
>>>>> rate?
>>>>> 
>>>>> Luca
>>>>> 
>>>>> On Feb 15, 2010, at 9:23 AM, Fernando Calvelo Vazquez wrote:
>>>>> 
>>>>>      
>>>>>> Anyone has any ideas about how to scale traffic captured by sFlow 
>>>>>> sampling?
>>>>>> Thanks a lot in advance.
>>>>>> 
>>>>>> 
>>>>>> From: Fernando Calvelo Vazquez <[email protected]>
>>>>>> Date: February 11, 2010 12:21:10 PM GMT+01:00
>>>>>> To: [email protected]
>>>>>> Subject: [Ntop] sFlow & Sampling Rate
>>>>>> Reply-To: [email protected], [email protected]
>>>>>> 
>>>>>> 
>>>>>> Hi everybody:
>>>>>> 
>>>>>> I'm using nTop as sFlow collector.
>>>>>> My switches are sending sFlow sampling packets at 8192 sampling rate.
>>>>>> I would like to know how I could do to show real averages/rates on 
>>>>>> summary reports, taking into account this "sampling rate". (Right now 
>>>>>> reports seem to show summarized traffic as if it was captured 1 per 1 
>>>>>> packet. They only show a few bits of traffic averages).
>>>>>> 
>>>>>> Thanks in advance.
>>>>>> 
>>>>>>  Fernando.
>>>>>> _______________________________________________
>>>>>> Ntop mailing list
>>>>>> [email protected]
>>>>>> http://listgateway.unipi.it/mailman/listinfo/ntop
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> Ntop mailing list
>>>>>> [email protected]
>>>>>> http://listgateway.unipi.it/mailman/listinfo/ntop
>>>>>>           
>>>>> ---
>>>>> Keep looking, don't settle - Steve Jobs
>>>>> 
>>>>> 
>>>>>       
>>>> _______________________________________________
>>>> Ntop mailing list
>>>> [email protected]
>>>> http://listgateway.unipi.it/mailman/listinfo/ntop
>>>>    
>>> 
>>> ---
>>> 
>>> "Debugging is twice as hard as writing the code in the first place. 
>>> Therefore, if you write the code as cleverly as possible, you are, by 
>>> definition, not smart enough to debug it. - Brian W. Kernighan
>>> 
>>> 
>>>  
>> 
>> 
> 
> _______________________________________________
> Ntop mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop

---
Keep looking, don't settle - Steve Jobs

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to