Permalink
Browse files

Here is 0.6.0 !

  • Loading branch information...
1 parent 90395a6 commit b25d4cb31870ed49a9bf813bec4b0b8d8366b48b @dagwieers committed May 29, 2005
Showing with 104 additions and 71 deletions.
  1. +11 −5 ChangeLog
  2. +22 −14 README
  3. +4 −3 README.plugins
  4. +5 −5 TODO
  5. +1 −1 dstat
  6. +29 −25 dstat.spec
  7. +20 −2 dstat15
  8. +1 −1 plugins/dstat_freespace.py
  9. +5 −7 plugins/dstat_gpfs.py
  10. +6 −8 plugins/dstat_gpfsop.py
View
@@ -1,4 +1,4 @@
-* 0.6.0 - Bettiesbaai - released ../../2005
+* 0.6.0 - Bettiesbaai - released 29/05/2005
- Removed keyboard input prevention patch. (Dbt 304673, Marc Lehmann)
- Fixed bug with: dstat -tit -I 177
- Added ipc stats (--ipc)
@@ -14,26 +14,32 @@
- Added initial values (step=0) for disk, int, page, and sys stats
- Allowed external tools to use the dstat classes
- Added example scripts using the dstat classes (mstat.py and read.py)
-- Allowed external plugins to be plugged in
+- Allowed to interface with external plugins
- Added external acpi plugin dstat_battery
- Added external acpi plugin dstat_cpufreq
- Added external acpi plugin dstat_thermal
- Added external app plugin dstat_postfix
- Added external app plugin dstat_sendmail
+- Added external app plugin dstat_gpfs
+- Added external app plugin dstat_gpfsop
- Added external plugin dstat_dbus
- Added external plugin dstat_freespace
- Added external plugin dstat_utmp
+- Added external plugin dstat_wifi
- Removed user stat (now in external dstat_utmp plugin)
- Smaller fixes and overall improvements
- Improved help output and manpage
- Added README.examples, README.performance and README.plugins
- Added profiling/debuging code (--debug)
- Rewrote cprint/cprintlist logic
-- Get rid of python-curses requirement for SLES9 (although it helps)
-- Fixed dstat_disk24old for newer 2.4 kernels without CONFIG_BLK_STATS support (Susan G. Kleinmann)
-- Improved dstat_disk24 for newer 2.4 kernels with CONFIG_BLK_STATS support (Susan G. Kleinmann)
+- Get rid of python-curses requirement for SLES9 (although it helps to have it)
+- Fixed dstat_disk24old for newer 2.4 kernels without CONFIG_BLK_STATS (Susan G. Kleinmann)
+- Improved dstat_disk24 for newer 2.4 kernels with CONFIG_BLK_STATS (Susan G. Kleinmann)
- Allow for specifying compatible stats on command line (eg. -M disk24,disk24old,page24)
- Make time stat more detailed when --debug is used.
+- Implemented infrastructure to pipe to commands
+- Started collecting different proc-files for debugging
+- Disable headers if less than 6 lines in terminal
* 0.5.10 - released 08/04/2005
- Small fix to restore terminal for all exit paths (Dbt 303526, Modesto Alexandre)
View
36 README
@@ -1,22 +1,30 @@
-Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat
-overcomes some of the limitations and adds some extra features.
+Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat.
+Dstat overcomes some of their limitations and adds some extra features,
+more counters and flexibility. Dstat is handy for monitoring systems
+during performance tuning tests, benchmarks or troubleshooting.
-Dstat allows you to view all of your system resources instantly,
-you can eg. compare disk usage in combination with interrupts from
-your IDE controller, or compare the network bandwidth numbers
-directly with the disk throughput (in the same interval).
+Dstat allows you to view all of your system resources instantly, you
+can eg. compare disk usage in combination with interrupts from your
+IDE controller, or compare the network bandwidth numbers directly
+with the disk throughput (in the same interval).
-Dstat also cleverly gives you the most detailed information in
-columns and clearly indicates in what magnitude and unit the output
-is displayed. Less confusion, less mistakes, more efficient.
+Dstat gives you detailed selective information in columns and clearly
+indicates in what magnitude and unit the output is displayed. Less
+confusion, less mistakes.
Dstat is unique in letting you aggregate block device throughput for
-a certain diskset or network bandwidth for a group of interfaces, ie.
-you can see the throughput for all the block devices that make up a
-single filesystem or storage system.
+a certain diskset or networkset, ie. you can see the throughput for
+all the block devices that make up a single filesystem or storage
+system.
-Dstat allows its data to be directly written to a CSV file to be
-imported and used by OpenOffice, Gnumeric or Excelto create graphs.
+You can write your own dstat plugins to monitor whatever you like in
+just a few minutes based on provided examples and a little bit of
+Python knowledge.
+
+Dstat's output by default is designed for being interpreted by humans
+in real-time, however the new CSV output allows you to store CSV
+output in detail to a file to be imported later into Gnumeric or Excel
+to generate graphs.
Since it's practically impossible to test dstat on every possible
permutation of kernel , python or distribution version, I need your
View
@@ -1,8 +1,8 @@
External dstat plugins
""""""""""""""""""""""
The core functionality of dstat is self-contained inside the dstat script,
-but it is possible to add your own dstat plugins. Currently only the
-following external plugins exist:
+but it is possible to add your own dstat plugins. Currently the following
+external plugins exist:
dstat_battery - battery in percentage (needs ACPI)
dstat_cpufreq - CPU frequency in percentage (needs ACPI)
@@ -14,6 +14,7 @@ following external plugins exist:
dstat_sendmail - sendmail queue size (needs sendmail)
dstat_thermal - system temperature sesnors
dstat_utmp - utmp connections (needs python-utmp)
+ dstat_wifi - wireless link quality and signal to noise ratio
You can enable any of these stats by using the -M options:
@@ -35,7 +36,7 @@ Future possible external plugins:
dstat_gfs
dstat_nfs
dstat_qla2300
- dstat_samba (needs a python tdb implementation)
+ dstat_samba (needs a python tdb implementation ?)
dstat_squid
Please send feedback to: <dag@wieers.com>
View
10 TODO
@@ -11,7 +11,7 @@
### Extending statistics (help welcome!)
+ Add slab plugin (see /proc/slabinfo and slabtop)
+ Add xorg plugin (xdpyinfo, xrestop)
-+ Add icmp, nfs, ntp plugin ?
++ Add icmp and ntp plugin ?
+ Add application plugin (-a or -A pid,cmd)
+ Add user plugin (number of users logged on, utmp is not that useful, /proc/key-users)
+ Look into interfacing with apps (bind, sendmail, postfix, squid, amavisd, laus, samba)
@@ -28,18 +28,18 @@
+ Create document on general system performance tools
(explaining the different uses of tools like dstat, iostat, pmap, strace, tcpdump)
-### General bugs
+### General issues
+ Timer is not as accurate on 2.6 kernel as on 2.4, possibly scheduling differences
+ Python 1.5 prints 'L' for long, crashes when int()
-+ If number of lines on terminal <= 1, division by zero
+ Implement better (?) protection against counter rollovers
+ Plugins currently have to be written in python 1.5 to work for dstat15 (lowest common denominator)
-### Plugin bugs
+### Plugin issues
+ tcp plugin is very slow and generates lots of softirqs (on busy systems), to be confirmed
+ proc plugin (run and blk) does not work on 2.4.24+, to be confirmed
+ proc plugin seem to be off-by-one compared to vmstat (some of the time, this is what I get from /proc/stat)
+ /proc/partitions can have negative numbers, seen on systems with long uptime. dstat handles this except for calculating the very first stat, no work-around possible?
++ gpfs plugin seems to loose pipe with mmpmon after some time, seems to be an mmpmon issue
### Redesign (v2.0)
+ Create modules that can contain samples of different units
@@ -53,5 +53,5 @@
blk_read/sec, blk_wrtn/sec (kB/sec)
+ Design proper object model and namespace for _all_ possible stats
-+ Create a seperate screen-based tool, much like nmon (dstat is line-based)
++ Create a seperate curses-based tool, much like nmon (dstat stays line-based)
+ Create client/server monitoring tool
View
2 dstat
@@ -1669,7 +1669,7 @@ def main():
curwidth = curwidth + o.statwidth() + 1
### Check when to display the header
- if op.header:
+ if op.header and rows >= 6:
if oldvislist != vislist:
showheader = True
elif step == 1 and loop % (rows - 1) == 0:
View
@@ -7,7 +7,7 @@
%{?rh7:%define _with_python15 1}
%{?el2:%define _with_python15 1}
-Summary: Versatile vmstat, iostat and ifstat replacement
+Summary: Versatile resource statistics tool
Name: dstat
Version: 0.6.0
Release: 1
@@ -25,29 +25,33 @@ BuildArch: noarch
Requires: python
%description
-Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat
-overcomes some of the limitations and adds some extra features.
-
-Dstat allows you to view all of your system resources instantly,
-you can eg. compare disk usage in combination with interrupts from
-your IDE controller, or compare the network bandwidth numbers
-directly with the disk throughput (in the same interval).
-
-Dstat also cleverly gives you the most detailed information in
-columns and clearly indicates in what magnitude and unit the output
-is displayed. Less confusion, less mistakes.
-
-Dstat is also unique in letting you aggregate block device throughput
-for a certain diskset or network bandwidth for a group of interfaces,
-ie. you can see the throughput for all the block devices that make up
-a single filesystem or storage system.
-
-You can customize your dstat output from /etc/dstat.conf and you can
-write your own dstat modules to plug into the dstat output.
-
-Dstat's output, in its current form, is not very useful to be post-
-processed by other tools. It's mostly meant for allowing humans to
-interprete real-time data as easy as possible.
+Dstat is a versatile replacement for vmstat, iostat, netstat and ifstat.
+Dstat overcomes some of their limitations and adds some extra features,
+more counters and flexibility. Dstat is handy for monitoring systems
+during performance tuning tests, benchmarks or troubleshooting.
+
+Dstat allows you to view all of your system resources instantly, you
+can eg. compare disk usage in combination with interrupts from your
+IDE controller, or compare the network bandwidth numbers directly
+with the disk throughput (in the same interval).
+
+Dstat gives you detailed selective information in columns and clearly
+indicates in what magnitude and unit the output is displayed. Less
+confusion, less mistakes.
+
+Dstat is unique in letting you aggregate block device throughput for
+a certain diskset or networkset, ie. you can see the throughput for
+all the block devices that make up a single filesystem or storage
+system.
+
+You can write your own dstat plugins to monitor whatever you like in
+just a few minutes based on provided examples and a little bit of
+Python knowledge.
+
+Dstat's output by default is designed for being interpreted by humans
+in real-time, however the new CSV output allows you to store CSV
+output in detail to a file to be imported later into Gnumeric or Excel
+to generate graphs.
%prep
%setup
@@ -72,7 +76,7 @@ interprete real-time data as easy as possible.
%{_datadir}/dstat/
%changelog
-* Sun Apr 24 2005 Dag Wieers <dag@wieers.com> - 0.6.0-1
+* Sun May 29 2005 Dag Wieers <dag@wieers.com> - 0.6.0-1
- Updated to release 0.6.0.
* Fri Apr 08 2005 Dag Wieers <dag@wieers.com> - 0.5.10-1
View
22 dstat15
@@ -1288,7 +1288,7 @@ def ticks():
return time.time() - long(l[1])
def dopen(file):
- "Open a file ones, if already opened, return file descriptor"
+ "Open a file for reuse, if already opened, return file descriptor"
global fds
if not os.path.exists(file): return None
if 'fds' not in globals().keys(): fds = {}
@@ -1306,6 +1306,24 @@ def dclose(file):
fds[file].close()
del(fds[file])
+def dpopen(cmd):
+ "Open a pipe for reuse, if already opened, return pipes"
+ global pipes
+ if 'pipes' not in globals().keys(): pipes = {}
+ if cmd not in pipes.keys():
+ pipes[cmd] = os.popen3('/usr/lpp/mmfs/bin/mmpmon -p', 't', 0)
+ return pipes[cmd]
+
+def readpipe(file, tmout = 0.001):
+ "Read available data from pipe in a non-blocking fasion"
+ ret = ''
+ while not select.select([file.fileno()], [], [], tmout)[0]:
+ pass
+ while select.select([file.fileno()], [], [], tmout)[0]:
+ ret = ret + file.read(1)
+ return string.split(ret, '\n')
+# return ret
+
def dchg(var, max, base):
"Convert decimal to string given base and length"
c = 0
@@ -1654,7 +1672,7 @@ def main():
curwidth = curwidth + o.statwidth() + 1
### Check when to display the header
- if op.header:
+ if op.header and rows >= 6:
if oldvislist != vislist:
showheader = True
elif step == 1 and loop % (rows - 1) == 0:
@@ -22,7 +22,7 @@ def vars(self):
if self.fd:
self.fd.seek(0)
for line in self.fd.readlines():
- l = line.split()
+ l = string.split(line)
if len(l) < 6: continue
if l[2] in ('binfmt_misc', 'devpts', 'iso9660', 'none', 'proc', 'sysfs', 'usbfs'): continue
### FIXME: Excluding 'none' here may not be what people want (/dev/shm)
View
@@ -12,14 +12,13 @@ def __init__(self):
def check(self):
if os.access('/usr/lpp/mmfs/bin/mmpmon', os.X_OK):
try:
- self.stdin, self.stdout, self.stderr = dpopen('/usr/lpp/mmfs/bin/mmpmon -p')
+ self.stdin, self.stdout, self.stderr = dpopen('/usr/lpp/mmfs/bin/mmpmon -p -s')
self.stdin.write('reset\n')
readpipe(self.stdout)
except IOError:
raise Exception, 'Module can not interface with gpfs mmpmon binary'
return True
raise Exception, 'Module needs gpfs mmpmon binary'
- return false
def extract(self):
try:
@@ -30,15 +29,14 @@ def extract(self):
l = line.split()
for name in self.vars:
self.cn2[name] = long(l[l.index(name)+1])
+ for name in self.vars:
+ self.val[name] = (self.cn2[name] - self.cn1[name]) * 1.0 / tick
except IOError, e:
for name in self.vars: self.val[name] = -1
- print 'dstat_gpfs: lost pipe to mmpmon,', e
+# print 'dstat_gpfs: lost pipe to mmpmon,', e
except Exception, e:
for name in self.vars: self.val[name] = -1
- print 'dstat_gpfs: exception', e
-
- for name in self.vars:
- self.val[name] = (self.cn2[name] - self.cn1[name]) * 1.0 / tick
+# print 'dstat_gpfs: exception', e
if step == op.delay:
self.cn1.update(self.cn2)
View
@@ -3,7 +3,7 @@
class dstat_gpfsop(dstat):
def __init__(self):
- self.name = 'gpfs operations'
+ self.name = 'gpfs file operations'
self.format = ('d', 4, 1000)
self.vars = ('_oc_', '_cc_', '_rdc_', '_wc_', '_dir_', '_iu_')
self.nick = ('open', 'clos', 'read', 'writ', 'rdir', 'inod')
@@ -12,14 +12,13 @@ def __init__(self):
def check(self):
if os.access('/usr/lpp/mmfs/bin/mmpmon', os.X_OK):
try:
- self.stdin, self.stdout, self.stderr = dpopen('/usr/lpp/mmfs/bin/mmpmon -p')
+ self.stdin, self.stdout, self.stderr = dpopen('/usr/lpp/mmfs/bin/mmpmon -p -s')
self.stdin.write('reset\n')
readpipe(self.stdout)
except IOError:
raise Exception, 'Module can not interface with gpfs mmpmon binary'
return True
raise Exception, 'Module needs gpfs mmpmon binary'
- return false
def extract(self):
try:
@@ -30,15 +29,14 @@ def extract(self):
l = line.split()
for name in self.vars:
self.cn2[name] = long(l[l.index(name)+1])
+ for name in self.vars:
+ self.val[name] = (self.cn2[name] - self.cn1[name]) * 1.0 / tick
except IOError, e:
for name in self.vars: self.val[name] = -1
- print 'dstat_gpfs: lost pipe to mmpmon,', e
+# print 'dstat_gpfs: lost pipe to mmpmon,', e
except Exception, e:
for name in self.vars: self.val[name] = -1
- print 'dstat_gpfs: exception', e
-
- for name in self.vars:
- self.val[name] = (self.cn2[name] - self.cn1[name]) * 1.0 / tick
+# print 'dstat_gpfs: exception', e
if step == op.delay:
self.cn1.update(self.cn2)

0 comments on commit b25d4cb

Please sign in to comment.