[Ntop] a stats questions

Mario Beltran mario at 123.hn
Wed Jan 11 19:56:56 CET 2006


Hello people :)

I am pretty new on ntop and I do not know how to do the follow

I need to create a snapshot from the stats from IP --> Sumary ---> 
Traffic and this data to save in a text file

what steps should I follow to get this?


I have other question :)

when I try to reset stats from Admin --> configure ---> reset stats

apears a box ask me for the user and password, i type te user and 
password for ntop but did not work :( the response is:

error 401
Unauthorized to access the document.

Received request:

    "GET /resetStats.html HTTP/1.1"



does anyone has the same prolbmen before and how did resolve?

I have a freebsd 6.0 box and this is my ntop.sh file

proxy# cat /usr/local/etc/rc.d/ntop.sh
#!/bin/sh

#----------------------------------------------------------------------
# The following variables may be changed
#

# Network interface(s) to be monitored;
# may be blank, or comma-separated list
interfaces='vr0,vr1'

# User to run ntop as; leave blank for root
#userid='nobody'
userid='ntop'

# [IP:]port for serving HTTP; set to '0' to disable
http_port='3000'

# [IP:]port for serving HTTPS; set to '0' to disable
# The certificate is /usr/local/etc/ntop/ntop-cert.pem
#https_port='3001'

# Directory for ntop.access.log
logdir='/var/log'

# Specify any additional arguments here - see ntop(8)
additional_args=''

#
# End of user-configurable variables
#----------------------------------------------------------------------
#--set-pcap-nonblocking
args='-d -L -M --skip-version-check'

[ ! -z $interfaces ] && args="$args -i $interfaces"
[ ! -z $http_port ] && args="$args -w $http_port"
[ ! -z $https_port ] && args="$args -W $https_port"
[ ! -z $logdir ] && args="$args -a ${logdir}/ntop.access.log"
[ ! -z $userid ] && args="$args -u $userid"
[ ! -z "$additional_args" ] && args="$args $additional_args"

case "$1" in
start)
  # is it the first time we run ntop
  [ ! -e /var/db/ntop/ntop_pw.db ] && {
        # just in case...
        [ ! -d  /var/db/ntop ] && {
                echo "Reinstalling database directory"
                mkdir -p  /var/db/ntop
                chown -R $userid:$userid  /var/db/ntop
        }
        /usr/local/bin/ntop -u $userid -A || exit 1
        echo "Now we can start ntop!"
  }
  if [ -d $logdir ]; then
    touch ${logdir}/ntop.access.log
    chown $userid ${logdir}/ntop.access.log
  fi
  if [ -x /usr/local/bin/ntop ]; then
    /usr/local/bin/ntop $args > /dev/null 2>&1 &
    echo -n ' ntop'
  fi
  ;;
stop)
  killall ntop > /dev/null 2>&1 && echo -n ' ntop'
  ;;
*)
  echo "Usage: `basename $0` {start|stop}" >&2
  exit 64
  ;;
esac

exit 0
proxy#


thanks in advance

Mario






More information about the Ntop mailing list