Permalink
Browse files

Improvement to cpufreq module for SMP systems

  • Loading branch information...
1 parent 9d2e273 commit 51e34547fc7533f1ae9dc3dbeaba5c15de667b08 @dagwieers committed Jan 4, 2008
Showing with 7 additions and 1 deletion.
  1. +1 −0 ChangeLog
  2. +6 −1 plugins/dstat_cpufreq.py
View
@@ -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)
View
@@ -4,13 +4,18 @@
### Authority: dag@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:

0 comments on commit 51e3454

Please sign in to comment.