Permalink
Browse files

Updates

  • Loading branch information...
1 parent f6e972f commit c2e4b7f2363a95c1c6c52d261911ddb39ca0f294 @dagwieers committed Jul 24, 2005
Showing with 13 additions and 8 deletions.
  1. +1 −0 ChangeLog
  2. +6 −4 dstat
  3. +6 −4 dstat15
View
@@ -4,6 +4,7 @@
- Fixed a bug in dpopen causing gpfs/gpfsop to fail after a while
- Change terminal title (if terminal supports it)
- Don't trim the cpulist to 2 items when -f (S�bastien Prud'homme)
+- Exclude md-devices from total (Peter Cordes)
* 0.6.0 - Bettiesbaai - released 29/05/2005
- Removed keyboard input prevention patch. (Dbt 304673, Marc Lehmann)
View
@@ -155,7 +155,6 @@ class Options:
self.modlist = self.modlist + [ 'cpu', 'disk', 'net', 'page', 'sys' ]
elif opt in ['-v', '--vmstat']:
self.modlist = self.modlist + [ 'proc', 'mem', 'page', 'disk', 'sys', 'cpu' ]
- self.disklist = ('total',)
elif opt in ['-f', '--full']:
self.full = True
@@ -578,7 +577,8 @@ class dstat_disk(dstat):
if l[5] == '0' and l[9] == '0': continue
name = l[2]
if l[3:] == ['0',] * 11: continue
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[5]), self.cn2['total'][1] + long(l[9]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[5]), self.cn2['total'][1] + long(l[9]) )
if name in self.vars and name != 'total':
self.cn2[name] = ( self.cn2[name][0] + long(l[5]), self.cn2[name][1] + long(l[9]) )
for set in self.vars:
@@ -638,7 +638,8 @@ class dstat_disk24(dstat):
l = line.split()
if len(l) < 15 or l[0] == 'major' or int(l[1]) % 16 != 0: continue
name = l[3]
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[6]), self.cn2['total'][1] + long(l[10]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[6]), self.cn2['total'][1] + long(l[10]) )
if name in self.vars:
self.cn2[name] = ( self.cn2[name][0] + long(l[6]), self.cn2[name][1] + long(l[10]) )
for set in self.vars:
@@ -713,7 +714,8 @@ class dstat_disk24old(dstat):
l = m.groups()
if len(l) < 4: continue
name = dev(int(l[0]), int(l[1]))
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[2]), self.cn2['total'][1] + long(l[3]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[2]), self.cn2['total'][1] + long(l[3]) )
if name in self.vars and name != 'total':
self.cn2[name] = ( self.cn2[name][0] + long(l[2]), self.cn2[name][1] + long(l[3]) )
for set in self.vars:
View
@@ -148,7 +148,6 @@ class Options:
self.modlist = self.modlist + [ 'cpu', 'disk', 'net', 'page', 'sys' ]
elif opt in ['-v', '--vmstat']:
self.modlist = self.modlist + [ 'proc', 'mem', 'page', 'disk', 'sys', 'cpu' ]
- self.disklist = ('total',)
elif opt in ['-f', '--full']:
self.full = True
@@ -574,7 +573,8 @@ class dstat_disk(dstat):
if l[5] == '0' and l[9] == '0': continue
name = l[2]
if self.regexp.match(name): continue
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[5]), self.cn2['total'][1] + long(l[9]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[5]), self.cn2['total'][1] + long(l[9]) )
if name in self.vars and name != 'total':
self.cn2[name] = ( self.cn2[name][0] + long(l[5]), self.cn2[name][1] + long(l[9]) )
for set in self.vars:
@@ -641,7 +641,8 @@ class dstat_disk24(dstat):
name = l[3]
if name == 'name': continue
if self.regexp.match(name): continue
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[6]), self.cn2['total'][1] + long(l[10]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[6]), self.cn2['total'][1] + long(l[10]) )
if name in self.vars:
self.cn2[name] = ( self.cn2[name][0] + long(l[6]), self.cn2[name][1] + long(l[10]) )
for set in self.vars:
@@ -718,7 +719,8 @@ class dstat_disk24old(dstat):
l = m.groups()
if len(l) < 4: continue
name = dev(int(l[0]), int(l[1]))
- self.cn2['total'] = ( self.cn2['total'][0] + long(l[2]), self.cn2['total'][1] + long(l[3]) )
+ if not re.match('(md[0-9]+)', name):
+ self.cn2['total'] = ( self.cn2['total'][0] + long(l[2]), self.cn2['total'][1] + long(l[3]) )
if name in self.vars and name != 'total':
self.cn2[name] = ( self.cn2[name][0] + long(l[2]), self.cn2[name][1] + long(l[3]) )
for set in self.vars:

0 comments on commit c2e4b7f

Please sign in to comment.