Permalink
Browse files

Prepare 0.6.6 release. Backported to dstat15

  • Loading branch information...
1 parent 74e3e8a commit 1c5d5e3f6787f8a53b831d6e363dbb227aefdd77 @dagwieers committed Apr 28, 2007
Showing with 40 additions and 34 deletions.
  1. +1 −1 ChangeLog
  2. +1 −0 TODO
  3. +2 −3 dstat
  4. +3 −3 dstat.spec
  5. +33 −27 dstat15
View
@@ -1,4 +1,4 @@
-* 0.6.5svn - ... - released 21/04/2007
+* 0.6.6 - Unemployed - released 28/04/2007
- Removed SwapCached from the Cached counter. (Peter Rabbitson)
- Fixed a file descriptor problem on kernel 2.4. (Liviu Daia)
- Install manpage as part of the make install phase. (Scott Baker)
View
1 TODO
@@ -48,6 +48,7 @@ contact me as well. :) Send an email to: Dag Wieers <dag@wieers.com>
+ Python 1.5 prints 'L' for long, crashes when int()
+ Implement better (?) protection against counter rollovers (see mail from Sebastien Prud'homme)
+ Plugins currently have to be written in python 1.5 to work for dstat15 (lowest common denominator)
++ When stdout is suspend (Ctrl-S) you get: IOError: [Errno 4] Interrupted system call
### Plugin issues
+ app plugin: reasonably slow
View
5 dstat
@@ -16,7 +16,7 @@
from __future__ import generators
-VERSION = '0.6.5svn'
+VERSION = '0.6.6'
def inspath(path):
if os.path.isdir(path) and path not in sys.path:
@@ -1760,7 +1760,6 @@ def main():
# print 'Background is unknown, assuming dark.'
### Check terminal capabilities
-
if op.isatty:
op.color = True
try:
@@ -1874,8 +1873,8 @@ def main():
else:
curwidth = 0
+ ### Trim object list to what is visible on screen
if op.isatty:
- ### Trim object list to what is visible on screen
rows, cols = gettermsize()
vislist = []
for o in totlist:
View
@@ -9,7 +9,7 @@
Summary: Versatile resource statistics tool
Name: dstat
-Version: 0.6.5svn
+Version: 0.6.6
Release: 1
License: GPL
Group: System Environment/Base
@@ -60,8 +60,8 @@ confusion, less mistakes.
%{_datadir}/dstat/
%changelog
-* Tue Apr 17 2007 Dag Wieers <dag@wieers.com> - 0.6.5svn-1
-- Updated to release 0.6.5svn.
+* Sat Apr 28 2007 Dag Wieers <dag@wieers.com> - 0.6.6-1
+- Updated to release 0.6.6.
* Tue Apr 17 2007 Dag Wieers <dag@wieers.com> - 0.6.5-1
- Updated to release 0.6.5.
View
60 dstat15
@@ -16,7 +16,7 @@
#from __future__ import generators
-VERSION = '0.6.5svn'
+VERSION = '0.6.6'
def inspath(path):
if os.path.isdir(path) and path not in sys.path:
@@ -75,11 +75,16 @@ class Options:
self.intlist = None
self.netlist = None
self.swaplist = None
- self.nolimit = False
- self.color = True
+ self.color = False
self.update = True
self.header = True
self.output = False
+ self.isatty = sys.stdout.isatty()
+
+ ### Implicit if no terminal is used
+ if not self.isatty:
+ self.update = False
+ self.header = False
### Temporary hardcoded for my own project
self.diskset = {
@@ -1735,16 +1740,14 @@ def main():
rows, cols = gettermsize()
### Write term-title
- term = os.environ['TERM']
- if term and re.compile('(screen*|xterm*)').match(term):
- sys.stdout.write('\033]0;(%s@%s) %s %s\007' % (user, hostname, os.path.basename(sys.argv[0]), string.join(op.args, ' ')))
+ if op.isatty:
+ term = os.environ['TERM']
+ if term and re.compile('(screen*|xterm*)').match(term):
+ sys.stdout.write('\033]0;(%s@%s) %s %s\007' % (user, hostname, os.path.basename(sys.argv[0]), string.join(op.args, ' ')))
### Check terminal capabilities
- if not sys.stdout.isatty():
- op.color = False
- op.nolimit = True
- op.update = False
- else:
+ if op.isatty:
+ op.color = True
try:
import curses
curses.setupterm()
@@ -1857,22 +1860,25 @@ def main():
curwidth = 0
### Trim object list to what is visible on screen
- rows, cols = gettermsize()
- vislist = []
- for o in totlist:
- newwidth = curwidth + o.statwidth() + 1
- if newwidth <= cols or ( vislist == totlist[:-1] and newwidth < cols ):
- vislist.append(o)
- curwidth = newwidth
-
- ### Check when to display the header
- if op.header and rows >= 6:
- if oldvislist != vislist:
- showheader = True
- elif step == 1 and loop % (rows - 1) == 0:
- showheader = True
-
- oldvislist = vislist
+ if op.isatty:
+ rows, cols = gettermsize()
+ vislist = []
+ for o in totlist:
+ newwidth = curwidth + o.statwidth() + 1
+ if newwidth <= cols or ( vislist == totlist[:-1] and newwidth < cols ):
+ vislist.append(o)
+ curwidth = newwidth
+
+ ### Check when to display the header
+ if op.header and rows >= 6:
+ if oldvislist != vislist:
+ showheader = True
+ elif step == 1 and loop % (rows - 1) == 0:
+ showheader = True
+
+ oldvislist = vislist
+ else:
+ vislist = totlist
if showheader:
if loop == 0 and totlist != vislist:

0 comments on commit 1c5d5e3

Please sign in to comment.