Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improvements to Dstat specific plugins

  • Loading branch information...
commit dcadae8ac0829af8c3e0dedf5f2351baca933f70 1 parent 15fdaff
@dagwieers authored
Showing with 6 additions and 5 deletions.
  1. +2 −2 plugins/dstat_dstat.py
  2. +4 −3 plugins/dstat_dstat_cpu.py
View
4 plugins/dstat_dstat.py
@@ -13,8 +13,8 @@ def __init__(self):
self.name = 'dstat'
self.vars = ('cputime', 'latency')
self.type = 'd'
- self.width = 4
- self.scale = 100
+ self.width = 5
+ self.scale = 1000
self.open('/proc/%s/schedstat' % ownpid)
def extract(self):
View
7 plugins/dstat_dstat_cpu.py
@@ -14,8 +14,9 @@ class dstat_plugin(dstat):
def __init__(self):
self.name = 'dstat cpu'
self.vars = ('user', 'system', 'total')
- self.type = 'd'
- self.width = 4
+ self.nick = ('usr', 'sys', 'tot')
+ self.type = 'p'
+ self.width = 3
self.scale = 100
def extract(self):
@@ -26,7 +27,7 @@ def extract(self):
self.set2['total'] = float(res.ru_utime) + float(res.ru_stime)
for name in self.vars:
- self.val[name] = (self.set2[name] - self.set1[name]) * 1000.0 / elapsed
+ self.val[name] = (self.set2[name] - self.set1[name]) * 100.0 / elapsed / cpunr
if step == op.delay:
self.set1.update(self.set2)

0 comments on commit dcadae8

Please sign in to comment.
Something went wrong with that request. Please try again.