Hi Paolo, On Fri, 17 Nov 2006, Paolo Lucente wrote:
> Now your idea is much clear to my eyes. And i'm fully positive on its > regards, agreeing with comments dropped before me by both Sven and > Peter. Next weekend i'll gather some time to build up a SVN repository - > astonishment and surprise - for pmacct where i will include the freshest > code snapshot. I hope this is appreciated and will ease the process of > contributing code to the project. > > Chris, do you have any plans to write down some code regarding your > idea? If that's the case, i can help you a bit in planning/integrating > it. At a very rough analysis it would require a basic thread > implementation (no thread pools as thread's creation should be one off > operation, but just mutexes to access the cache) and dropping the > fork(), perhaps replacing it with something similar to a semaphore (ie. > when next sql_refresh_time expires, the main thread will let the other > thread to go). Thoughts? That would be great, thank you! I'm pretty busy for the next few weeks (I'm on contract in Kenya doing bandwidth management for universities here) but I hope that I will be able to at least have a look at the code and see whether I'm capable of implementing it myself. Is it necessary to actually use threads if we're currently forking? Why not just keep the fork? Is the issue shared access to the data tables? On a side note, I'm working on scripts to provide better graphing output from pmacct's database. You might like this one: top 10 local hosts by bandwidth use, generated directly from the SQL database via rrdtool. [http://bmo.aidworld.org/attach/Chris/pmgraph_nazarene.png] I hope to publish these scripts when they're ready, and hope that they will be useful to other pmacct users. Cheers, Chris. -- (aidworld) chris wilson | chief engineer (http://www.aidworld.org) _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
