[svn] r6078 - in trunk/tools/dstat: . plugins
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Fri Jan 4 15:02:19 CET 2008
Author: dag
Date: 2008-01-04 14:59:37 +0100 (Fri, 04 Jan 2008)
New Revision: 6078
Modified:
trunk/tools/dstat/ChangeLog
trunk/tools/dstat/plugins/dstat_cpufreq.py
Log:
Improvement to cpufreq module for SMP systems
Modified: trunk/tools/dstat/ChangeLog
===================================================================
--- trunk/tools/dstat/ChangeLog 2008-01-03 19:19:41 UTC (rev 6077)
+++ trunk/tools/dstat/ChangeLog 2008-01-04 13:59:37 UTC (rev 6078)
@@ -17,6 +17,7 @@
- Added external dstat_topoom plugin to show top out-of-memory score
- Added external dstat_mysql5_* plugins (Frederic Descamps)
- Reinstated the use of -D md0 which got lost (Peter Rabbitson)
+- Improvement to cpufreq module for SMP systems (Bert de Bruijn)
* 0.6.6 - Unemployed - released 28/04/2007
- Removed SwapCached from the Cached counter (Dbt 418326, Peter Rabbitson)
Modified: trunk/tools/dstat/plugins/dstat_cpufreq.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_cpufreq.py 2008-01-03 19:19:41 UTC (rev 6077)
+++ trunk/tools/dstat/plugins/dstat_cpufreq.py 2008-01-04 13:59:37 UTC (rev 6078)
@@ -4,13 +4,18 @@
### Authority: dag at wieers.com
global string
+global glob
import string
+import glob
class dstat_cpufreq(dstat):
def __init__(self):
self.name = 'frequency'
self.format = ('p', 4, 34)
- self.vars = os.listdir('/sys/devices/system/cpu/')
+# self.vars = os.listdir('/sys/devices/system/cpu/')
+ self.vars = []
+ for name in glob.glob('/sys/devices/system/cpu/cpu?'):
+ self.vars.append(os.path.basename(name))
# self.nick = [string.lower(name) for name in self.vars]
self.nick = []
for name in self.vars:
More information about the svn-commits
mailing list