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 |
As with all programs, first try 'man ntop' and 'ntop --help'
- Peder |
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. |
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 |
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 |
"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 |
Quote:
It certainly DOES start the web interface. |
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 |
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 -- |
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. |
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 |
I believe it can do this, I just haven't looked into it...
I guess "man ntop" would help... |
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! |
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. ;) |
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. |