Hi Suraj,

On Thu, 11 Jun 2009, Suraj Nellikar (snellika) wrote:

> I am analyzing the netflow packets in the mysql database. I see that 
> they are not ordered according to the flow. What is the criteria for 
> ordering the packets in the table? The "stamp updated" field shows the 
> same time for all the entries. What is the "stamp updated" field?

The ordering does not really matter as you can choose any order that you 
want by using the ORDER BY option on the SELECT statement when you 
retrieve data from the database.

MySQL always stores records on disk in the order determined by the primary 
key, if any, but the order of the returned records is random unless ORDER 
BY is specified. The default primary key includes all fields, I think. You 
can use "SHOW KEYS FROM acct_v7" to display the fields in the primary key 
in MySQL.

stamp_updated is the timestamp that the record was last touched by an 
INSERT or UPDATE statement by pmacct. Every sql_refresh_time (e.g. 60 
seconds) within the sql_history interval (e.g. 5 minutes, 1 hour) pmacct 
will update the record and change stamp_updated to the current time.

If you set sql_refresh_time = sql_history, then pmacct should only insert 
records, not update them, and then the stamp_updated says when the record 
was inserted.

Cheers, Chris.
-- 
Aptivate | http://www.aptivate.org | Phone: +44 1223 760887
The Humanitarian Centre, Fenner's, Gresham Road, Cambridge CB1 2ES

Aptivate is a not-for-profit company registered in England and Wales
with company number 04980791.

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

Reply via email to