Hi Frederic, On Wed, Nov 21, 2012 at 09:31:12PM +0000, Fr?d?ric GABUT-DELORAINE wrote:
> Ok perfect. I can listen on two ports and I will configure the routers to use > an other port. Great. > However I do not understand how I have to configure the nfacctd and the > sfacctd in order to have a single aggregate plugin. For example, I'd like to > have statistics aggregated from both netflow and sflow when I run > > pmacct -s -T bytes -p /tmp/as_stats.pipe This is not possible since memory tables are private to each daemon. A solution is - like you propose - to query each daemon, write to a file and sort: you can either write a script (ie. use Perl & hashes) or use shell tools. I'd recommend the first solution since the shell tools have drawbacks you will incur: 1) slowness when much data is to be sorted and 2) sorting is positional with tools like sort or awk: you should know in advance which column number you want to sort on: changing aggregation method will change output. Consider an equivalent alternative to the memory plugin is the print plugin, writing to files (or perhaps even the same file?) in CSV format straight from pmacct. A different solution - clean but more elaborated - could be to use something lightweight like SQLite or a MySQL table with a memory engine: point both daemons to the same file/table and leverage SQLite/ MySQL engines for quick sorting on the fly - and SQL language for flexible querying of the data. Then you can persistently store output wherever you are already storing it today. How does this sound? Cheers, Paolo _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists