question about ntop [INACTIVE]

Here we discuss compilation and how to build an addon for BFW.

question about ntop

Mensagempor fw_user » Seg Dez 04, 2006 12:18 pm

Hi all,

Does anyone have success with ntop on BW? I am using BW 2.29 currently; I compiled the ntop on the 2.27 build tree; everything worked out fine and I can have the ntop run in the 2.27 build tree environment.

Then I copied the ntop and the related libraries to 2.29 BW. However, when I run the program, it gave me "segmentation error".

Can anyone give me some help? Thanks a lot.

Jiang
fw_user
 

Mensagempor fw_user » Seg Dez 04, 2006 12:20 pm

Forgot to mention, I am using CentOS 3.7.
fw_user
 

Mensagempor Juanillo » Seg Dez 04, 2006 3:14 pm

Download 2.29 build tree.

Regards
Juanillo
 

Mensagempor fw_user » Seg Dez 04, 2006 11:46 pm

Thanks, Juanillo.

Yes you are right. I downloaded the 2.29 build tree and re-compiled the ntop. Then copy the ntop and its libraries to the brazilFW box. And it is running!!

It is quite a learning experience. Maybe somebody else has similar problems, and here are the steps that I followed:

1. get 2.29 build tree and unzip to a linux box, in my case I am using centos 3.7;
2. download the necessary packages, which are:
a. freetype-2.1.10
b. gd-2.0.33, make sure "./configure --with-png"
c. gdbm-1.8.3
d. libart_lgpl-2.3.17
e. libpcap-0.9.5
f. libpng-1.2.14
g. rrdtool-1.2.15
h. ntop

3. go to the brazilFW build tree directory and run ./setlevel.sh

4. unzip each package; go to each directory, run "./configure; make; make install"

there may be some tweaks when compiling rrdtool and ntop; pay attention to the error reported by "./configure" and change the directory for specific libraries;

5. ldd ntop to find the library dependencies; create a tgz file based on that information; here is the tar command I use:

tar zcvf ntop.tgz /usr/local/lib/libntopreport-3.2.3 \
/usr/local/lib/libntop-3.2.3 /lib/libc.so.0 /lib/libuClibc-0.9.26.so \
/lib/libcrypt.so.0 /lib/libcrypt-0.9.26.so /usr/lib/libssl.so.0.9.7 \
/lib/libresolv.so.0 /lib/libresolv-0.9.26.so /lib/libnsl.so.0 \
/lib/libnsl-0.9.26.so /usr/local/lib/libgdbm.so.3* /usr/local/lib/libgd.so.2* \
/usr/local/rrdtool-1.2.15/lib/librrd_th.so.2* /lib/libpthread.so.0 \
/lib/libpthread-0.9.26.so /usr/local/lib/libfreetype.so.6* /usr/local/lib/libpng12.so.0* \
/usr/lib/libz.so /lib/libz.so.1* /usr/local/lib/libart_lgpl_2.so.2* \
/lib/libm.so.0 /lib/libm-0.9.26.so /lib/libdl.so.0 /lib/libdl-0.9.26.so \
/lib/ld-uClibc.so.0 /lib/ld-uClibc-0.9.26.so /usr/local/share/ntop /usr/local/bin/ntop \
/usr/local/etc/ntop/ /usr/local/lib/ntop /usr/local/var/ntop

6. now copy the ntop.tgz through scp to the brazilfw box and run it. If you are lucky enough, you will have it up and running!!
fw_user
 

Mensagempor nachazo » Ter Dez 05, 2006 12:07 am

give the thanks to CLaudio...

I was forget ntop long time ago because in previus versions of brazilfw it didn´t run....

But maybe you can post your results....

Ntop burn a lot of machine resources...

Wich machine are you using for run ntop?

regards.
nachazo
 

Mensagempor fw_user » Ter Dez 05, 2006 2:30 am

I am using a pentium 4 machine with 512 MB memory.

I do find a problem though: when I run the ntop (ntop -P /usr/local/var/ntop -u root), the ntop only captures the first couple of packets and then it stops reading/updating the web pages, i.e. it stays static no matter how many packets passing by.

I don't know what causes this problem. The BrazilFW box is set as a bridge and I am wondering whether that causes the problem.

Anyone has similar experience?

Thanks
fw_user
 

Mensagempor nachazo » Ter Dez 05, 2006 12:27 pm

Maybe you need change the listen interface to br0...

regards.
nachazo
 

Mensagempor fw_user » Qua Dez 06, 2006 3:17 am

Yes the ntop is listening the br0. I compiled the ntop based on the same packages on a CentOS linux and tested the program. It worked fine.

On BrazilFW, when running the ntop, I can see that lots of packets are dropped by libpcap; and the ntop doesn't read any packets except the packets read in at the initialization.

Now I am thinking it might be related some setup in BrazilFW that caused the problem.
fw_user
 

Mensagempor nachazo » Qua Dez 06, 2006 10:58 am

maybe you need recompile libpcap

regards.
nachazo
 

Mensagempor fw_user » Sex Dez 08, 2006 4:07 am

Finally I got the ntop working on my BW box and here is what I learned:

1. use V3.2 source code from sourceforge.org; I have been playing with the CVS code but couldn't get it work; but by using the V3.2, I was able to get everything together.

2. follow the steps I listed in previous post.

That's it!

I can upload the ntop.tgz if anyone is interested in this ...
fw_user
 

Mensagempor ramindia » Qua Dez 13, 2006 3:25 pm

Hi

iam also look
why dont u upload

Ram
ramindia
 

Mensagempor fw_user » Ter Dez 26, 2006 9:23 pm

Can anyone tell me how to upload the ntop addon?

I browsed the website but didn't figure out how to do that.
fw_user
 

Mensagempor Claudio » Qua Dez 27, 2006 7:56 am

Marcelo - Brazil takes care of ftp accounts for add-ons developers. But he's on a vacation this week.

Just send it to me and i will upload to you.
Then, on next week you will have your own ftp account.
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor fw_user » Qui Dez 28, 2006 1:36 am

Hi Claudio,

what is your email address?

Thanks
fw_user
 

Mensagempor Claudio » Qui Dez 28, 2006 8:12 pm

Just click the e-mail button: Imagem
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor Claudio » Sex Dez 29, 2006 8:37 am

I've uploaded ntop add-on to:

http://www.brazilfw.com.br/users/fw_user/ntop.tgz

There are some libs conflicts we need to solve.
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor Claudio » Sex Dez 29, 2006 5:54 pm

What a great tool!!!!!! :aplause: :aplause: :aplause:

I just put ntop to work for the first time. Very Impressive.

There are a few adjusts we need to do:
- ntop.tgz fails to backup because there's no ntop.list file
- Brazilfw has some of that libs, then we might to remove a few.
- There are some libs conflicting widh another add-ons (libssl, libcrypt) maybe we need to build a separated package to them.
- ntop fails to start due lack of /usr/local/var/ntop folder. Just add it to the package.
- It would be nice if it auto-start. This is done creating a file called /etc/rc.d/pkgs/rc.ntop
- Can it run on background and not flood the console with messages?

Did you know the strip command?
Strip removes some free spaces from binaries and turns then a lot smaller
Não dou suporte via mensagem privada e e-mail.
Por favor, não insista.
Avatar do usuário
Claudio
BFW Founder
BFW Beneméritos
 
Mensagens: 7553
Registrado em: Qui Ago 25, 2005 9:10 am
Localização: Vitória - ES - Brasil
BrazilFW Box:

Mensagempor fw_user » Dom Dez 31, 2006 1:52 am

Thanks for the testing and good points.

Yes, the backup is a problem. I did some modification to one of the scripts to enable that. You can specify the directory in which the ntop will be based on through "-P" option.

I will polish the addon recently to make it working smoothly.

This program still needs lots of work, and it has a big problem: after the ntop runs for couple of hours, it will crash, some kind of segmentation error. I haven't figured out the source yet. But I suspect that it is related to how the ntop takes logs.

So if anyone figures out what causes the crash, please let me know.

Thanks.
fw_user
 

Mensagempor nachazo » Dom Dez 31, 2006 5:40 am

the crash could be insufficient space, or a exesive work for the cpu so the kernel kill the daemon...

I have this behavior in debian distro with small pcs... You need a least a pentium 3 with 256 mb in ram to do the job...

Regards.
nachazo
 

Mensagempor fw_user » Dom Dez 31, 2006 12:15 pm

I am using a P4 and 384MB memory machine to run the program.

Yes, insufficient space might be the case, if lots of logs are saved in the memory.

I am wondering if I can setup the syslog function to log to the hard drive instead of through network to other computers. This might tell me whether it is because of the space problem.
fw_user
 

Mensagempor nachazo » Dom Dez 31, 2006 4:44 pm

This kind of softs needs be in the hd....

You can compole again settings the correct flags to put the program in /partition/ntop as the home directory...

Regards.
nachazo
 

Mensagempor Marcelo - Brazil » Ter Jan 02, 2007 9:18 pm

fw_user,

Send me a desirre password to my e-mail or pm, ok ?
Account ready on 01/03/2007 5 pm.
BFW não é meu hobby, é meu router !
Não dou suporte.

"Nem sim, nem não, mas muito pelo contrário, não sou contra nem à favor,
porque em matéria de certas coisas o mais importante é o principalmente,
aliás inclusive, não resta a menor dúvida".
De algum politico brasileiro...
Avatar do usuário
Marcelo - Brazil
BFW Founder
BFW Manager
BFW Beneméritos
 
Mensagens: 3187
Registrado em: Qua Ago 24, 2005 10:40 pm
Localização: Campinas - São Paulo
BrazilFW Box: Hp Proliant ML30 Gen 9, Intel® Xeon® E3-1200 v5 3,0 Ghz, 8 Gb ram DDR4, 1 Tb HD, Links 120x12 mb/s cabo + 100x100 mb/s fibra. Addon: Unifi, 50 clientes lan + 50 cliente wireless.

Mensagempor Marcelo - Brazil » Qua Jan 03, 2007 4:38 pm

password sent by mp and e-mail.
BFW não é meu hobby, é meu router !
Não dou suporte.

"Nem sim, nem não, mas muito pelo contrário, não sou contra nem à favor,
porque em matéria de certas coisas o mais importante é o principalmente,
aliás inclusive, não resta a menor dúvida".
De algum politico brasileiro...
Avatar do usuário
Marcelo - Brazil
BFW Founder
BFW Manager
BFW Beneméritos
 
Mensagens: 3187
Registrado em: Qua Ago 24, 2005 10:40 pm
Localização: Campinas - São Paulo
BrazilFW Box: Hp Proliant ML30 Gen 9, Intel® Xeon® E3-1200 v5 3,0 Ghz, 8 Gb ram DDR4, 1 Tb HD, Links 120x12 mb/s cabo + 100x100 mb/s fibra. Addon: Unifi, 50 clientes lan + 50 cliente wireless.

Mensagempor fw_user » Qui Jan 04, 2007 2:03 am

Got it. Thanks.
fw_user
 


Voltar para Add-On Factory

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 4 visitantes