grep for '\.db' -- you'll see the snprintf()s that make the char[] value for
the open()s.

I think you're right about where it's writing to...  What strikes me as odd
is the uniform size, unless Solaris is showing allocated size?

11:37:45 tigger [Linux] user=bstrauss pwd=/shared/work/linux/ntop $ ls
/usr/share/ntop -l *.db
total 7344
-rw-r--r--    1 root     root        12361 Oct 23 12:02 addressCache.db
-rw-r--r--    1 root     root        18931 Oct 23 12:09 dnsCache.db
-rw-r--r--    1 root     root      7407857 Oct 23 12:09 hostsInfo.db
-rw-rw-r--    1 root     root        12859 Oct 23 12:09 LsWatch.db
-rw-r--r--    1 root     root        12437 Oct 12 17:17 ntop_pw.db
-rw-r--r--    1 root     root        12775 Oct 23 10:47 prefsCache.db

It's GOT to be some kind of permissions problem, but I'm completely clueless
as to what.

 - Check out this article -
http://www.systemtoolbox.com/article.php?articles_id=109 - there seem to be
some Solaris tools you can use to query and write to gdbm databases..
 - Have you asked on the gdbm list?

-----Burton

-----Original Message-----
From: Stieglitz, Eric J. (DCSA) [mailto:EStieglitz@;exchange.ml.com]
Sent: Wednesday, October 23, 2002 12:00 PM
To: 'Burton M. Strauss III'; [EMAIL PROTECTED]
Subject: RE: [Ntop] command vs. daemon mode


Burton,

How does one figure out where ntop is trying to write its .db files?

I'm pretty sure that these are going in /usr/local/var/ntop:

# ls -al /usr/local/var/ntop
total 292
drwxrwxrwx   2 root     root         512 Oct 23 12:55 .
drwxr-xr-x   3 root     root         512 Oct 23 12:43 ..
-rwxrwxrwx   1 root     root       24576 Oct 23 12:43 LsWatch.db
-rw-r--r--   1 root     root       24576 Oct 23 12:55 addressCache.db
-rwxrwxrwx   1 root     root       24576 Oct 23 12:43 dnsCache.db
-rwxrwxrwx   1 root     root       24576 Oct 23 12:43 hostsInfo.db
-rwxrwxrwx   1 root     root       24576 Oct 23 12:43 ntop_pw.db
-rwxrwxrwx   1 root     root       24576 Oct 23 12:43 prefsCache.db

Now, here's something interesting....I did a chmod a+rwx on this directory
to see if that affected anything. When I restarted ntop with `ntop -u
sysadmin`,
obviously addressCache.db was recreated because its permissions are not the
same as the other files!

Any idea as to what could be causing this?


-----Original Message-----
From: Burton M. Strauss III [mailto:Burton@;ntopsupport.com]
Sent: Saturday, October 12, 2002 9:12 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [Ntop] command vs. daemon mode


Off hand, I don't think you have write access where ntop is trying to store
the information in the gdbm .db files.

The test for "do I need to set the password" is "can I read it from the .db
file"?  An "Error while adding ..." is the same thing.


-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:ntop-admin@;unipi.it]On Behalf Of
Stieglitz, Eric J. (DCSA)
Sent: Friday, October 04, 2002 10:00 AM
To: '[EMAIL PROTECTED]'
Subject: [Ntop] command vs. daemon mode



Hi.

I'm currently working with ntop-2.1.3 on a Solaris 8 system.

I'm seeing the following two problems:

a) No matter how many times a password is specified for the admin user,
   ntop does not remember this password the next time the sofware is
   run, regardless of where the database directory is located.

b) ntop always crashes when run in daemon mode.

Below, I'm enclosing

1) output from a command-line mode run of ntop
2) truss output from a command-line run where ntop successfully opens
/dev/tty
3) truss output from a daemon-mode run where ntop crashes upon trying to
   open /dev/tty
4) /var/adm/messages output

What I'm trying to do is to have ntop start on the system from /etc/rc3.d
upon boot. What is the best way I can accomplish this?

=====================

Here is the output from a standard session of ntop:

sysadmin@dse-apps1-d:/var/adm # /usr/local/bin/ntop -u ntop -P /export/ntop
Wait please: ntop is coming up... 07/Oct/2002 10:50:01 Initializing IP
services... SSL is present but https is disabled: use
-W <https port> for enabling it 07/Oct/2002 10:50:01 Initializing GDBM...
07/Oct/2002 10:50:01 Initializing network devices... 07/Oct/2002 10:50:01
ntop v.2.1.3 MT (SSL) [sparc-sun-solaris2.8]
(10/06/02 02:30:03 PM build) 07/Oct/2002 10:50:01 Listening on [hme0]
07/Oct/2002 10:50:01 Copyright 1998-2002 by Luca Deri <[EMAIL PROTECTED]>
07/Oct/2002 10:50:01 Get the freshest ntop from
http://www.ntop.org/ 07/Oct/2002 10:50:01 Initializing... 07/Oct/2002
10:50:01 Truncated network size to 1024 hosts (real netmask
255.255.255.128)
07/Oct/2002 10:50:01 Loading plugins (if any)...
07/Oct/2002 10:50:01 Searching plugins in /usr/local/lib/ntop/plugins
07/Oct/2002 10:50:01 Welcome to icmpWatchPlugin. (C) 1999 by Luca Deri.
07/Oct/2002 10:50:01 Error while adding
pluginStatus.icmpWatchPlugin=1. 07/Oct/2002 10:50:01 Welcome to
LastSeenWatchPlugin. (C) 1999 by Andrea Marangoni. 07/Oct/2002 10:50:01
Error while adding pluginStatus.LastSeenWatchPlugin=0.
07/Oct/2002 10:50:01 Welcome to NetFlow. (C) 2002 by Luca Deri. 07/Oct/2002
10:50:01 Error while adding pluginStatus.NetFlow=1. 07/Oct/2002 10:50:01
Welcome to nfsWatchPlugin. (C) 1999 by Luca Deri.
07/Oct/2002 10:50:01 Error while adding pluginStatus.nfsWatchPlugin=0.
07/Oct/2002 10:50:01 Welcome to PDAPlugin. (C) 2001-2002 by L.Deri and
W.Brock 07/Oct/2002 10:50:01 Error while adding
pluginStatus.PDAPlugin=1. 07/Oct/2002 10:50:01 Welcome to sFlowPlugin. (C)
2002 by Luca Deri. 07/Oct/2002 10:50:01 Error while adding
pluginStatus.sFlowPlugin=0. 07/Oct/2002 10:50:01 Resetting traffic
statistics... 07/Oct/2002 10:50:02 Started thread (4) for network packet
analyser. 07/Oct/2002 10:50:02 Started thread (5) for idle hosts detection.
07/Oct/2002 10:50:02 Started thread (6) for DNS
address resolution. 07/Oct/2002 10:50:02 Started thread (7) for address
purge. 07/Oct/2002 10:50:02 Initializing plugins (if any)... 07/Oct/2002
10:50:02 Error while adding netFlow.netFlowInPort=0.
07/Oct/2002 10:50:02 Error while adding netFlow.netFlowDest=0. 07/Oct/2002
10:50:02 Error while adding netFlow.netFlowDest=. 07/Oct/2002 10:50:02 Error
while adding netFlow.hme0.exportNetFlow=No.

Please enter the password for the admin user:
Please enter the password again:
07/Oct/2002 10:50:05 Admin user password has been set.

Please enter the password for the admin user:
Please enter the password again:
07/Oct/2002 10:50:08 Admin user password has been set. 07/Oct/2002 10:50:08
Waiting for HTTP connections on port 3000... 07/Oct/2002 10:50:08 Started
thread (9) for web server. 07/Oct/2002 10:50:08
Sniffying... 07/Oct/2002 10:50:08 Started thread (10) for network packet
sniffing on hme0. 07/Oct/2002 10:50:08 Failed(-1): Queue address '503715550'
[addr queue=0/max=0] (processing continues)
07/Oct/2002 10:50:08 Failed(-1): Queue address '503715851' [addr
queue=0/max=0] (processing continues)


===========================

Following is output from truss when I attempt to run ntop in non-daemon
mode:


14012/1:        brk(0x0083F678)                                 = 0
14012/1:        brk(0x0083F678)                                 = 0
14012/1:        brk(0x00841678)                                 = 0
14012/1:        lseek(7, 16384, SEEK_SET)                       = 16384
14012/1:        read(7, "\0\0\001\0\0  \0\0\0 `\0".., 8192)     = 8192
14012/1:        time()                                          = 1033999397
14012/1:        open("/dev/tty", O_RDONLY)                      = 12
14012/1:        sigaction(SIGINT, 0xFFBEF738, 0xFFBEF838)       = 0
14012/1:        ioctl(12, TCGETA, 0xFFBEF8DC)                   = 0
14012/1:        ioctl(12, TCSETAF, 0xFFBEF8DC)                  = 0

Please enter the password for the admin user: 14012/1:  write(2, "\n P l e a
s e
   e n t e".., 47)      = 47
14012/1:        read(12, 0xFEC3DBE4, 1)         (sleeping...)
14012/2:        signotifywait()                 (sleeping...)


=====================


Here is the truss output at the same point when run in daemon mode. Notice
the difference at open("/dev/tty"...)

14015/1:        brk(0x0083D678)                                 = 0
14015/1:        brk(0x0083D678)                                 = 0
14015/1:        brk(0x0083F678)                                 = 0
14015/1:        lseek(7, 16384, SEEK_SET)                       = 16384
14015/1:        read(7, "\0\0\001\0\0  \0\0\0 `\0".., 8192)     = 8192
14015/1:        time()                                          = 1033999417
14015/1:        open("/dev/tty", O_RDONLY)                      Err#6 ENXIO
14015/1:            Incurred fault #6, FLTBOUNDS  %pc = 0x00014EE4
14015/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
14015/1:            Received signal #11, SIGSEGV [default]
14015/1:              siginfo: SIGSEGV SEGV_MAPERR addr=0x00000000
14015/1:                *** process killed ***

========================

Finally, here are some errors logged in /var/adm/messages when ntop is run
in daemon mode. Many of these seem to correspond to errors displayed to the
console when ntop is run from the command line.

Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error]
Initializing network devices... Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID
702911 daemon.error] ntop v.2.1.3 MT (SSL)
[sparc-sun-solaris2.8] (10/06/02 02:30:03 PM build) Oct  7 10:03:36
dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Listening on [hme0] Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Copyright 1998-2002 by Luca Deri <[EMAIL PROTECTED]> Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Get the freshest
ntop from http://www.ntop.org/ Oct  7 10:03:36
dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Initializing... Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Truncated network
size to 1024 hosts (real netmask 255.255.255.128)
Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Loading
plugins (if any)... Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Searching plugins in
/usr/local/lib/ntop/plugins Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID
702911 daemon.error] Welcome to icmpWatchPlugin. (C) 1999 by Luca Deri. Oct
7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Error while adding pluginStatus.icmpWatchPlugin=1. Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Welcome to
LastSeenWatchPlugin. (C) 1999 by Andrea Marangoni. Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Error while
adding pluginStatus.LastSeenWatchPlugin=0.
Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Welcome to
NetFlow. (C) 2002 by Luca Deri. Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID
702911 daemon.error] Error while adding
pluginStatus.NetFlow=1. Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Welcome to nfsWatchPlugin. (C) 1999 by Luca Deri. Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Error while adding pluginStatus.nfsWatchPlugin=0. Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Welcome to
PDAPlugin. (C) 2001-2002 by L.Deri and W.Brock Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Error while
adding pluginStatus.PDAPlugin=1. Oct  7 10:03:36 dse-apps1-d ntop[14015]:
[ID 702911 daemon.error] Welcome to sFlowPlugin. (C)
2002 by Luca Deri. Oct  7 10:03:36 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Error while adding pluginStatus.sFlowPlugin=0. Oct  7 10:03:36
dse-apps1-d limdaemon: [ID 808849 daemon.error]
Message from pid 14015, lnode ntop: lnode attach failed in setuid Oct  7
10:03:36 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Resetting traffic
statistics... Oct  7 10:03:37 dse-apps1-d
ntop[14015]: [ID 702911 daemon.error] Started thread (4) for network packet
analyser. Oct  7 10:03:37 dse-apps1-d ntop[14015]: [ID 702911 daemon.error]
Started thread (5) for idle hosts detection. Oct
7 10:03:37 dse-apps1-d ntop[14015]: [ID 702911 daemon.error] Started thread
(7) for DNS address resolution. Oct  7 10:03:37 dse-apps1-d ntop[14015]: [ID
702911 daemon.error] Started thread (8) for
address purge. Oct  7 10:03:37 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Initializing plugins (if any)... Oct  7 10:03:37 dse-apps1-d
ntop[14015]: [ID 702911 daemon.error] Error while adding
netFlow.netFlowInPort=0. Oct  7 10:03:37 dse-apps1-d ntop[14015]: [ID 702911
daemon.error] Error while adding netFlow.netFlowDest=0. Oct  7 10:03:37
dse-apps1-d ntop[14015]: [ID 702911 daemon.error]
Error while adding netFlow.netFlowDest=. Oct  7 10:03:37 dse-apps1-d
ntop[14015]: [ID 702911 daemon.error] Error while adding
netFlow.hme0.exportNetFlow=No.




-=-=-=-=-
Eric J. Stieglitz
Senior Specialist / Unix Systems Administrator / DCSA
Merrill Lynch / 95 Greene Street / Jersey City / NJ
(201) 671-3176


_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://lists.ntop.org/mailman/listinfo/ntop



_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to