[svn] r5724 - trunk/tools/dstat/plugins

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Mon Aug 13 11:35:47 CEST 2007


Author: dag
Date: 2007-08-13 11:35:38 +0200 (Mon, 13 Aug 2007)
New Revision: 5724

Modified:
   trunk/tools/dstat/plugins/dstat_innodb_buffer.py
   trunk/tools/dstat/plugins/dstat_innodb_io.py
   trunk/tools/dstat/plugins/dstat_innodb_ops.py
   trunk/tools/dstat/plugins/dstat_mysql_io.py
   trunk/tools/dstat/plugins/dstat_mysql_keys.py
Log:
Experiment with DSTAT_MYSQL env var.

Modified: trunk/tools/dstat/plugins/dstat_innodb_buffer.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_innodb_buffer.py	2007-08-13 09:28:09 UTC (rev 5723)
+++ trunk/tools/dstat/plugins/dstat_innodb_buffer.py	2007-08-13 09:35:38 UTC (rev 5724)
@@ -1,6 +1,9 @@
 global string, select
 import string, select
 
+global mysql_options
+mysql_options = os.getenv('DSTAT_MYSQL')
+
 class dstat_innodb_buffer(dstat):
     def __init__(self):
         self.name = 'innodb pool'
@@ -12,7 +15,7 @@
     def check(self): 
         if os.access('/usr/bin/mysql', os.X_OK):
             try:
-                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n')
+                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n %s' % mysql_options)
             except IOError:
                 raise Exception, 'Cannot interface with MySQL binary'
             return True

Modified: trunk/tools/dstat/plugins/dstat_innodb_io.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_innodb_io.py	2007-08-13 09:28:09 UTC (rev 5723)
+++ trunk/tools/dstat/plugins/dstat_innodb_io.py	2007-08-13 09:35:38 UTC (rev 5724)
@@ -1,6 +1,9 @@
 global string, select
 import string, select
 
+global mysql_options
+mysql_options = os.getenv('DSTAT_MYSQL')
+
 class dstat_innodb_io(dstat):
     def __init__(self):
         self.name = 'innodb io ops '
@@ -12,7 +15,7 @@
     def check(self): 
         if os.access('/usr/bin/mysql', os.X_OK):
             try:
-                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n')
+                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n %s' % mysql_options)
             except IOError:
                 raise Exception, 'Cannot interface with MySQL binary'
             return True

Modified: trunk/tools/dstat/plugins/dstat_innodb_ops.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_innodb_ops.py	2007-08-13 09:28:09 UTC (rev 5723)
+++ trunk/tools/dstat/plugins/dstat_innodb_ops.py	2007-08-13 09:35:38 UTC (rev 5724)
@@ -1,6 +1,9 @@
 global string, select
 import string, select
 
+global mysql_options
+mysql_options = os.getenv('DSTAT_MYSQL')
+
 class dstat_innodb_ops(dstat):
     def __init__(self):
         self.name = 'innodb ops'
@@ -12,7 +15,7 @@
     def check(self): 
         if os.access('/usr/bin/mysql', os.X_OK):
             try:
-                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n')
+                self.stdin, self.stdout, self.stderr = dpopen('/usr/bin/mysql -n %s' % mysql_options)
             except IOError:
                 raise Exception, 'Cannot interface with MySQL binary'
             return True

Modified: trunk/tools/dstat/plugins/dstat_mysql_io.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_mysql_io.py	2007-08-13 09:28:09 UTC (rev 5723)
+++ trunk/tools/dstat/plugins/dstat_mysql_io.py	2007-08-13 09:35:38 UTC (rev 5724)
@@ -1,6 +1,7 @@
 global string, select
 import string, select
 
+global mysql_options
 mysql_options = os.getenv('DSTAT_MYSQL')
 
 class dstat_mysql_io(dstat):

Modified: trunk/tools/dstat/plugins/dstat_mysql_keys.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_mysql_keys.py	2007-08-13 09:28:09 UTC (rev 5723)
+++ trunk/tools/dstat/plugins/dstat_mysql_keys.py	2007-08-13 09:35:38 UTC (rev 5724)
@@ -1,6 +1,7 @@
 global string, select
 import string, select
 
+global mysql_options
 mysql_options = os.getenv('DSTAT_MYSQL')
 
 class dstat_mysql_keys(dstat):



More information about the svn-commits mailing list