[svn] r5723 - trunk/tools/dstat/plugins
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Mon Aug 13 11:28:37 CEST 2007
Author: dag
Date: 2007-08-13 11:28:09 +0200 (Mon, 13 Aug 2007)
New Revision: 5723
Modified:
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_mysql_io.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_mysql_io.py 2007-08-13 08:39:16 UTC (rev 5722)
+++ trunk/tools/dstat/plugins/dstat_mysql_io.py 2007-08-13 09:28:09 UTC (rev 5723)
@@ -1,6 +1,8 @@
global string, select
import string, select
+mysql_options = os.getenv('DSTAT_MYSQL')
+
class dstat_mysql_io(dstat):
def __init__(self):
self.name = 'mysql io'
@@ -12,7 +14,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_keys.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_mysql_keys.py 2007-08-13 08:39:16 UTC (rev 5722)
+++ trunk/tools/dstat/plugins/dstat_mysql_keys.py 2007-08-13 09:28:09 UTC (rev 5723)
@@ -1,6 +1,8 @@
global string, select
import string, select
+mysql_options = os.getenv('DSTAT_MYSQL')
+
class dstat_mysql_keys(dstat):
def __init__(self):
self.name = 'mysql key status'
@@ -12,7 +14,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
More information about the svn-commits
mailing list