Имеется сервер на freebsd7.1
Установлен Netams 3.4
Cбор статистики посредством модулей netgraph. Скажу сразу - мой первый сервер,курю оптом маны и доки) Но несмотря на все не могу разобраться с ограничением трафика по юзерам. Суть этой машины - шлюз+днс+шейпер инет берется по PPPoE.
В итоге получили
Код: Выделить всё
#home# ngctl msg netams: info
Rec'd response "info" (1) from "[5]:":
Args: { packets/in=11610 packets/out=394 mode=2 debug=1 active_flows=987 total_flows=987 queued_flows=9 queued_bytes=752 queued_packets=11 default_policy=2 }
home# netamsctl show ds
Data-source ID=1 type NETGRAPH source netams::0 loop 0 average 0 mcsec
Perf: average skew delay 0 mcsec, PPS: 0, BPS: 0
IP tree: 19 nodes [12] + 4 dlinks [1024] + 15 unodes [14] = 4534 bytes
FIFO: 0/0 used/ready messages, each 100, total 0 bytes
ds_netgraph data messages: 0
netams: mode=0, pkt_rx=0, pkt_tx=0
Код: Выделить всё
netamsctl show ds
Data-source ID=1 type NETGRAPH source netams::0 loop 0 average 0 mcsec
Perf: average skew delay 0 mcsec, PPS: 0, BPS: 0
IP tree: 19 nodes [12] + 4 dlinks [1024] + 15 unodes [14] = 4534 bytes
FIFO: 0/0 used/ready messages, each 100, total 0 bytes
ds_netgraph data messages: 0
netams: mode=0, pkt_rx=0, pkt_tx=0
Код: Выделить всё
ngctl list
There are 5 total nodes:
Name: ngctl849 Type: socket ID: 0000000b Num hooks: 0
Name: netams Type: netams ID: 00000005 Num hooks: 2
Name: netams_daemon_713 Type: socket ID: 00000003 Num hooks: 0
Name: rl0 Type: ether ID: 00000002 Num hooks: 2
Name: ste0 Type: ether ID: 00000001 Num hooks: 0
Код: Выделить всё
#NeTAMS 3.4.5 (3490.1) root@home / Sun 09 Jan 2011 00:46:16 +0200
#configuration built Sun Feb 13 21:42:54 2011
#begin
#global variables configuration
debug none
language ru
user oid 074CD1 name admin real-name "Admin" crypted $1$$HpXmjtul/3i1.bf.B27bU. email root@localhost permit all
#services configuration
service server 0
login local
listen 20001
max-conn 6
service processor
lookup-delay 60
flow-lifetime 180
policy oid 0E9FA6 name ip target proto ip
restrict all pass local pass
unit user oid 05ABF6 name petya ip 10.0.1.7 bw 1.000M in 128.000K out acct-policy ip
unit user oid 0F0CDE name masha ip 10.0.1.112 bw 1.000M in 128.000K out acct-policy ip
unit user oid 0AD036 name dasha ip 10.0.1.253 bw 1.000M in 128.000K out acct-policy ip
unit user oid 03576B name sasha ip 10.0.1.111 bw 1.000M in 128.000K out acct-policy ip
service storage 1
type mysql
user ***
password ***
accept all
service data-source 1
type netgraph
source netams: divert
service quota
policy ip
notify soft owner
notify hard owner
notify return owner
service alerter 0
report oid 06100 name rep1 type traffic period day detail simple
smtp-server localhost
service html
path /usr/local/www/netams/stat
run 10min
url http://10.0.1.123/netams/
htaccess yes
client-pages all
account-pages none
service scheduler
oid 08FFFF time 10min action "html"
service billing
subplan 1 fee 0.000000 spread monthly
subplan 1 included unlimited sum
subplan 1 adjust-fee yes
subplan 1 policy ip
subplan 1 overdraft 0.000000 sum
#end