Hi Paolo, thank you very much for your help and a great software! pmacct is exactly what I was looking for. I used a snmp based solution for accounting my traffic from switches. "rtg" did the job but I needed more detailed statistics and IP based accounting, upgrading to *Flow enabled hardware was no option so pmacct is a great improvement and works perfectly.
To roundup my solution I need to calculate monthly totals per IP but after digging through the config keys, faq, and this lists archive I am still not quite sure how to implement it correctly. my config (excerpt): aggregate: sum_host networks_file: /etc/pmacct/networks.lst sql_table: acct_v4 sql_refresh_time: 60 sql_optimize_clauses: true sql_history: 1h sql_history_roundoff: mhd fills my table at one row per IP per hour (stamp_inserted). Ok. Using "sum(bytes)" I get my totals but how to get the correct time period (month)? Of course I could extend the query and include stamp_inserted >= 1st of month. Is this the intended method / best practice? I have read about filling two tables one for the detailed information and one for a monthly total (one row per ip per month). Thanks for any help! regards daniel _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
