Hello Andre,
how to aggregate your traffic depends on your needs. If you are just
interested in having the grand total of bytes transferred over your DSL
then i would suggest to use 'none' instead of any 'sum_whatever': you
are absolutely not interested in any primitive, you don't want to know
who generates your traffic; you need only to roll counters. 
If, instead, you wish to know who generates your traffic maybe the
'sum_host' may better suit your needs.

Having successfully compiled pmacctd with PostgreSQL support i would also
advice to take rid of it and forget the memory plugin. Enable historical
breakdown of counters so it could help with calculations ('sql_history'
config directive).

Then, crontab. Few lines of shell script and some SQL query via 'psql'
client. A bare example:

[ -- ]
#!/bin/bash

PGPASSWORD="arealsmartpwd"
export PGPASSWORD

COUNT=`psql -U pmacct -t -c "SELECT SUM(bytes) FROM acct_v2;"`

...
[ -- ]

The script should continue evaluating what numeric value has $COUNT and
trapping some action if needed. A pmacctd configuration which could fit
for your needs could be the following:

[ -- ]
...
interface: en1
aggregate: none
sql_history: ...
sql_history_roundoff: M
! plugin_pipe_size: 512000
plugin_buffer_size: 1024
...
[ -- ]

Cheers,
Paolo

PS: thank you for inaugurating the list. Yours has been the first message
here.

Reply via email to