Hi!
Here it is:
# cat v1_db_schema_in_monthly.mysql
create table acct_in_%Y_%m (
mac_src CHAR(17) NOT NULL,
mac_dst CHAR(17) NOT NULL,
ip_src CHAR(15) NOT NULL,
ip_dst CHAR(15) NOT NULL,
src_port INT(2) UNSIGNED NOT NULL,
dst_port INT(2) UNSIGNED NOT NULL,
ip_proto CHAR(6) NOT NULL,
packets INT UNSIGNED NOT NULL,
bytes BIGINT UNSIGNED NOT NULL,
stamp_inserted DATETIME NOT NULL,
stamp_updated DATETIME,
PRIMARY KEY (mac_src, mac_dst, ip_src, ip_dst, src_port, dst_port,
ip_proto, stamp_inserted)
);
# cat v1_db_schema_out_monthly.mysql
create table acct_out_%Y_%m (
mac_src CHAR(17) NOT NULL,
mac_dst CHAR(17) NOT NULL,
ip_src CHAR(15) NOT NULL,
ip_dst CHAR(15) NOT NULL,
src_port INT(2) UNSIGNED NOT NULL,
dst_port INT(2) UNSIGNED NOT NULL,
ip_proto CHAR(6) NOT NULL,
packets INT UNSIGNED NOT NULL,
bytes BIGINT UNSIGNED NOT NULL,
stamp_inserted DATETIME NOT NULL,
stamp_updated DATETIME,
PRIMARY KEY (mac_src, mac_dst, ip_src, ip_dst, src_port, dst_port,
ip_proto, stamp_inserted)
);
Thanks
El 03/06/11 10:46, Paolo Lucente escribió:
> Hi Luis,
>
> Can you please post the content of either of the schema files, ie.
> '/etc/pmacct/v1_db_schema_in_monthly.mysql'. It seems you are doing
> everything correct - will try to reproduce your issue asap. Keep you
> posted.
>
> Cheers,
> Paolo
>
> On Thu, Jun 02, 2011 at 01:34:30PM +0200, Luis Gal?n wrote:
>> Hi guys!
>>
>> I have built the pmacct 0.14.0rc1 and I would like the following result:
>> * I store the accounting data on monthly tables: acct_in_%Y_%m (Done!)
>> * I store the accounting data each 20 minutes, 1 record by day/ip address
>> * I would like each 1st of month, pmacctd creates a new monthly table
>> with format acct_in_%Y_%m
>>
>> It seems to work fine but when month change from June to July (i.e.),
>> the new monthly table acct_in_2011_07 is not created automatically.
>> Instead it tries to create again the June table acct_in_2011_06
>> It is only created if I restart the pmacctd daemon.
>>
>> I try to simulate the month change setting the system data to 2011-07-01
>> with command "date --set 2011-07-01" and it seems the pmacct detect the
>> changing date but it still thinks it is in june because it tries to
>> create the june monthly table and the start timestamp is still in the
>> real datetime (june).
>>
>> Can someone help me to solve this?
>> What am I doing wrong?
>>
>> [ ... ]
>
> _______________________________________________
> pmacct-discussion mailing list
> http://www.pmacct.net/#mailinglists
--
*Luis Galán Gragera*
SYSTEMS INFRASTRUCTURE MANAGER
[email protected] <mailto:[email protected]>
Información General: 902 884 633
Centro Soporte Soluciones: 902 884 622
Provisión: 902 884 802
Fax: +34 934 451 920
Claranet
Hosting / Redes / Aplicaciones
c/Juan Gris, 10-18, Torres Cerdà
08014 Barcelona
www.claranet.es <http://www.claranet.es>
_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists