Actually issue was graphing in the IP Distribution section. IP Distribution
is graphing based on Protocol Definition and if you're using more then 20
characters to define name in protocol definition NTOP will crash.

Example of this would be THIS_IS_VERY_LONG_DEFINITION=1-1000

Maybe NTOP should trim anything over 20 characters when loading protocol
defs.

Also where can I disable graphs in the IP Distribution? When a host has lot
of defined protocols graphs become hard to read and interpret. A table above
IP Distribution graph (such as above Protocol Distribution) would also be
nice.

Sam Domski




-----Original Message-----
From: Burton M. Strauss III [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 6:04 AM
To: [EMAIL PROTECTED]
Subject: RE: [Ntop] NTOP Web Interface Crashing - apparently in
hostTrafficDistrib graph


1st thought: "Yeah... it's not an ntop problem :-)"

gdxxxx are in the gdchart or gd libraries that ntop uses.  eval.c is - wait
one - I can't find it... odd!

Unfortunately, there isn't a lot of error testing or return codes in those
libraries.  I'm guessing that ntop is passing it bad data and it's reacting.
(Reminds me of my favorite compiler - no, MUSIC's Pascal - it would accept
illegal syntax and generate unexecutable code)

You are talking about the "info about host xxxx" page, right (url would be
192.168.1.1.html)???

The graphics there are in the "Protocol Distribution" section.

What do you get if you comment out those lines in reportUtils.c around
1753...


#ifdef HAVE_GDCHART
  {
    totalSent = el->tcpSentLoc+el->tcpSentRem+
      el->udpSentLoc+el->udpSentRem+
      el->icmpSent+el->ospfSent+el->igmpSent+el->stpSent+
      el->ipxSent+el->osiSent+el->dlcSent+
      el->arp_rarpSent+el->decnetSent+el->appletalkSent+
      el->netbiosSent+el->qnxSent+el->otherSent;

    totalRcvd = el->tcpRcvdLoc+el->tcpRcvdFromRem+
      el->udpRcvdLoc+el->udpRcvdFromRem+
      el->icmpRcvd+el->ospfRcvd+el->igmpRcvd+el->stpRcvd+
      el->ipxRcvd+el->osiRcvd+el->dlcRcvd+
      el->arp_rarpRcvd+el->decnetRcvd+el->appletalkRcvd+
      el->netbiosRcvd+el->qnxRcvd+el->otherRcvd;

    if((totalSent > 0) || (totalRcvd > 0)) {
      if(snprintf(buf, sizeof(buf), "<TR %s><TH "TH_BG" ALIGN=LEFT>Protocol
Distribution</TH>",
                  getRowColor()) < 0)
        BufferOverflow();
      sendString(buf);

      if(totalSent > 0) {
        if(snprintf(buf, sizeof(buf),
                    "<TD "TH_BG" ALIGN=RIGHT COLSPAN=2><IMG
SRC=hostTrafficDistrib-%s"CHART_FORMAT"?1></TD>",
                    el->hostNumIpAddress[0] == '\0' ?  el->ethAddressString
: el->hostNumIpAddress) < 0)
          BufferOverflow();
        sendString(buf);
      } else {
        sendString("<TD "TH_BG" ALIGN=RIGHT COLSPAN=2>&nbsp;</TD>");
      }

      if(totalRcvd > 0) {
        if(snprintf(buf, sizeof(buf),
                    "<TD "TH_BG" ALIGN=RIGHT COLSPAN=2><IMG
SRC=hostTrafficDistrib-%s"CHART_FORMAT"></TD>",
                    el->hostNumIpAddress[0] == '\0' ?  el->ethAddressString
: el->hostNumIpAddress) < 0)
          BufferOverflow();
        sendString(buf);
      } else {
        sendString("<TD "TH_BG" ALIGN=RIGHT COLSPAN=2>&nbsp;</TD>");
      }


      sendString("</TD></TR>");
    }
  }
#endif

?  At least you will be able to see the table entries above which give the
values being graphed...

What's interesting is that the generation routine is at line 42
(significant??) in graph.c

Also, you could add traceEvent(TRACE_INFO, "") in graph.c just before the
call:

    GDC_out_pie(250,                    /* width */
                250,                    /* height */
                fd,                     /* open file pointer */
                GDC_3DPIE,              /* or GDC_2DPIE */
                num,                    /* number of slices */
                lbl,                    /* slice labels (unlike out_png(),
can be NULL */
                p);                     /* data array */

to print the values of lbl and p for num slices... something like this:

{
  int pIndex;
  for (pIndex=0; pIndex<num; pIndex++){
      traceEvent(TRACE_INFO, "slice %3d, label is '%s', value is '%f'\n",
pIndex, lbl[pIndex], p[pIndex]);
  }
}


(of course, the NULL mutex problem also worries me - I thought that had
stopped occuring...)


-----Burton


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
Domski, Samuel
Sent: Tuesday, February 19, 2002 10:01 PM
To: [EMAIL PROTECTED]
Subject: [Ntop] NTOP Web Interface Crashing


Hi All,

I have interesting problem running NTOP. When using web interface to display
activity on some hosts (i.e. internet proxy) NTOP will crash. My
Configuration is as follows:

CPU:            Athlon 1700
RAM:            512Mb
HD:             40Gb
NICs:           4 x 3C980 PCI (eth0 with IP defined, and eth1,eth2, and
eth3, used for NTOP with no IP defined)
OS:             Red Hat 7.2 (kernel 2.4.7-10)
NTOP:           2.0.1 (02/15/2002)
LIBS:           gcc-2.96-98, glibc-2.2.4-13
SERVICES:       anacron, apmd, atd, crond, network, portmap, sshd, syslog,
xinetd, wu-ftpd

Debug show following:

19/Feb/2002 22:42:28 ERROR: accessMutex() call with a NULL mutex
[webInterface.c:229]
19/Feb/2002 22:42:28 ERROR: releaseMutex() call with a NULL mutex
[webInterface.c:282]
19/Feb/2002 22:42:28 ERROR: accessMutex() call with a NULL mutex
[webInterface.c:229]
19/Feb/2002 22:42:28 ERROR: releaseMutex() call with a NULL mutex
[webInterface.c:282]
19/Feb/2002 22:42:28 ERROR: accessMutex() call with a NULL mutex
[webInterface.c:229]
19/Feb/2002 22:42:28 ERROR: releaseMutex() call with a NULL mutex
[webInterface.c:282]
19/Feb/2002 22:42:28 ERROR: accessMutex() call with a NULL mutex
[webInterface.c:229]
19/Feb/2002 22:42:28 ERROR: releaseMutex() call with a NULL mutex
[webInterface.c:282]
19/Feb/2002 22:42:28 ERROR: accessMutex() call with a NULL mutex
[webInterface.c:229]
19/Feb/2002 22:42:28 ERROR: releaseMutex() call with a NULL mutex
[webInterface.c:282]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 5126 (LWP 3498)]
0x40083680 in gdImageGetPixel () at eval.c:41
41      eval.c: No such file or directory.
        in eval.c
(gdb) list
36      in eval.c
(gdb) info stack
#117191 0x40083fe9 in gdImageFillToBorder () at eval.c:41 <message repeated
over 100000 times)
(gdb) print deviceId
No symbol "deviceId" in current context.

Any thoughts on this problem are appreciated.

Sam Domski

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

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

Reply via email to