Permalink
Browse files

Some more updates

  • Loading branch information...
1 parent f6aaabc commit 8e9b8e25ef9c6c505549e0728ce0e14c38284b91 @dagwieers committed Nov 6, 2004
Showing with 17 additions and 10 deletions.
  1. +3 −0 ChangeLog
  2. +10 −7 dstat
  3. +4 −3 dstat.spec
View
@@ -1,3 +1,6 @@
+* 0.5
+- Changed some more int()'s into float()'s. (Pasi Pirhonen)
+
* 0.4
- Added interrupt stats
- Order of the stats adhere the order of the options
View
17 dstat
@@ -18,7 +18,7 @@ from __future__ import generators
import os, sys, re, getopt, fcntl, termios, struct
import ConfigParser, urlparse, signal, resource
-VERSION = "0.4"
+VERSION = "0.5"
enable = ('yes', 'on', 'true', '1')
disable = ('no', 'off', 'false', '0')
@@ -108,14 +108,14 @@ Dstat options:
-a, --all enable cpu, disk, mem, net, page and sys (eq. -cdmngy)
-c, --cpu enable cpu stats
-d, --disk enable disk stats
- -D total,dev1 include dev1 and total number
+ -D total,hda include hda and total
-g, --page enable page stats
-i, --int enable interrupt stats
- -I 5,9 include int5 and int9
+ -I 5,eth2 include int5 and interrupt used by eth2
-l, --load enable load stats
-m, --mem enable memory stats
-n, --net enable network stats
- -N if2,total include if2 and total
+ -N eth1,total include eth1 and total
-p, --proc enable process stats
-s, --swap enable swap stats
-y, --sys enable system stats
@@ -327,12 +327,12 @@ class dstat_disk24(dstat_disk):
name = l[3]
if name == 'name': continue
if name in self.vars:
- self.cn2[name] = ( self.cn2[name][0] + int(l[6]), self.cn2[name][1] + int(l[10]) )
+ self.cn2[name] = ( self.cn2[name][0] + float(l[6]), self.cn2[name][1] + float(l[10]) )
for set in self.vars:
if set in self.diskset and name in self.diskset[set]:
- self.cn2[set] = ( self.cn2[set][0] + int(l[6]), self.cn2[set][1] + int(l[10]) )
+ self.cn2[set] = ( self.cn2[set][0] + float(l[6]), self.cn2[set][1] + float(l[10]) )
if len(l) > 10:
- self.cn2['total'] = ( self.cn2['total'][0] + int(l[6]), self.cn2['total'][1] + int(l[10]))
+ self.cn2['total'] = ( self.cn2['total'][0] + float(l[6]), self.cn2['total'][1] + float(l[10]))
if count != 0:
for name in self.cn2:
self.val[name] = (
@@ -641,6 +641,9 @@ def convlist(max, list):
retlist = retlist + (conv(max, var), )
return retlist
+#def convlist(max, list):
+# return map(conv, list)
+
def conv(max, var, base = 1024):
### lowercase (b) is better for the eyes than uppercase
units = ('B', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y')
View
@@ -4,7 +4,7 @@
Summary: Versatile vmstat, iostat and ifstat replacement
Name: dstat
-Version: 0.4
+Version: 0.5
Release: 1
License: GPL
Group: System Environment/Base
@@ -16,6 +16,7 @@ Vendor: Dag Apt Repository, http://dag.wieers.com/apt/
Source: http://dag.wieers.com/home-made/dstat/dstat-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildArch: noarch
Requires: python
%description
@@ -58,8 +59,8 @@ interprete real-time data as easy as possible.
%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING README TODO
-#%doc *.conf
-#%config(noreplace) %{_sysconfdir}/dstat.conf
+%doc *.conf
+%config(noreplace) %{_sysconfdir}/dstat.conf
%{_bindir}/dstat
%changelog

0 comments on commit 8e9b8e2

Please sign in to comment.