"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/dstat_cpufreq.py" between
dstat-0.7.3.tar.gz and dstat-0.7.4.tar.gz

About: dstat is a versatile resource statistic tool and a replacement for vmstat, iostat and ifstat (using Python).

dstat_cpufreq.py  (dstat-0.7.3):dstat_cpufreq.py  (dstat-0.7.4)
skipping to change at line 17 skipping to change at line 17
def __init__(self): def __init__(self):
self.name = 'frequency' self.name = 'frequency'
self.type = 'p' self.type = 'p'
self.width = 4 self.width = 4
self.scale = 34 self.scale = 34
def check(self): def check(self):
for cpu in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'): for cpu in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'):
if not os.access(cpu+'/cpufreq/scaling_cur_freq', os.R_OK): if not os.access(cpu+'/cpufreq/scaling_cur_freq', os.R_OK):
raise Exception, 'Cannot access acpi %s frequency information' % os.path.basename(cpu) raise Exception('Cannot access acpi %s frequency information' % os.path.basename(cpu))
def vars(self): def vars(self):
ret = [] ret = []
for name in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'): for name in glob.glob('/sys/devices/system/cpu/cpu[0-9]*'):
ret.append(os.path.basename(name)) ret.append(os.path.basename(name))
ret.sort() ret.sort()
return ret return ret
# return os.listdir('/sys/devices/system/cpu/') # return os.listdir('/sys/devices/system/cpu/')
def nick(self): def nick(self):
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)