Hard to say what happens w/ that buffer too short - it could cause some
really odd results.  Fix:

Change this:

    /* Avoids strtok to blanks into hostsFilter */
    safe_snprintf(__FILE__, __LINE__, rrdPath, sizeof(rrdPath), "%s",
hostsFilter);
    handleAddressLists(rrdPath, networks, &numLocalNets, value,
sizeof(value),
                       CONST_HANDLEADDRESSLISTS_RRD); 

To something like this...

    {
      char *hostsFilterDup = strdup(hostsFilter);
      handleAddressLists(hostsFilterDup, networks, &numLocalNets, value,
sizeof(value),
                         CONST_HANDLEADDRESSLISTS_RRD);
      free(hostsFilterDup);
    }

Similar logic in at least one other place, so - given that
handleAddressLists changes the contents of it's 1st pointer - it might be
better to make the change in util.c.

But I don't think it's related to tx/rx - that's more likely (esp. with the
error messages) due to missing files, such as running out of disk space.

-----Burton

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Aaron Grewell
Sent: Wednesday, September 21, 2005 1:44 PM
To: [email protected]
Subject: [Ntop] Buffer too short error and inbound traffic recording

I've got an interesting instance of the "Buffer too short" problem (or it
may be something else entirely, but we'll see).  Recently ntop stopped
recording inbound traffic on any of the graphs or pages.  Only outbound
traffic is ever recorded in any of the UI now.  I thought that maybe
something was broken in my RRD's, so I deleted all of /usr/share/ntop and
upgraded to 3.2rc1 from CVS (this was earlier today).  The problem remains.
A peek into the logs reveals this error:

**ERROR** Buffer too short @ rrdPlugin.c:3029 (increase to at least 591)

I read into the back traffic about "Buffer too short" but it was all about
which pages were broken in the HTML, not the disappearance of all inbound
traffic.

An example of what I am seeing is this:
Click Summary->Network Load
The graph is there and populated.  Click the graph, and the results show Top
Hosts Sent as normal.  Top Hosts Rcvd shows the same three hosts all the
time, and 0.0bps as throughput for each.  There's plenty of inbound traffic,
ntop just isn't recording it.

Other fun errors which may or may not be anything of interest:

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_HTTPBytes.png' for write: 
No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_HTTPBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_DNSBytes.png' for write:
No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_DNSBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_MailBytes.png' for write: 
No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_MailBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_SSHBytes.png' for write:
No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_SSHBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_BitTorrentBytes.png' for
write: No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_BitTorrentBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening
'/usr/share/ntop/rrd/graphics/now-12h-arbitraryIP_MessengerBytes.png' for
write: No such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphCounter() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_MessengerBytes.rrd

Sep 21 10:25:33 castor ntop[30756]:   **ERROR** RRD: rrd_graph() call
failed, 
rc -1, Opening '/usr/share/ntop/rrd/graphics/now-12h-4.png' for write: No
such file or directory

Sep 21 10:25:33 castor ntop[30756]:   RRD: Failing file in graphSummary() 
is /usr/share/ntop/rrd/interfaces/eth0/IP_MessengerBytes.rrd

So now the question is, what's next?
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

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

Reply via email to