> > > >> Here's the SQL query I use to get a nice listing of total data downloaded >> per month (June) by each IP: >> >> SELECT month( stamp_inserted), sum(bytes), ip_dst FROM acct_v2 where >> month( >> stamp_inserted) = 6 and ip_dst !='0.0.0.0' GROUP BY MONTH( stamp_inserted >> ), >> ip_dst order by sum(bytes); >> > > You don't use any filters (as i mention in my answer, SEE Enrico EXAMPLE > BELOW) and you will have any internal and external ip-addreses in ip_dst > field. Therefore you must specify in select clause expression for your > network. But better use pmacctd filters. > >
Thanks for the reply. I am getting close to having pmacct working as needed. I know that I am not using pmacct filters, and that's the way I want it. I basically prefer to have all the magic in the SQL queries. I fail to understand why you think this is a bad approach, or why I should be using filters. I don't have to, do I ? The file specified with "networks_file: /etc/pmacct/pmacct-networks" specifies my internal networks, so all other Internet IPs will be stored in the DB as 0.0.0.0, so they won't really interfere with reporting. Please do let me know if you still think I must be using pmacct filters Thanks a million Regards
_______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
