Hi Paolo,

Ah, thanks! Seems this was a change between 0.14.x and 1.5.x. I based my config on a production config which is still on 0.14.x.

This is what I found in the changelog of 1.5.0rc1:

+ print plugin: introduced print_history configuration directive, which
  supports same syntax as, for example, sql_history. When enabled, time-
  related variables substitution of dynamic print_output_file names are
  determined using this value instead of print_refresh_time one.

Seems like this explanation isn't exactly true anymore, as print_refresh_time was already defined.

Anyways, I'm glad this is now working as expected again and I can continue with this (small) implementation.

Regards,
Ruben

On 15-12-2015 01:33, Paolo Lucente wrote:
Hi Ruben,

It should be just matter of adding print_history to your config,
ie. 'print_history: 5m' for 5 mins time-bins.

Cheers,
Paolo

On Mon, Dec 14, 2015 at 01:12:27PM +0100, Ruben Laban wrote:
Hi,

Today I ran into an issue with pmacctd which feels familiar, but I
can't remember how I fixed it before (assuming that I in fact did
so).

This is the config I use:

debug: true
daemonize: false
aggregate[em2-detail]: src_mac, dst_mac, src_host, dst_host, proto,
src_port, dst_port
plugins: print[em2-detail]
plugin_buffer_size: 10240
plugin_pipe_size: 10240000
files_umask: 027
interface: em2
promisc: false
pidfile: /var/run/pmacctd.pid-em2
print_output_file[em2-detail]:
/var/lib/trafstat/spool/up0-detail/%s-%Y%m%d-%H%M
print_refresh_time: 60
print_time_roundoff: m
print_markers: true
print_num_protos: true
print_output: csv

The "debug" and "daemonize" settings are like this for
testing/troubleshooting.

As for the problem, all I get is this:

$ sudo find /var/lib/trafstat/ -ls
21265175    4 drwx------   3 root     root         4096 Dec 14 14:52
/var/lib/trafstat/
21397023    4 drwx------   3 root     root         4096 Dec 14 14:52
/var/lib/trafstat/spool
21397024    4 drwx------   2 root     root         4096 Dec 14 14:52
/var/lib/trafstat/spool/up0-detail
21397025  216 -rw-r-----   1 root     root       218572 Dec 14 15:36
/var/lib/trafstat/spool/up0-detail/0-19700101-0530

$ sudo head -1 /var/lib/trafstat/spool/up0-detail/0-19700101-0530
--START (0+60)--

As you can see, the timestamp doesn't get populated properly. As for
the 0530, the box is located in Sri Lanka with it's funky timezone.

Any clues as to what might the underlying issue here?

Regards,
Ruben

_______________________________________________
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