в списке процессов висит, логи пишет:
Код: Выделить всё
[16:10:22](0)/usr/local/sbin# ps -ax | grep nacctd
89324 ?? Ss 0:00,01 ./nacctd
89429 0 S+ 0:00,00 grep nacctd
msk0 смотрит в локалку, msk1 - в инет.
ifconfig:
Код: Выделить всё
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
ether xx:xx:xx:xx:xx:xx
inet 192.168.3.xx netmask 0xffffff00 broadcast 192.168.3.255
media: Ethernet autoselect (100baseTX <full-duplex>)
status: active
msk1: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
ether xx:xx:xx:xx:xx:xx
inet xx.xxx.xxx.xxx netmask 0xfffffffc broadcast xx.xxx.xxx.xxx
media: Ethernet autoselect (100baseTX <full-duplex,flowcontrol,rxpause,txpause>)
status: active
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
options=80000<LINKSTATE>
inet xxx.xxx.xx.xx --> xxx.xxx.xx.xx netmask 0xffffffff
Opened by PID 634
/etc/nacttab:
Код: Выделить всё
sniff 1
database mysql
mysql_user acct
mysql_password acct_password
mysql_host localhost
mysql_port 3306
mysql_database netacct
pidfile /var/run/nacctd.pid
compactnet 192.168.3.0 255.255.255.0
ournet 192.168.3.0 255.255.255.0
direct_peer 1.1.1.1 255.255.255.255
flush 300
errdelay 2
fdelay 60
notdev msk0
device msk1
iflimit msk1
ignorenet 127.0.0.0 255.0.0.0 # ignore loopback net
headers lo 14 12
headers eth 14 12
debug 5
#file /var/log/acct
#dumpfile /var/log/acct-dump
debugfile /tmp/nacctd.debug
/var/log/messages:
Код: Выделить всё
Feb 12 16:10:19 mail kernel: msk1: promiscuous mode disabled
Feb 12 16:10:22 mail kernel: msk1: promiscuous mode enabled
/var/log/debug.log:
Код: Выделить всё
Feb 12 16:10:22 mail nacctd: config: sniff set to 1
Feb 12 16:10:22 mail nacctd: config: mysql_user = acct
Feb 12 16:10:22 mail nacctd: config: password ok!
Feb 12 16:10:22 mail nacctd: config: mysql_host = localhost
Feb 12 16:10:22 mail nacctd: config: mysql_port = 3306
Feb 12 16:10:22 mail nacctd: config: mysql DB = netacct
Feb 12 16:10:22 mail nacctd: config: pid_file set to /var/run/nacctd.pid
Feb 12 16:10:22 mail nacctd: config: set flushing to 300
Feb 12 16:10:22 mail nacctd: config: set delay on error to 2
Feb 12 16:10:22 mail nacctd: config: set fdelay to 60
Feb 12 16:10:22 mail nacctd: config: added notdevice msk0
Feb 12 16:10:22 mail nacctd: config: added listen device msk1
Feb 12 16:10:22 mail nacctd: config: added iflist msk1
Feb 12 16:10:22 mail nacctd: config: added headerinfo (lo:14:12)
Feb 12 16:10:22 mail nacctd: config: added headerinfo (eth:14:12)
Feb 12 16:10:22 mail nacctd: config: debug level 5
Feb 12 16:10:22 mail nacctd: config: set debug to /tmp/nacctd.debug
Feb 12 16:10:23 mail nacctd: clear_counters() called
/tmp/nacctd.debug:
Код: Выделить всё
12/02 16:10:19 [STATE] entering daemon_stop
12/02 16:10:19 [STATE] write_log called
12/02 16:10:19 [STATE] lck = 1
12/02 16:10:19 [STATE] lck = 0
12/02 16:10:19 [STATE] write child: synchronized with parent
12/02 16:10:19 [STATE] parent: synchronized with write child
12/02 16:10:19 [STATE] * write process 89321 forked
12/02 16:10:19 [STATE] writepid is 89321
12/02 16:10:19 [STATE] done freeing
12/02 16:10:19 [STATE] wrote final log
12/02 16:10:19 [STATE] unlinked PID_FILE
12/02 16:10:19 [STATE] did syslog message
12/02 16:10:19 [STATE] cleaned up capture
12/02 16:10:19 [STATE] closed syslog
12/02 16:10:23 [STATE] write_log called
12/02 16:10:23 [STATE] lck = 1
12/02 16:10:23 [STATE] lck = 0
12/02 16:10:23 [STATE] write child: synchronized with parent
12/02 16:10:23 [STATE] parent: synchronized with write child
12/02 16:10:23 [STATE] * write process 89325 forked
12/02 16:10:23 [STATE] writepid is 89325
12/02 16:10:23 [STATE] done freeing
12/02 16:10:23 [STATE] -> got signal 20, handling
12/02 16:10:23 [STATE] set writing to 0
12/02 16:10:23 [STATE] child 89325 signaled return
12/02 16:10:23 [STATE] <- got signal 20, done handling
но никаких записей в mysql не появляется. кто подскажет куда копать?
Код: Выделить всё
[16:19:38](1)/usr/local/sbin# uname -a
FreeBSD mail.xxxxxxxxxxx.ru 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Fri Sep 9 09:54:38 IRKST 2011 xxxxxx@mail.xxxxxxxxxxx.ru:/usr/obj/usr/src/sys/PFTRAFD amd64