Hi all.
A few weks ago, I wrote about a problem with all
the RRDs generated by ntop which were empty of data although with
RRD_DEBUG > 0 it seemed that the plugin was actually doing the
updates. As far as I know now, it was a problem with a lack of memory
(ntop is hosted on a bi-pro with 2 Gbytes of memory). I think so
because everything seem to work now with the use of the -x argument. I
used it with the value 400. Ntop is stable, using 34 Mbytes of real
memory.
It also solved a problem a stability of ntop on my FC3 Linux.
I used -x 400 in conjonction with -g.
By the way, with this combination of arguments, wich value seem smart
for -x ? The total number of hosts connected to my local network ?
Regards,
Burton Strauss wrote:
Copy line lines from 1114:
#if RRD_DEBUG > 0
traceEvent(CONST_TRACE_INFO, "RRD_DEBUG: rrd_create(%s, %s, %u)=%d",
hostPath, key, (unsigned long)value, rc);
#endif
And modify/ put them after 1216,
so you get an rrd_update() log just like the rrd_create() - gives this:
rrd_clear_error();
} else {
#if RRD_DEBUG > 0
traceEvent(CONST_TRACE_INFO, "RRD_DEBUG: rrd_update(%s, %s,
%s)=%d",
hostPath, key, cmd, rc);
#endif
}
}
That way there will be a log
message for each update... but it seems like the updates SHOULD be
working - there's the time stamp and the fact that there's no errors...
-----Burton
patch:
--- plugins/rrdPlugin.c 27 Feb
2005 22:17:12 -0000 2.175
+++ plugins/rrdPlugin.c 4 Mar 2005 13:01:13 -0000
@@ -1112,8 +1112,8 @@
#endif
#if RRD_DEBUG > 0
- traceEvent(CONST_TRACE_INFO, "RRD_DEBUG: rrd_create(%s, %s,
%u)=%d",
- hostPath, key, (unsigned long)value, rc);
+ traceEvent(CONST_TRACE_INFO, "RRD_DEBUG: rrd_create(%s, %s)=%d",
+ hostPath, key, rc);
#endif
createdCounter = 1;
}
@@ -1214,6 +1214,11 @@
}
rrd_clear_error();
+ } else {
+#if RRD_DEBUG > 0
+ traceEvent(CONST_TRACE_INFO, "RRD_DEBUG: rrd_update(%s, %s,
%s)=%d",
+ hostPath, key, cmd, rc);
+#endif
}
}
Burton Strauss wrote:
Try building w/ #define RRD_DEBUG 2 (don't go to 3 - that's way too much
output for a look-see)...
That will put a lot more status info into the log.
I did it and restarted ntop.
Here is what I can see for a host whis is a web server :
- the contents of the rrd files for that host are all empty. As
an example, I am showing at the end of this message the content of the
file BytesRcvd.rrd, but they are all the same.
- The values which I can see on the Web page 193.51.208.69.html,
calculated by ntop for this same hosts, show a trafic > 700 MBytes
received.
Here are the logs generated by the #define RRD_DEBUG 2 directive after
compiling the rrdPlugin for the host 193.51.208.69. There is no errors
in the log file.
[EMAIL PROTECTED] ntop]# grep 193.51.208.69
/var/log/messages | grep -i rrd
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 14:54:42 metro-sop ntop[27582]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
pktSent, 192)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
pktRcvd, 45883)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesSent, 13759)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesRcvd, 3804421)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesSentRem, 13759)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesRcvdLoc, 665)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesRcvdFromRem, 3803756)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
tcpRcvdLoc, 665)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
tcpRcvdFromRem, 3789885)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
totContactedSentPeers, 179)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
totContactedRcvdPeers, 3908)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
HTTPRcvdBytes, 3762205)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
MailRcvdBytes, 1468)=0
Mar 3 14:54:42 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
SSHRcvdBytes, 4213)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 15:21:09 metro-sop ntop[27582]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
pktBroadcastSent, 2)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesBroadcastSent, 144)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
bytesSentLoc, 12620)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
tcpSentLoc, 12476)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
tcpSentRem, 13511)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
udpRcvdFromRem, 12484)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
HTTPSentBytes, 25987)=0
Mar 3 15:21:09 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
NBios-IPRcvdBytes, 9984)=0
Mar 3 15:43:01 metro-sop ntop[27582]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 15:43:01 metro-sop ntop[27582]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 15:43:01 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
udpSentRem, 304)=0
Mar 3 15:43:01 metro-sop ntop[27582]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 15:43:01 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
TimeSentBytes, 304)=0
Mar 3 15:43:02 metro-sop ntop[27582]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
TimeRcvdBytes, 304)=0
Mar 3 16:17:13 metro-sop ntop[27582]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 16:17:13 metro-sop ntop[27582]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 16:17:13 metro-sop ntop[27582]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 16:37:34 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 16:37:34 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 16:37:34 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 16:44:11 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 16:44:11 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 16:44:11 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 17:01:57 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 17:01:57 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 17:01:57 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 17:15:34 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 17:15:34 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 17:15:34 metro-sop ntop[32187]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/,
udpSentLoc, 58)=0
Mar 3 17:15:34 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 17:15:34 metro-sop ntop[32187]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
DNSSentBytes, 116)=0
Mar 3 17:15:34 metro-sop ntop[32187]: RRD_DEBUG:
rrd_create(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/IP_,
DNSRcvdBytes, 176)=0
Mar 3 17:31:35 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 17:31:35 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 17:31:35 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 17:46:53 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 17:46:53 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 17:46:53 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 18:06:10 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 18:06:10 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 18:06:11 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 18:26:02 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 18:26:02 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 18:26:02 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 18:47:32 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 18:47:32 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 18:47:32 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 19:12:23 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 19:12:23 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 19:12:23 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
Mar 3 19:32:09 metro-sop ntop[32187]: RRD_DEBUG: calling
mkdir(/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/)
Mar 3 19:32:09 metro-sop ntop[32187]: RRD: Updating 193.51.208.69
[193.51.208.69/]
Mar 3 19:32:09 metro-sop ntop[32187]: RRD_DEBUG: Updating host
193.51.208.69
[EMAIL PROTECTED] 69]$ rrdtool dump
/usr/local/admin/ntop/exploit/rrd/interfaces/NetFlow-device.2/hosts/193/51/208/69/bytesRcvd.rrd
| grep -v NaN
<!-- Round Robin Database Dump -->
<rrd>
<version> 0001 </version>
<step> 300 </step> <!-- Seconds -->
<lastupdate> 1109874440 </lastupdate> <!--
2005-03-03 19:27:20 CET -->
<ds>
<name> counter </name>
<type> COUNTER </type>
<minimal_heartbeat> 300 </minimal_heartbeat>
<min> 0.0000000000e+00 </min>
<max> 1.2500000000e+08 </max>
<!-- PDP Status -->
<last_ds> 727692813 </last_ds>
<value> 0.0000000000e+00 </value>
<unknown_sec> 140 </unknown_sec>
</ds>
<!-- Round Robin Archives -->
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300
seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
</cdp_prep>
<database>
</database>
</rra>
<rra>
<cf> MIN </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300
seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
</cdp_prep>
<database>
</database>
</rra>
<rra>
<cf> MAX </cf>
<pdp_per_row> 1 </pdp_per_row> <!-- 300
seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
</cdp_prep>
<database>
</database>
</rra>
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 12 </pdp_per_row> <!--
3600 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
</cdp_prep>
<database>
</database>
</rra>
<rra>
<cf> AVERAGE </cf>
<pdp_per_row> 288 </pdp_per_row> <!--
86400 seconds -->
<xff> 5.0000000000e-01 </xff>
<cdp_prep>
</cdp_prep>
<database>
</database>
</rra>
</rrd>
[EMAIL PROTECTED] 69]$
--
Didier Benza [EMAIL PROTECTED]
Tel : +33 492 38 7167 / Fax : +33 492 38 7602
INRIA 2004, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex
_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop
--
Didier Benza [EMAIL PROTECTED]
Tel : +33 492 38 7167 / Fax : +33 492 38 7602
INRIA 2004, Route des Lucioles, BP 93, 06902 Sophia Antipolis Cedex
|