tool to monitor network usage(for entire lan)

Hello, I hope that someone has used any tool to monitor the network usage. I need to verify what is wrong with my network(or my provider tools) as I found out that according to my provider I was downloading 21GB in one day even tough I didn’t download anything(as far as i know). So I need to see if there is anything in my home network which is not setup correctly or my provider has some issues. At least by having some data I might be able to confront them. So I was looking into other threads and some users suggested ntop. I installed it with Yast but after i started the service I get these errors when trying to start it from command line as a regular user:

dan@curacao:~> ntop -A
Tue Oct  9 11:44:57 2012  NOTE: Interface merge enabled by default
Tue Oct  9 11:44:57 2012  Initializing gdbm databases
Tue Oct  9 11:44:57 2012  **ERROR** ....open of /var/lib/ntop/prefsCache.db failed: File open error
Tue Oct  9 11:44:57 2012  Possible solution: please use '-P <directory>'
Tue Oct  9 11:44:57 2012  **FATAL_ERROR** GDBM open failed, ntop shutting down...
Tue Oct  9 11:44:57 2012  CLEANUP[t140427133331584]: ntop caught signal 2 [state=2]
Tue Oct  9 11:44:57 2012  ntop is now quitting...

i noticed that /var/lib/ntop/prefsCache.db doesn’t exist. so I su to root and setup the admin password ntop -A successfully eliminating this error if used as a root(which i don’t really want). So starting again ntop (as root) it stops now because it doesn’t have rights to create this directory:
Tue Oct 9 12:00:36 2012 ERROR RRD: Disabled - unable to create directory (err 13, /var/lib/ntop/rrd/graphics)
drwxr-xr-x 2 ntop ntop 4096 Oct 29 2011 rrd
now should I give write rights to root for this file(either by including root to this group ntop or giving rights to everyone(less secure). I included my regular user in the ntop group but I still cannot get over the initial error and I cannot run ntop -A as regular user.

Anyone who worked with this tool could advise? or suggest another tool? I was experimenting with a gnome tool (gkrellm)which for now I cannot set it up to monitor multiple machines in the network. Any help/suggestions are appreciated. i encounter these errors under 12.1 and 12.2 with KDE.

I have never used ntop but heard lot of good things about it and would like to try it out some day :slight_smile: Maybe this gentoo thread will be useful in solving the problem ?
Gentoo Forums :: View topic - Ntop wont start

On 2012-10-09 18:16, dmera wrote:

> threads and some users suggested ntop. I installed it with Yast but
> after i started the service I get these errors when trying to start it
> from command line as a regular user:

No, it is a system service, you start it as any other system service. rcntop, for example - as
root, of course. Then you access it with any web browser.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Sorry for late reply, but I couldn’t access the machine yesterday. Many thanks to glistwan and robin_listas who helped understand how to be able to view the info provided by ntop. Quite impressive tool. This works with 12.1 but when I tried at home on my 12.2 I was not able to pass the initial error listed in my first post. I cannot setup the password for the ntp even under root. I’m trying to figure out where some logs would be created to identify what is going on. From what I can see is definitely a very detailed tool which can give you detailed info about your traffic and that’s what I need in order to see what is misbehaving in my system and using that much bandwidth(or maybe is the provider tool doing some funky stuff?). This remains to be discovered. I will summarize the steps for anyone who wants to give it a try(in 12.1 until I figure it out in 12.2).

  1. Install ntp from Yast(or other command line ways)
  2. start service - via Yast (or manually)
  3. as root run: ntop -A (which needs the root password to be able to gather all the info needed)
  4. restart service via Yast(or manually) - this step might not be needed
  5. run as root ntop -d -L (to start as a daemon and to send logs to system log)
  6. on your browser use http://localhost:3000
    Settings can be done in the browser(lots of options). Good luck!

On 2012-10-11 18:56, dmera wrote:
>
> Sorry for late reply, but I couldn’t access the machine yesterday. Thank
> to glistwan and robin_listas I was able to view the info provided by
> ntop. Quite impressive. This works with 12.1 but when I treid at home on
> my 12.2 I was not able to pass the initial error listed in my first
> post.

I don’t have a 12.2 to test it (maybe in a virtual setup), sorry.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I was able to figure it out(by comparison to 12.1). In 12.2 this error occurs:


dan@curacao:~> ntop -A Tue Oct  9 11:44:57 2012  NOTE: Interface merge enabled by default Tue Oct  9 11:44:57 2012  Initializing gdbm databases Tue Oct  9 11:44:57 2012  **ERROR** ....open of **/var/ntop/prefsCache.db **failed: File open error Tue Oct  9 11:44:57 2012  Possible solution: please use '-P <directory>' Tue Oct  9 11:44:57 2012  **FATAL_ERROR** GDBM open failed, ntop shutting down... Tue Oct  9 11:44:57 2012  CLEANUP[t140427133331584]: ntop caught signal 2 [state=2] Tue Oct  9 11:44:57 2012  ntop is now quitting...

For some unknown reason to me the installation is not where ntop expects it after being installed by Yast. Is it reading some global variables for the path which are not set correctly? I don’t know. someone who understands better this part might know and suggest what can be done to correct it.
So I set the admin pass like this: ntop -P /var/lib/ntop -A (instead of ntop -A in 12.1 which knows where to find the components)and then to run it as a daemon: ntop -P**/var/lib/ntop -d -L
**It has lots of options and details about your network transactions.

On 2012-10-12 15:26, dmera wrote:

> For some unknown reason to me the installation is not where ntop
> expects it after being installed by Yast. Is it reading some global
> variables for the path which are not set correctly? I don’t know.
> someone who understands better this part might know and suggest what can
> be done to correct it.

You can fillup a bugzilla.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

Late but better late than never I found that someone already reported it.(Bug #769546). Meanwhile it works pretty well as I tried to describe it. Lots of info and multiple settings could be added to monitor the network.