Update of /export/home/ntop/ntop/plugins
In directory unknown:/tmp/cvs-serv1032/plugins

Modified Files:
        rrdPlugin.c 
Log Message:
Add local/remote traffic graph to the historical interface statistics.

This adds the RRD dumps for local/remote traffic, and adds the displaying
of the new graph.

--- plugins/rrdPlugin.c.orig    2005-04-03 14:55:30.734822752 +0200
+++ plugins/rrdPlugin.c 2005-04-03 16:05:42.081600728 +0200
@@ -328,9 +328,9 @@
     sendString("<TR><TH "DARK_BG" COLSPAN=1>Traffic Summary</TH></TR>\n");

     if(strncmp(rrdTitle, "interface", strlen("interface")) == 0) {
-      min = 0, max = 4;
+      min = 0, max = 5;
     } else {
-      min = 5, max = 6;
+      min = 6, max = 7;
     }

     for(i=min; i<=max; i++) {
@@ -807,8 +807,9 @@
     }
     label = "Bytes/sec";
     break;
-  case 5: rrds = (char**)rrd_summary_host_sentRcvd_packets; label = 
"Packets/sec"; break;
-  case 6: rrds = (char**)rrd_summary_host_sentRcvd_bytes; label = "Bytes/sec"; 
break;
+  case 5: rrds = (char**)rrd_summary_local_remote_ip_bytes; label = 
"Bytes/sec"; break;
+  case 6: rrds = (char**)rrd_summary_host_sentRcvd_packets; label = 
"Packets/sec"; break;
+  case 7: rrds = (char**)rrd_summary_host_sentRcvd_bytes; label = "Bytes/sec"; 
break;

   case 99:
     /* rrdName format can be IP_<proto><Rcvd|Sent><Bytes|Pkts> */
@@ -2964,6 +2965,16 @@
        updateGauge(rrdPath,   "activeHostSendersNum",  
numActiveSenders(devIdx));
        updateCounter(rrdPath, "ipBytes",       
myGlobals.device[devIdx].ipBytes.value);

+       updateCounter(rrdPath, "ipLocalBytes",  
myGlobals.device[devIdx].tcpGlobalTrafficStats.local.value +
+                                               
myGlobals.device[devIdx].udpGlobalTrafficStats.local.value +
+                                               
myGlobals.device[devIdx].icmpGlobalTrafficStats.local.value );
+       updateCounter(rrdPath, "ipLocalToRemoteBytes",    
myGlobals.device[devIdx].tcpGlobalTrafficStats.local2remote.value +
+                                               
myGlobals.device[devIdx].udpGlobalTrafficStats.local2remote.value +
+                                               
myGlobals.device[devIdx].icmpGlobalTrafficStats.local2remote.value );
+       updateCounter(rrdPath, "ipRemoteToLocalBytes", 
myGlobals.device[devIdx].tcpGlobalTrafficStats.remote2local.value +
+                                               
myGlobals.device[devIdx].udpGlobalTrafficStats.remote2local.value +
+                                               
myGlobals.device[devIdx].icmpGlobalTrafficStats.remote2local.value );
+
        if(myGlobals.device[devIdx].netflowGlobals != NULL) {
          updateCounter(rrdPath, "NF_numFlowPkts", 
myGlobals.device[devIdx].netflowGlobals->numNetFlowsPktsRcvd);
          updateCounter(rrdPath, "NF_numFlows", 
myGlobals.device[devIdx].netflowGlobals->numNetFlowsRcvd);



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

Reply via email to