LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   ntop howto (https://www.linuxquestions.org/questions/mandriva-30/ntop-howto-289985/)

varun_saa 02-14-2005 06:00 AM

ntop howto
 
Hello,
I have installed ntop on Mandrake 10.1.

I want to measure total traffice through eth0.

Howto to do that ?

Howto to get ntop giong ?

I see that the website has very little help.

Thanks

Varun

bunnadik 02-14-2005 07:21 AM

As with all programs, first try 'man ntop' and 'ntop --help'

- Peder

opjose 02-14-2005 01:57 PM

It's even easier than this...

MAKE SURE your urpmi sources are set up...

Then

urpmi ntop

as root. Once it's done, type

chkconfig --add ntop

You may want to edit the ntop.conf files in /etc, but usually the defaults work just fine...

Now start the service, again as root

/sbin/service ntop start

At this point ntop starts collecting status information.

To view the results open a web browser and type in

http://IPOFMACHINE:3000

E.G. if your machine has an IP of 192.168.0.100 you type in

http://192.168.100:3000

Have fun!

That's all that's there to it.

varun_saa 02-14-2005 10:00 PM

http://192.168.100:3000 in browser gives the following :
An error occurred while loading http://192.168.0.253:3000:
Could not connect to host 192.168.0.253 (port 3000)

Infact when I type ntop on the commandline as root it
gives the following :

Mon Feb 14 20:44:27 2005 ntop will be started as user nobody
Mon Feb 14 20:44:27 2005 ntop v.3.0 SourceForge .tgz MT (SSL)
Mon Feb 14 20:44:27 2005 Configured on Aug 10 2004 22:29:48, built on Aug 10 2004 22:30:24.
Mon Feb 14 20:44:27 2005 Copyright 1998-2004 by Luca Deri <deri@ntop.org>
Mon Feb 14 20:44:27 2005 Get the freshest ntop from http://www.ntop.org/
Mon Feb 14 20:44:27 2005 Initializing ntop
Mon Feb 14 20:44:27 2005 Checking eth0 for additional devices
Mon Feb 14 20:44:27 2005 Resetting traffic statistics for device eth0
Mon Feb 14 20:44:27 2005 DLT: Device 0 [eth0] is 1, mtu 1514, header 14
Mon Feb 14 20:44:27 2005 Initializing gdbm databases
Mon Feb 14 20:44:27 2005 Now running as requested user 'nobody' (65534:65534)
Mon Feb 14 20:44:27 2005 **FATAL_ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Mon Feb 14 20:44:27 2005 1. Is another instance of ntop running?
Mon Feb 14 20:44:27 2005 2. Make sure that the use you specified can write in the target directory

Thanks

Varun

opjose 02-15-2005 12:00 AM

Mon Feb 14 20:44:27 2005 **FATAL_ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Mon Feb 14 20:44:27 2005 1. Is another instance of ntop running?
Mon Feb 14 20:44:27 2005 2. Make sure that the use you specified can write in the target directory


Yup the error message is pretty self explanatory.

Fix the problem and restart the service...

service ntop restart

bunnadik 02-15-2005 01:32 AM

"service ntop start" won't start the web interface AFAIKT.
Try 'ntop -u ntop -w 3000' or add "-w 3000" to /etc/sysconfig/ntop

- Peder

opjose 02-15-2005 02:20 AM

Quote:

Originally posted by bunnadik
"service ntop start" won't start the web interface AFAIKT.
Try 'ntop -u ntop -w 3000' or add "-w 3000" to /etc/sysconfig/ntop

- Peder

Au-contraire!

It certainly DOES start the web interface.

bunnadik 02-15-2005 03:18 AM

Mea culpa.
I looked in the script and saw no reference to "-w" . However, far down in the man page it seems "-w 3000 -W 0" is the default.

- Peder

varun_saa 02-15-2005 11:49 PM

Ok,
Thanks everbody for the help.
I have it working now.

But I still have a vew questions.

1. ntop -i eth0 - will it give me a monthly amount of
total traffic in terms of MBs ?
If not then howto get that ?

2. Which log file does ntop use for generating the charts ?

Thanks

Varun


--

opjose 02-16-2005 04:03 PM

Ntop will give you monthly usage.

It's default behaviour is to restart logging whenever it's restarted.

That is, shut it down and it goes back to zero and only starts collectiing again when it's brought back up.

I haven't looked to see if there is a way to cause it to save stats through restarts.

varun_saa 02-16-2005 09:18 PM

Thanks.

Yes I see that everytime you restart ntop it start all over again.
The previous records are not saved.

That feature is a must

Varun

opjose 02-16-2005 09:57 PM

I believe it can do this, I just haven't looked into it...

I guess "man ntop" would help...

bship 04-14-2005 05:02 PM

NTOP help
 
I am 8 mos. new to Linux so be gentle. I am running RedHat Enterprise (current upgrades to date).
Very similar error...
I had it running and then something happened.
Attempted to start ntop...

Processing file /etc/ntop.conf for parameters...
Initializing gdbm databases
**FATAL_ERROR** ....open of /var/ntop/prefsCache.db failed: Can't be writer
Possible solution: please use '-P <directory>
[FAILED]
Even stanger, somewhere along the line I read to attempt to start ntop more than once. On one of my servers after 3 attempts to start and this error; it's now running on one of 15 machines. The other 14 won't start. I have checked the -P option, the defaults, and the ownership and permissions and all is well.

Any help is appreciated. If I need to, I can send a copy of the config file.

Also, on one machine it will not install because it's already there and when I attempt a remove (rpm). It doesn't exist. I have also tried the force option but to no avail.
Any ideas?

Thanx in advance!

bship 04-15-2005 04:07 PM

NTOP working, but are there bugs?
 
Finally after about 8 hours over 2 days. I have it working. First, my boss changed the ports on me.
I stopped the non-running service, edited the config file (--http-server 30XX = XX representing the new # port), then restarted the service 3 times , confirmed it was running and then opened up the stats up a browser. Yeah and there they were!!! Is there a bug that requires more than one attempt to start the ntop service properly? If so, I guess I should e-mail NTOP, right? Anyone else experience this 3 start issue?

As for not being able to uninstall, reinstall, and force install on the one server... it helps if var is not full. I cleaned it out and now it's up and running there, too.

Hope this helps someone. ;)

sanketsharma 12-07-2009 04:15 AM

Hi Frds,

I have install ntop, earlier it was working fine but now m getting this problem please help me out

Mon Dec 7 15:43:43 2009 NOTE: Interface merge enabled by default
Mon Dec 7 15:43:43 2009 Initializing gdbm databases
Mon Dec 7 15:43:43 2009 **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: Can't be writer
Mon Dec 7 15:43:43 2009 Possible solution: please use '-P <directory>'
Mon Dec 7 15:43:43 2009 **FATAL_ERROR** GDBM open failed, ntop shutting down...
Mon Dec 7 15:43:43 2009 CLEANUP[t3086468816]: ntop caught signal 2 [state=2]
Mon Dec 7 15:43:43 2009 ntop is now quitting...

I am facing this problems please let me know how can i solve it.


All times are GMT -5. The time now is 06:11 AM.