Начало Вход/Регистрация Помощ Tazi stranica s latinski bukwi
Области
 Новини
 Актуална тема
 Linux портали
 Какво е Линукс?
 Въпроси-отговори
 Форуми
   •Трудова борса
   •Конкурс
 Статии
 Дистрибуции
   •Поръчка на CD
 Made In BG
 Файлове
 Връзки
 Галерия
 Конференции
Настройки
 Външен вид
 Предложения
 Направи си сам
И още ...
 За нас
 Линукс за българи ЕООД
 Линк към нас
 Предложения

Подкрепяно от:
TelePoint - Място за хора със свободни идеи

SiteGround

initLab

Adsys Group

SAP Bulgaria

Въпроси отговори
Въпрос: netacct+mysql+nestat
[Търси: ]

ВНИМАНИЕ: Използвайте форумите на сайта за дa зададете вашите въпроси.

Към началото |Добави въпрос |Отговори
 
Въпрос
От: djimbo (djimbo< at >ssi[ точка ]bg) Дата: 03/17/2003
Zdr imam sledniqt vapros kam vas  
slojil sam si netacct+mysql 0.75 za otchitane na trafika  
no za sajelenie nemoga da razbera zashto nesrabotva  
Sourch e instalnat po nalichnqt v source INSTALL i se 
startirva bez problemi no nesrabotva .Ako moje da mi 
kajete kade gresha.Pomestvam configa po dolu: 
 
 cat /usr/local/etc/naccttab 
 
 
 
database mysql                  # must be mysql for now  
  
mysql_user acct                 # usually you don't need  
to change this  
  
mysql_password acct     # change this to your password  
  
mysql_host 127.0.0.1            # sometimes you need to  
change this to  
                                # 127.0.0.1 instead of  
localhost  
  
 mysql_port 3306                 # mysql port, 0 if you are 

using a socket  
  
mysql_database netacct          # usually you don't need  
to change this  
  
pidfile  /var/run/nacctd.pid    # set pid file  
                                # tis will help if you  
want to  
                                # two (or more) nacctd on  
same machine  
  
compactnet 192.168.0.0 255.255.255.224  
compactnet 192.168.1.0 255.255.255.224  
compactnet 192.168.2.0 255.255.255.0  
  
                                # log traffic only for  
these networks  
                                # all other packets are  
NOT logged  
  
ournet 192.168.0.0 255.255.255.224  
ournet 192.168.1.0 255.255.255.224  
ournet 192.168.2.0 255.255.255.0  
  
                                # Ours IP nets for  
diferenciation of  
                                # peering traffic types  
  
direct_peer 217.75.132.0 255.255.255.0  
direct_peer 62.176.90.0 255.255.255.0  
direct_peer 212.72.212.0 255.255.255.0  
direct_peer 217.75.136.0 255.255.255.0  
direct_peer 194.12.226.80 255.255.255.240  
direct_peer 194.12.233.96 255.255.255.224  
direct_peer 194.12.233.160 255.255.255.224  
  
                                 # log traffic between 2 or 

more regional ISP-s  
  
flush 300                       # flush every 5 minutes  
                                # this gives the interval  
in seconds  
                                # when the accumulated  
data is flushed  
                                # to the output file  
  
fdelay 60                       # this defines after how  
many seconds  
                                # of inactivity a certain  
record of  
                                # traffic information may  
be written out  
                                # this helps making the  
logfiles smaller  
                                # since only one output  
record will be  
                                # generated for related  
traffic  
  
notdev eth1                     # Dont log entries for  
this device  
                                 # Use this on routers that 

you dont  
                                # log forwarded packets  
twice.  
  
device eth0                     # device to put into  
promiscous mode  
                                # you can specify as many  
as you want  
                                # and you don't have to  
specify one  
                                # (e.g. if this runs on  
your router)  
                                #  
                                 # if you plan to use it on 

some *BSD  
                                # system put here  
apropriate device  
                                # i.e. - device ep0  
  
# iflimit eth0                  # on machines with  
multiple interfaces,  
                                 # log only packets on this 

interface  
                                # mutually exclusive with  
hostlimit  
  
 # ignoremask 255.255.255.0        # Ignore traffic on same 

class C net  
                                # This means traffic that  
is on  
                                # your local LAN is not  
counted.  
                                # This is useful for NFS  
etc.  
                                # Not giving this option  
causes everything  
                                # to be counted.  
                                # This can degrade  
performance seriously!  
  
ignorenet 127.0.0.0 255.0.0.0   # ignore loopback net  
                                # You can define as many  
ignorenets as  
                                 # you want. Ignoring a net 

with  
                                # ignorenet is not as  
efficient as  
                                # ignoremask. Thus you  
should exclude  
                                # your local network with  
ignoremask,  
                                # not with ignorenet  
(although this is  
                                # is possible).  
  
debug 0                         # set debugging level  
debugfile /tmp/nacctd.debug     # where to put debugging  
info  
  
# Device configuration  
# Defines where the real data starts for each type of  
interface  
# First give the name prefix, then the offset in bytes to  
the start  
# of the real data, then the offset of the type field in  
bytes. If  
# there is no type field, just give a 0.  
# Don't specify SLIP or PPP devices here, otherwise  
association of  
# dynamic ip-addresses with usernames won't work  
# Put device types with more traffic last.  
  
headers tr      40      38  
headers lo      14      12  
headers isdn    4       0  
 # headers isdn  14      0       # for hdlc/trans/cisco and 

hdlc/trans/raw  
headers eth     14      12  
headers plip    14      12  
  
 # hostlimit 12.34.56.78         # log only packets to/from 

this host  
# hostlimit 34.56.78.12         # and this one too  
                                # this option is mutually  
exclusive with iflimit  
============================== 
 cat /usr/local/etc/nacctpeering 
 
root@desktop1 netacct-mysql-0.75]# cat 
/usr/local/etc/nacctpeering 
        # 
# every network which is in this file is logged with 
peer_flag = 0 
# netmask style is: 
# 2.2.3.4/24 
# or 
# 2.3.4.5/255.255.255.0 
# 
# this file is with bulgarian IP space so it depends on 
your country 
# feel free to send me any ip network for specific country 
# 
# these ip's bellow are just a sample .. put here you real 
peering networks 
# look at contrib/ dir for some already collected networks 
# 
 
213.174.1.0/24 
212.116.129.0/255.255.255.0 
62.176.64.0/18 
62.176.84.0/23 
62.176.90.0/24 
62.176.110.0/24 
80.72.64.0/21 
80.72.72.0/21 
80.80.128.0/20 
157.125.223.0/24 
192.92.129.0/24 
193.41.182.0/23 
193.41.182.0/23 
193.41.188.0/22 
193.41.206.0/24 
193.68.0.0/16 
193.68.136.0/22 
193.68.140.0/23 
193.68.178.0/24 
193.68.188.0/24 
193.68.240.0/20 
193.108.24.0/24 
193.108.32.0/23 
193.108.44.0/23 
193.109.54.0/23 
193.178.152.0/23 
193.178.166.0/24 
193.178.222.0/24 
193.193.162.0/23 
193.193.164.0/24 
193.193.182.0/24 
193.194.140.0/23 
193.194.156.0/24 
193.200.14.0/23 
193.200.16.0/23 
193.254.29.0/24 
194.12.224.0/19 
194.141.0.0/16 
194.141.8.0/24 
194.141.9.0/24 
194.141.10.0/24 
194.145.63.0/24 
194.153.145.0/24 
195.24.32.0/19 
195.34.96.0/19 
195.72.112.0/24 
195.96.224.0/19 
195.138.128.0/21 
195.138.136.0/23 
195.138.140.0/22 
195.138.144.0/20 
195.230.0.0/19 
209.239.78.0/23 
212.5.128.0/19 
212.5.136.0/23 
212.7.192.0/19 
212.21.128.0/19 
212.36.0.0/19 
212.39.64.0/19 
212.50.0.0/19 
212.56.0.0/19 
212.56.20.0/23 
212.72.192.0/19 
212.72.195.0/24 
212.72.210.0/24 
212.72.212.0/24 
212.91.160.0/19 
212.91.168.0/22 
212.95.160.0/19 
212.116.128.0/19 
212.116.135.0/24 
212.122.160.0/19 
212.124.64.0/20 
212.124.80.0/24 
212.124.81.0/24 
212.124.82.0/23 
212.124.84.0/24 
212.124.85.0/24 
212.124.86.0/24 
212.124.87.0/24 
212.124.88.0/23 
212.124.90.0/24 
212.124.91.0/24 
212.124.92.0/22 
213.130.64.0/19 
213.137.32.0/24 
213.137.33.0/24 
213.137.34.0/23 
213.137.38.0/23 
213.137.40.0/21 
213.137.48.0/24 
213.137.50.0/23 
213.137.52.0/24 
213.137.54.0/23 
213.137.56.0/24 
213.169.32.0/19 
213.174.0.0/19 
213.191.192.0/19 
213.226.0.0/19 
217.9.224.0/20 
217.75.128.0/23 
217.75.130.0/24 
217.75.131.0/24 
217.75.131.0/24 
217.75.132.0/24 
217.75.133.0/24 
217.75.134.0/23 
217.79.32.0/20 
217.79.64.0/20 
217.145.160.0/20 
217.197.128.0/21 
 
=================================== 
/etc/rc.d/init.d/mysqld start 
 
mysql -u acct -p acct 
inser into ipallow vales ('192.168.0.2'); -- za da imam 
dostap do web base interface 
 
===================================== 
/etc/rc.d/init.d/nacctd start 
===================================== 
I ot tuk natataka nishto. 
Amam dostap do web no nqmam svedeniq za trafika  
 
Slojen e na slednata mashina: 
processor       : 0 
vendor_id       : GenuineIntel 
cpu family      : 6 
model           : 5 
model name      : Pentium II (Deschutes) 
stepping        : 2 
cpu MHz         : 300.688 
cache size      : 512 KB 
fdiv_bug        : no 
hlt_bug         : no 
f00f_bug        : no 
coma_bug        : no 
fpu             : yes 
fpu_exception   : yes 
cpuid level     : 2 
wp              : yes 
flags           : fpu vme de pse tsc msr pae mce cx8 sep 
mtrr pge mca cmov pat pse36 mmx fxsr 
bogomips        : 599.65 
 
Filesystem            Size  Used Avail Use% Mounted on 
/dev/hda2             5.7G  2.2G  3.2G  41% / 
/dev/hda1              50M  4.4M   43M  10% /boot 
none                   62M     0   61M   0% /dev/shm 
 
 
10x predvaritelno


Отговор #1
От: ka Дата: 03/17/2003
skoro dosta se poblyskah s towa ama go podkarah i e dobyr 
soft.  
proweri pyrwo dali ti zapiswa nesto w bazata danni 
 s nakyw klient. ako tam nqma nisto wij dali si dal prawa na
user 
 acct da prawi promenq i t.n. az mnogo se obyrkah ot towa 4e
w 
 install na netstat ne pi6e za dopylnitelnite tablici koito
trqbwa da 
se dobawqt w mysql wij i towa.


Отговор #2
От: Djimbo (djimbo __@__ ssi[ точка ]bg) Дата: 03/17/2003
 Edno malko dootochnenie  
otkrih slednoto 
Mar 17 19:49:55 desktop1 nacctd: net accounting daemon 
started 
Mar 17 19:49:55 desktop1 nacctd: nacctd startup succeeded 
Mar 17 19:49:55 desktop1 nacctd: net accounting daemon 
forked 
Mar 17 19:49:55 desktop1 kernel: eth0: Promiscuous mode 
enabled. 
Mar 17 19:49:55 desktop1 kernel: device eth0 entered 
promiscuous mode 
Mar 17 19:49:56 desktop1 nacctd (write): error writing to 
mySQL 
Mar 17 19:49:56 desktop1 nacctd: child 4925 exited with 
error status 1. 
 
Kakva moje da bade prechinata nacctd da ne piche v Mysql


Отговор #3
От: djimbo (djimbo (a) ssi__dot__bg) Дата: 03/17/2003
Az sashto se izmachih dosta  
zapis t tablichata na mysql nqma  
a do kolkoto do privilegiite na acct te sa 
insert,delete,update.select .no vse oshte nemoje da pishe 
v mysql . 


Отговор #4
От: geroy Дата: 03/17/2003
 vij dali sluchaino niamash 2 mysql-a instalirani .. toest
 edinia da ti e ot distro-to i e instaliran v /usr/lib a
 drugia da si go instaliral na raka v /usr/local/mysql i
saotvetno tvozi vtoria da ti e raboteshtia ...
 poluchava se poniakoga taka che nacctd e linknat s
 /usr/lib/libmysqlclient.a si a triabva da e s
/usr/local/mysql/lib.libmysqlclient.a

proveri s:

ldd `which nacctd`



Отговор #5
От: ka Дата: 03/18/2003
ako si kompiliral kam werniq mysql 
to pri4inata e w prawata na usera 
ili w towa 4e ni si naprawil tablicata 
trafic mai be6e  


<< Mozilla & Plug-ins (1 ) | CD Checking (0 ) >>

 
© 2011-... Асоциация "Линукс за българи"
© 2007-2010 Линукс за българи ЕООД
© 1999-2006 Slavej Karadjov
Ако искате да препечатате или цитирате информация от този сайт прочетете първо това
Външния вид е направен от MOMCHE
Code Version: 1.0.8 H (Revision: 23-09-2011)
 
Изпълнението отне: 0 wallclock secs ( 0.07 usr + 0.00 sys = 0.07 CPU)