# net/ntop doesn't work



## jewsofeast (May 9, 2011)

Hi,

I've installed net/ntop and configured it. 

Here is my /usr/local/etc/rc.d/ntop

```
#!/bin/sh
#
# $FreeBSD: ports/net/ntop/files/ntop.sh.in,v 1.4 2010/03/27 00:13:50 dougb Exp $
#
# PROVIDE: ntop
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable ntop:
#
# ntop_enable (bool):           Set it to "YES" to enable ntop
#                               Default is "NO".
# ntop_flags (flags):           Set extra flags to ntop
#                               Default is "-d --use-syslog=daemon". see ntop(8).
#

. /etc/rc.subr

name=ntop
rcvar=${name}_enable

load_rc_config $name

: ${ntop_enable="NO"}
: ${ntop_flags="-d --use-syslog=daemon -u ntop -A"}

command=/usr/local/bin/ntop
start_precmd="${name}_checkpw"

ntop_checkpw()
{
        if [ ! -f /var/db/ntop/ntop_pw.db ]; then
                err 1 "Please set admin password for ntop. Run '/usr/local/bin/ntop -u ntop -A'"
        fi
}

run_rc_command "$1"
```

Here are ntop entries in /etc/rc.conf

```
ntop_enable="YES"
ntop_flags="-d --use-syslog=daemon -u ntop -A"
```

I start ntop with [cmd=]/usr/local/etc/rc.d/ntop start[/cmd]

I see this error after start -

```
Starting ntop.
Mon May  9 22:39:04 2011  NOTE: Interface merge enabled by default
Mon May  9 22:39:04 2011  Initializing gdbm databases
Mon May  9 22:39:04 2011  **ERROR** ++++ DEMON MODE=1
```

Here is [cmd=]tail -f /var/log/messages[/cmd]

```
May  9 22:39:10 grumpy ntop[14977]:   CHKVER: as of date is '2010-10-06T01:12:25'
May  9 22:39:10 grumpy ntop[14977]:   CHKVER: This version of ntop is a minimally supported but OLDER version - please upgrade
May  9 22:39:14 grumpy ntop[14977]:   RRD: Created base directory (/var/db/ntop/rrd)
May  9 22:39:14 grumpy ntop[14977]:   RRD: Created directory (/var/db/ntop/rrd/graphics)
May  9 22:39:14 grumpy ntop[14977]:   RRD: Created directory (/var/db/ntop/rrd/flows)
May  9 22:39:14 grumpy ntop[14977]:   RRD: Created directory (/var/db/ntop/rrd/interfaces)
May  9 22:39:14 grumpy ntop[14977]:   THREADMGMT[t34539793984]: RRD: Started thread for throughput data collection
May  9 22:39:14 grumpy ntop[14977]:   THREADMGMT[t34485610304]: RRD: Data collection thread running [p14977]
May  9 22:39:14 grumpy ntop[14977]:   THREADMGMT[t34539793984]: RRD: Throughput data collection: Thread starting [p14977]
May  9 22:39:14 grumpy ntop[14977]:   THREADMGMT[t34539793984]: RRD: Throughput data collection: Thread running [p14977]
```

I don't know why I get 

```
Mon May  9 22:39:04 2011  **ERROR** ++++ DEMON MODE=1
```

NTOP wasn't running before this start. Please let me know if I missed on something.

Best,

David


----------



## tbyte (May 10, 2011)

I get that message too, but ntop works fine even with it. I guess it's some minor bug. If yours does not work - the problem is somewhere else 

Regards.


----------



## jewsofeast (May 10, 2011)

NTOP runs alright. However, I will like to know what that error is.


----------



## tbyte (May 10, 2011)

I'd guess it's some minor bug and It might have been fixed upstream already but the version in the ports is a little bit older.

Regards.


----------

