"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "plugins/dstat_rpcd.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_rpcd.py  (dstat-0.7.3):dstat_rpcd.py  (dstat-0.7.4)
skipping to change at line 17 skipping to change at line 17
self.vars = ('calls', 'badcalls', 'badauth', 'badclnt', 'xdrcall') self.vars = ('calls', 'badcalls', 'badauth', 'badclnt', 'xdrcall')
self.type = 'd' self.type = 'd'
self.width = 5 self.width = 5
self.scale = 1000 self.scale = 1000
self.open('/proc/net/rpc/nfsd') self.open('/proc/net/rpc/nfsd')
def extract(self): def extract(self):
for l in self.splitlines(): for l in self.splitlines():
if not l or l[0] != 'rpc': continue if not l or l[0] != 'rpc': continue
for i, name in enumerate(self.vars): for i, name in enumerate(self.vars):
self.set2[name] = long(l[i+1]) self.set2[name] = int(l[i+1])
for name in self.vars: for name in self.vars:
self.val[name] = (self.set2[name] - self.set1[name]) * 1.0 / elapsed self.val[name] = (self.set2[name] - self.set1[name]) * 1.0 / elapsed
if step == op.delay: if step == op.delay:
self.set1.update(self.set2) self.set1.update(self.set2)
# vim:ts=4:sw=4:et # vim:ts=4:sw=4:et
 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)