Hi Vito,

On Thu, May 09, 2013 at 11:36:21AM +0200, [email protected] wrote:

> So now, my concerns are about multiple connection with the same key that
> I've reduced to
> PRIMARY KEY (vlan, ip_src, ip_dst, src_port, dst_port, ip_proto)
> what happens if two connections with the same key set are opened in the
> same sql_hystory period?

They will be aggregated in a single row, their counters (bytes, packets)
will be summed. Is this the desired behaviour? Otherwise you can disable
temporal aggregation (comment out sql_history) and enable logging, ie.
append timestamp_start, timestamp_end to your 'aggregate' configuration
directive.

> From the Wiki page it appears to be that VLAN_ID=0 is a valid value for
> tagged ethernet packet. see 
> http://en.wikipedia.org/wiki/IEEE_802.1Q#Frame_format

OK, put on the todo list. Just let me know how much this is important
to you, ie. you actually running into the case of VLAN 0 being used?,
so that i can assign a priority.

> >> 6) can you suggest me keys to improve general performances
>
> [ .. ]
>
> I ment about pmacct config keys, like the ones related to the plugin
> buffer size, etc

I see. Two that i would recommend are: 1) enable sql_multi_values and
2) enable sql_dont_try_update to prevent using UPDATE queries (which
are expensive). For both i suggest to have a look to CONFIG-KEYS for
more information.

> Last thing, is it possible to write in the DB the timestamp as integer?

Yes. Set sql_history_since_epoch to true. It applies to stamp_inserted
and stamp_updated if sql_history is enabled; and to timestamp_start and
timestamp_end aggregation primitives.

Cheers,
Paolo



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

Reply via email to