Thanks Paolo,

I have managed to get the actual value by dividing the sum bytes over
the (time_updated - time_inserted) for 5 mins interval.

I will try the configuration suggested by you.

Cheers!

On Wed, Nov 2, 2011 at 4:40 PM, Paolo Lucente <[email protected]> wrote:
> Hi Wai Phang,
>
> Counters are built over a period of 5 minutes. So you must also divide
> by 300 (secs) to get a Mbps value. Thing is by doing that the new value
> sits around 18-20 Mbps rather than 100Mbps. At this propo I see that
> your sql_refresh_time value (60) is not aligned with sql_history (5m),
> which is perfectly legal but clashes with 'sql_dont_try_update: true'.
> Either go for:
>
> sql_refresh_time: 300
> sql_history: 5m
> sql_dont_try_update: true
>
> Or for:
>
> sql_refresh_time: 60
> sql_history: 5m
> sql_dont_try_update: false
>
> What looks to be happening now is that only the first 60 secs worth of
> data out of the 300 secs timeslot are inserted in the database and the
> rest is going lost. And multiplying 18-20Mbps by 300/60 (5) we get back
> to your expected 100Mbps value.
>
> Cheers,
> Paolo
>
> On Wed, Nov 02, 2011 at 01:20:04PM +0800, Wai Phang wrote:
>> Hi there,
>>
>> I am working on pmacct to get the aggregated bandwidth utilization of
>> different incoming source AS from my switches.
>>
>> However, when I compared the aggregated bytes in the sql table against
>> my snmp, the differences is about 50 over times.
>>
>> For example, for a particular AS, I am getting the below, converted to
>> Mb but from my SNMP RDD, the utilization for that AS if only 100Mb for
>> that period.
>>
>> +---------------------------+------------------------+
>> | stamp_inserted         | bytes*8/1000000 |
>> +----------------------------+-----------------------+
>> | 2011-11-02 13:05:00 |       5602.0440     |
>> | 2011-11-02 13:10:00 |       4767.3149     |
>> +----------------------------+-----------------------+
>>
>> What am I missing here? Thanks!
>>
>> Below is my configurations.
>>
>> =======================
>> daemonize: true
>> debug: true
>> plugins: mysql
>> plugin_pipe_size:10240000
>> plugin_buffer_size:10240
>> sfacctd_port: 6343
>> sfacctd_renormalize: true
>> aggregate: src_as
>> sql_user: root
>> sql_passwd:
>> sql_table_version: 6
>> sql_refresh_time: 60
>> sql_history: 5m
>> sql_history_roundoff: m
>> logfile: sf.log
>> sql_dont_try_update: true
>> =======================
>>
>> _______________________________________________
>> pmacct-discussion mailing list
>> http://www.pmacct.net/#mailinglists
>
> _______________________________________________
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists
>

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to