[svn] r9739 - in /trunk/tools/dstat: TODO dstat

Dag Wieers dag at wieers.com
Fri Mar 4 17:18:05 CET 2011


Author: dag
Date: Fri Mar  4 16:18:05 2011
New Revision: 9739

URL: http://svn.rpmforge.net/viewvc/rpmforge?rev=9739&view=rev
Log:
Allow more variables (self.vars) than nicknames (self.nick) to simplify plugins

Modified:
    trunk/tools/dstat/TODO
    trunk/tools/dstat/dstat

Modified: trunk/tools/dstat/TODO
URL: http://svn.rpmforge.net/viewvc/rpmforge/trunk/tools/dstat/TODO?rev=9739&r1=9738&r2=9739&view=diff
==============================================================================
--- trunk/tools/dstat/TODO (original)
+++ trunk/tools/dstat/TODO Fri Mar  4 16:18:05 2011
@@ -62,13 +62,16 @@
 + Allow to have multiple '1st expensive ... app' and '2nd expensive ... app'
 + Add 'most iowaiting app' plugin
 + Add systemtap/perf integration
++ Add dropwatch statistics
 
 ### Plugin issues
 + plugins that use /proc/pid/stats are reasonably slow (implement in C might help)
 + disk plugin: /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?
 + proc plugin: (run and blk) does not work on 2.4.24+ (to be confirmed ?)
-+ swap plugin: (new one) is slower than swapold
 + tcp plugin: is very slow and generates lots of softirqs (on busy systems), to be confirmed
+
+### Redesign (v1.0)
++ Create a nicer interface for plugins (with meaningful names, eg. not nick)
 
 ### Redesign (v2.0)
 + Create modules that can contain samples of different units

Modified: trunk/tools/dstat/dstat
URL: http://svn.rpmforge.net/viewvc/rpmforge/trunk/tools/dstat/dstat?rev=9739&r1=9738&r2=9739&view=diff
==============================================================================
--- trunk/tools/dstat/dstat (original)
+++ trunk/tools/dstat/dstat Fri Mar  4 16:18:05 2011
@@ -509,12 +509,12 @@
         if hasattr(self, 'output'):
             return cprint(self.output, self.type, self.width, self.scale)
         for i, name in enumerate(self.vars):
-            ### Make sure we don't show more values than we have nicknames
-            if i >= len(self.nick): break
             if isinstance(self.val[name], types.TupleType) or isinstance(self.val[name], types.ListType):
                 line = line + cprintlist(self.val[name], self.type, self.width, self.scale)
                 sep = theme['frame'] + char['colon']
             else:
+                ### Make sure we don't show more values than we have nicknames
+                if i >= len(self.nick): break
                 line = line + cprint(self.val[name], self.type, self.width, self.scale)
                 sep = char['space']
             if i + 1 != len(self.vars):




More information about the commits mailing list