gnome-system-monitor r2442 - trunk/src



Author: bdejean
Date: Tue Jun 17 20:35:33 2008
New Revision: 2442
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2442&view=rev

Log:
Fixed network speed when there are pseudo-devices with no address.
Patch by Mark Karpeles <mark hell ne jp>.
Closes #535544.


Modified:
   trunk/src/load-graph.cpp

Modified: trunk/src/load-graph.cpp
==============================================================================
--- trunk/src/load-graph.cpp	(original)
+++ trunk/src/load-graph.cpp	Tue Jun 17 20:35:33 2008
@@ -465,6 +465,18 @@
 		if (netload.if_flags & (1 << GLIBTOP_IF_FLAGS_LOOPBACK))
 			continue;
 
+		/* Skip interfaces without any IPv4/IPv6 address (or
+		 those with only a LINK ipv6 addr) However we need to
+		 be able to exclude these while still keeping the
+		 value so when they get online (with NetworkManager
+		 for example) we don't get a suddent peak.  Once we're
+		 able to get this, ignoring down interfaces will be
+		 possible too.  */
+		if (not (netload.flags & (1 << GLIBTOP_NETLOAD_ADDRESS6)
+			 and netload.scope6 != GLIBTOP_IF_IN6_SCOPE_LINK)
+		    and not (netload.flags & (1 << GLIBTOP_NETLOAD_ADDRESS)))
+			continue;
+
 		/* Don't skip interfaces that are down (GLIBTOP_IF_FLAGS_UP)
 		   to avoid spikes when they are brought up */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]