Hi Paolo,

D'oh! Why didn't I think of that. I actually even noticed the files being updated every "few" seconds. Should've realized that "a few" might equal 5 ;-)
Changing 5m to 300 seems to be doing the trick.

Next steps:
* Try to find a "clean" way to handle MAC address changes. I'll probably resort to using template config files with a placeholder for the MAC address and then at the start of each 5 minute check the current MAC with the current one and replace if needed. If aggregate_filter would accept a filename, this would be even easier/cleaner. *hint* *hint* ;-) * Streamline my pmacct<->rrdtools script a bit (mostly deleting of crappy code that got obsoleted by the use of the print plugin).

After that, I might even deem the scripts good enough for public consumption. Then again, that'd require writing at least some sort of documentation...

Regards,
Ruben Laban

On 28/Mar/2012 08:24, Paolo Lucente wrote:
Hi Ruben,

You should rewrite the argument of the print_refresh_time directive
to 300 - instead of 5m. I suspect files are being actually written
every 5 secs.

Cheers,
Paolo

On Tue, Mar 27, 2012 at 09:14:13PM +0200, Ruben Laban wrote:
Hi,

I've starting playing with the print plugin in an attempt to simplify my
current traffic accounting setup. I'm running into an odd issue tho. I'm
using the following config:

daemonize: true
aggregate[in]: dst_host
aggregate[out]: src_host
aggregate[in_total]: none
aggregate[out_total]: none
aggregate_filter[in]: ether dst 00:1c:23:e1:8a:01
aggregate_filter[out]: ether src 00:1c:23:e1:8a:01
aggregate_filter[in_total]: ether dst 00:1c:23:e1:8a:01
aggregate_filter[out_total]: ether src 00:1c:23:e1:8a:01
plugins: print[in], print[out], print[in_total], print[out_total]
interface: up0
print_output_file[in]: /tmp/pmacct_up0_in_%Y%m%d-%H%M
print_output_file[out]: /tmp/pmacct_up0_out_%Y%m%d-%H%M
print_output_file[in_total]: /tmp/pmacct_up0_in_total_%Y%m%d-%H%M
print_output_file[out_total]: /tmp/pmacct_up0_out_total_%Y%m%d-%H%M
print_refresh_time: 5m
print_time_roundoff: m
print_markers: true
print_output: csv
print_num_protos: true

I'd expect new files to appear every 5 minutes, but they actually do
appear every minute. Is this expected behavior or not? (Judging from the
docs I'd say it's not.)

Regards,
Ruben Laban

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists


_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to