Hi Thomas,

Can you please elaborate where you get such error? It looks the
variables are not expanded but i'm not sure if you are making use
of the 'sql_table_schema' configuration directive or not.

Cheers,
Paolo

On Sun, Mar 28, 2010 at 04:29:00PM +1100, Thomas wrote:
> Hi,
> 
> I'm lost. I tried to use dynamic table names but the tables aren't created by 
> pmacctd and nothing is collected.
> There is always message about syntax error:
> 
> error : You have an error in your SQL syntax; check the manual that 
> corresponds to your MySQL server version for the right syntax to use near 
> '%Y%m%d ( 
> ' at line 1
> 
> create table acct_v7_outgoing_%Y%m%d (                                        
>                                                                               
>                               
>     agent_id INT(4) UNSIGNED NOT NULL,                                        
>                                                                               
>                               
>     class_id CHAR(16) NOT NULL,                                               
>                                                                               
>                               
>     mac_src CHAR(17) NOT NULL,                                                
>                                                                               
>                               
>     mac_dst CHAR(17) NOT NULL,                                                
>                                                                               
>                               
>     vlan INT(2) UNSIGNED NOT NULL,                                            
>                                                                               
>                               
>     as_src INT(4) UNSIGNED NOT NULL,                                          
>                                                                               
>                               
>     as_dst INT(4) UNSIGNED 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,                                        
>                                                                               
>                               
>     tcp_flags INT(4) UNSIGNED NOT NULL,                                       
>                                                                               
>                               
>     ip_proto CHAR(6) NOT NULL,.                                               
>                                                                               
>                               
>     tos INT(4) UNSIGNED NOT NULL,.                                            
>                                                                               
>                               
>     packets INT UNSIGNED NOT NULL,                                            
>                                                                               
>                               
>     bytes BIGINT UNSIGNED NOT NULL,                                           
>                                                                               
>                               
>     flows INT UNSIGNED NOT NULL,                                              
>                                                                               
>                               
>     stamp_inserted DATETIME NOT NULL,                                         
>                                                                               
>                               
>     stamp_updated DATETIME,                                                   
>                                                                               
>                               
>     PRIMARY KEY (agent_id, class_id, mac_src, mac_dst, vlan, as_src, as_dst, 
> ip_src, ip_dst, src_port, dst_port, ip_proto, tos, stamp_inserted)            
>                                
> );   
> 
> 
> uname -a:
> Linux gateway 2.6.31-gentoo-r6 #5 Wed Jan 6 16:43:32 EST 2010 i686 Intel(R) 
> Celeron(R) CPU 2.50GHz GenuineIntel GNU/Linux
> 
> mysql --version:
> mysql  Ver 14.12 Distrib 5.0.90, for pc-linux-gnu (i686) using readline 6.0
> 
> pmacctd -h:
> 
> Promiscuous Mode Accounting Daemon, pmacctd 0.12.0
> 
> Cheers,
> Thomas Cale


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

Reply via email to