Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Justin Bronder (jsbronder)" <jsbronder@g.o>
Subject: gentoo-x86 commit in sys-cluster/ganglia/files: ganglia-3.1-gmond-python-tcpconn-concurrency.patch
Date: Mon, 04 Aug 2008 23:17:12 +0000
jsbronder    08/08/04 23:17:12

  Added:                ganglia-3.1-gmond-python-tcpconn-concurrency.patch
  Log:
  Version bump, thanks to Carlo Marcelo Arenas Belon for help with the ebuild.  #233440
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.1                  sys-cluster/ganglia/files/ganglia-3.1-gmond-python-tcpconn-concurrency.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/ganglia/files/ganglia-3.1-gmond-python-tcpconn-concurrency.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-cluster/ganglia/files/ganglia-3.1-gmond-python-tcpconn-concurrency.patch?rev=1.1&content-type=text/plain

Index: ganglia-3.1-gmond-python-tcpconn-concurrency.patch
===================================================================
Index: gmond/python_modules/network/tcpconn.py
===================================================================
--- gmond/python_modules/network/tcpconn.py	(revision 1622)
+++ gmond/python_modules/network/tcpconn.py	(working copy)
@@ -245,19 +245,14 @@
                 tempconns[conn] = 0
 
             #Call the netstat utility and split the output into separate lines
-            fd_poll = select.poll()
-            self.popenChild = popen2.Popen3("netstat -t -a")
-            fd_poll.register(self.popenChild.fromchild)
+            self.popenChild = popen2.Popen3("netstat -t -a -n")
+            lines = self.popenChild.fromchild.readlines()
 
-            poll_events = fd_poll.poll()
-
-            if (len(poll_events) == 0):             # Timeout
-                continue
-
-            for (fd, events) in poll_events:
-                lines = self.popenChild.fromchild.readlines()
-
-            self.popenChild.wait()
+            try:
+                self.popenChild.wait()
+            except OSError, e:
+                if e.errno == 10: # No child process
+                    continue
             
             #Iterate through the netstat output looking for the 'tcp' keyword in the tcp_at 
             # position and the state information in the tcp_state_at position. Count each 
@@ -300,7 +295,8 @@
             _glock.release()
             
             #Wait for the refresh_rate period before collecting the netstat data again.
-            time.sleep(_refresh_rate)
+            if not self.shuttingdown:
+                time.sleep(_refresh_rate)
             
         #Set the current state of the thread after a shutdown has been indicated.
         self.running = False





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in sys-cluster/ganglia: ChangeLog ganglia-3.1.0.ebuild
Next by thread:
gentoo-x86 commit in x11-themes/gtk-engines-qtcurve: ChangeLog gtk-engines-qtcurve-0.59.7.ebuild
Previous by date:
gentoo-x86 commit in sys-cluster/ganglia: ChangeLog ganglia-3.1.0.ebuild
Next by date:
gentoo-x86 commit in app-misc/booh: ChangeLog booh-0.9.1.ebuild


Updated Jul 14, 2010

Summary: Archive of the gentoo-commits mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.