LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 02-14-2005, 06:00 AM   #1
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Rep: Reputation: 30
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
 
Old 02-14-2005, 07:21 AM   #2
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
As with all programs, first try 'man ntop' and 'ntop --help'

- Peder
 
Old 02-14-2005, 01:57 PM   #3
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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.
 
Old 02-14-2005, 10:00 PM   #4
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
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
 
Old 02-15-2005, 12:00 AM   #5
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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
 
Old 02-15-2005, 01:32 AM   #6
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
"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
 
Old 02-15-2005, 02:20 AM   #7
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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.
 
Old 02-15-2005, 03:18 AM   #8
bunnadik
Member
 
Registered: Jan 2005
Location: Övik, Sweden
Distribution: MDK 10.1
Posts: 450

Rep: Reputation: 30
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
 
Old 02-15-2005, 11:49 PM   #9
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
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


--
 
Old 02-16-2005, 04:03 PM   #10
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
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.
 
Old 02-16-2005, 09:18 PM   #11
varun_saa
Member
 
Registered: Dec 2004
Posts: 188

Original Poster
Rep: Reputation: 30
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
 
Old 02-16-2005, 09:57 PM   #12
opjose
Senior Member
 
Registered: Sep 2004
Location: Outlying D.C.
Distribution: Mandriva
Posts: 2,090

Rep: Reputation: 46
I believe it can do this, I just haven't looked into it...

I guess "man ntop" would help...
 
Old 04-14-2005, 05:02 PM   #13
bship
LQ Newbie
 
Registered: Mar 2005
Location: NC
Distribution: Red Hat and Novell OES (formerly SUSE), LPI 101 and Net+
Posts: 25

Rep: Reputation: 15
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!

Last edited by bship; 04-15-2005 at 04:22 PM.
 
Old 04-15-2005, 04:07 PM   #14
bship
LQ Newbie
 
Registered: Mar 2005
Location: NC
Distribution: Red Hat and Novell OES (formerly SUSE), LPI 101 and Net+
Posts: 25

Rep: Reputation: 15
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.

Last edited by bship; 04-15-2005 at 04:34 PM.
 
Old 12-07-2009, 04:15 AM   #15
sanketsharma
LQ Newbie
 
Registered: Jul 2009
Posts: 3

Rep: Reputation: 0
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ntop cpo Linux - Newbie 4 06-02-2015 02:32 PM
Need help with Ntop Asagath Linux - Security 1 12-02-2005 05:04 PM
Ntop and Routers intranet_man Linux - Networking 3 06-20-2005 02:53 PM
uninstall ntop Karlsonas Linux - Software 1 06-07-2005 03:17 PM
ntop install help garretwp Linux - Networking 2 04-24-2004 03:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 08:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration