Slava Dubrovskiy
Mon, 30 Nov 2009 05:05:02 -0800
27.11.2009 19:09, Paolo Lucente пишет: > Hi Slava, > > On Thu, Nov 26, 2009 at 02:42:22PM +0200, Slava Dubrovskiy wrote: > > >> I use "killall INT nfacctd" and "killall -s INT nfacctd" and by script >> >> [ ... ] >> >> Not work. But previos version (rc2) working good. >> > Don't manage to reproduce the issue with rc3 on Linux and Solaris; i > see it working fine. Can you please check the version in the CVS? > > Say you start the daemon with debug enabled but without daemonizing > and without logging to a file or syslog; on another screen you send > the "killall -INT nfacctd": what sort of output do you see on the > screen where you did launch nfacctd? I see such errors: DEBUG ( nfacctd.conf ): debug:true INFO ( default/core ): Trying to (re)load map: /etc/pmacct/pretag.map INFO ( default/core ): map '/etc/pmacct/pretag.map' successfully (re)loaded. INFO ( t1/mysql ): Pipe size obtained: 135168 / 400. INFO ( t2/mysql ): Pipe size obtained: 135168 / 400. DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: c0a80100, mask: ffffff00 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05ead40, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05eaf00, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): IPv4 Networks Cache successfully created: 99991 entries. DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: c0a80100, mask: ffffff00 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05ead40, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05eaf00, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): IPv4 Networks Cache successfully created: 99991 entries. INFO ( t3/mysql ): Pipe size obtained: 135168 / 400. DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: c0a80100, mask: ffffff00 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05ead40, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05eaf00, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): IPv4 Networks Cache successfully created: 99991 entries. INFO ( t4/mysql ): Pipe size obtained: 135168 / 400. DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: c0a80100, mask: ffffff00 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05ead40, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05eaf00, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): IPv4 Networks Cache successfully created: 99991 entries. DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: c0a80100, mask: ffffff00 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05ead40, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): (networks table IPv4) AS: 0, net: d05eaf00, mask: ffffffc0 DEBUG ( /etc/pmacct/networks.list ): IPv4 Networks Cache successfully created: 99991 entries. INFO ( default/core ): waiting for NetFlow data on 0.0.0.0:8818 DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) DEBUG ( default/core ): Discarded NetFlow V9 packet (R: unknown template 256 [192.168.21.1:0]) ( t3/mysql ) *** Purging queries queue *** ( t4/mysql ) *** Purging queries queue *** ( t2/mysql ) *** Purging queries queue *** ( t1/mysql ) *** Purging queries queue *** ( t3/mysql ) *** Purging cache - START *** ( t1/mysql ) *** Purging cache - START *** ( t4/mysql ) *** Purging cache - START *** ( t2/mysql ) *** Purging cache - START *** DEBUG ( t2/mysql ): 3 VALUES statements sent to the MySQL server. ERROR ( t2/mysql ): Duplicate entry '0-5-2009-11-28 02:00:00' for key 1
DEBUG ( t4/mysql ): UPDATE `acct_t4` SET packets=packets+15904,
bytes=bytes+3192408, flows=flows+0, stamp_updated=NOW() WHERE
FROM_UNIXTIME(1259359200) = stamp_inserted AND vlan=0 AND
src_port=0 AND dst_port=0 AND tos=0 AND ip_proto='ip' AND agent_id=0 AND
agent_id2=5 AND mac_src='0:0:0:0:0:0' AND mac_dst='0:0:0:0:0:0' AND
ip_src='0.0.0.0' AND ip_dst='0.0.0.0'
( t2/mysql ) *** Purging cache - END (QN: 4, ET: 1) ***
DEBUG ( t4/mysql ): UPDATE `acct_t4` SET packets=packets+17329,
bytes=bytes+12364397, flows=flows+0, stamp_updated=NOW() WHERE
FROM_UNIXTIME(1259359200) = stamp_inserted AND vlan=0 AND
src_port=0 AND dst_port=0 AND tos=0 AND ip_proto='ip' AND agent_id=0
AND agent_id2=6 AND mac_src='0:0:0:0:0:0' AND mac_dst='0:0:0:0:0:0' AND
ip_src='0.0.0.0' AND ip_dst='0.0.0.0'
DEBUG ( t1/mysql ): 400 VALUES statements sent to the MySQL server.
ERROR ( t1/mysql ): Duplicate entry
'0-0.0.0.0-208.94.173.101-0-0-udp-2009-11-28 02:00:00' for key 1
DEBUG ( t3/mysql ): UPDATE `acct_t3` SET packets=packets+4218,
bytes=bytes+1040304, flows=flows+0, stamp_updated=NOW() WHERE
FROM_UNIXTIME(1259359200) = stamp_inserted AND vlan=0 AND i
p_src='0.0.0.0' AND ip_dst='208.94.173.101' AND src_port=0 AND
dst_port=0 AND tos=0 AND ip_proto='ip' AND agent_id=0 AND
mac_src='0:0:0:0:0:0' AND mac_dst='0:0:0:0:0:0'
DEBUG ( t4/mysql ): UPDATE `acct_t4` SET packets=packets+72,
bytes=bytes+14304, flows=flows+0, stamp_updated=NOW() WHERE
FROM_UNIXTIME(1259359200) = stamp_inserted AND vlan=0 AND src_p
ort=0 AND dst_port=0 AND tos=0 AND ip_proto='ip' AND agent_id=0 AND
agent_id2=0 AND mac_src='0:0:0:0:0:0' AND mac_dst='0:0:0:0:0:0' AND
ip_src='0.0.0.0' AND ip_dst='0.0.0.0'
( t1/mysql ) *** Purging cache - END (QN: 401, ET: 1) ***
OK: Exiting ...
My shema of DB:
drop table if exists acct_t3;
create table acct_t3 (
agent_id INT(4) UNSIGNED NOT NULL,
agent_id2 INT(4) UNSIGNED NOT NULL,
mac_src CHAR(17) NOT NULL,
mac_dst CHAR(17) NOT NULL,
vlan INT(2) 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,
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, agent_id2, ip_src, ip_dst, tos,
stamp_inserted)
)
ENGINE=INNODB;
In original - : PRIMARY KEY (agent_id, mac_src, mac_dst, vlan, ip_src,
ip_dst, src_port, dst_port, ip_proto, tos, stamp_inserted)
But I use agent_id2, and need KEY for this.
> Which OS and architecture are you running pmacct on?
>
ALTLinux, i586 and x86_64
--
WBR,
Dubrovskiy Vyacheslav
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists