Hi Paolo,
On Fri, 29 Jun 2012, Paolo Lucente wrote:
On Tue, Jun 26, 2012 at 10:13:30AM +0100, Chris Wilson wrote:
OK, testing now. Would it be possible for pmacctd to log a warning if
it exceeds any of these thresholds, to help with tuning without wasting
memory?
In a way you reckon things go wrong from the process list: the MySQL
plugin writer process mentions the wording 'emergency' if the write was
due to an unscheduled event. Then you know the value of the cache
entries is too low. It's a good idea (and easy to implement) what you
propose: when an emergency writer is triggered - then write the event to
the logfile aswell. Adding to my todo list.
Thanks for doing that :) I'm testing the latest CVS now.
Is it possible that it either failed to remove some records from the
cache, or calculated the timestamp of the database records incorrectly?
Well, the former case would be a bug; the latter is not really possible
unless somebody is playing with date on the system: pmacctd and uacctd
just use timestamps feeded by the underlying library. Is it possible the
DB is underperforming and a commit from the previous hour is taking long
to finish? Do you see a 1:1 relationship between the MySQL plugins and
the writers when you have a look to the process list?
I don't think we have writers taking an hour to write. The system isn't
that heavily loaded.
I did notice that restarting the daemon generates these duplicate key
errors. Restarting isn't completely compatible with an "always insert"
configuration and unique primary keys.
I haven't reproduced the original problem yet.
On an unrelated note, how hard would it be to get the log message from
ULOG stored in the database, for example in the classification field? I
had a look through the code but I couldn't see any way to store this
field from the received packet into the in-memory structure used to track
flows.
Cheers, Chris.
--
Aptivate | http://www.aptivate.org | Phone: +44 1223 967 838
Future Business, Cam City FC, Milton Rd, Cambridge, CB4 1UY, UK
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