Skip to content
Browse files

Released 0.5.4

  • Loading branch information...
1 parent b33300e commit c19115b67987ed8b5fb4e00d2028bbdf435c3a81 @dagwieers committed Nov 25, 2004
Showing with 50 additions and 15 deletions.
  1. +1 −0 ChangeLog
  2. +12 −0 TESTS
  3. +2 −2 dstat
  4. +11 −1 dstat.1
  5. +2 −2 dstat.spec
  6. +22 −10 dstat15
View
1 ChangeLog
@@ -3,6 +3,7 @@
- Fixed a problem with count
- Improved the logic for displaying repetitive headers
- Now --nocolor implies --noupdate (since it implies no ANSI escape sequences)
+- Removed the 'Exiting on user request' message
* 0.5.3
- Added -M or --mods option to allow modules
View
12 TESTS
@@ -0,0 +1,12 @@
+TESTED environments
+"""""""""""""""""""
+Dist Kernel Python
+"""" """""" """"""
+Conectiva 10 2.6.9 2.3.4
+Fedora Core 3 2.6.8-1.521 2.3.4-11
+Fedora Core 2 2.6.7-1.494 2.3.3-6
+Red Hat EL3 U3 2.4.21-20 2.2.3-5
+Debian 3.0 2.4.26 2.1.3
+Red Hat 7.1 2.4.18-17.7.x 1.5.2
+Red Hat 7.1 2.4.12-ac3 1.5.2
+Red Hat 7.1 2.4.9-31 1.5.2
View
4 dstat
@@ -165,7 +165,7 @@ Dstat options:
-f, --full expand -D, -I and -N disovery lists
--integer show integer values
- --nocolor disable colors
+ --nocolor disable colors (implies --noupdate)
--noheader disable repetitive headers
--noupdate disable intermediate updates when delay > 1
'''
@@ -1103,7 +1103,7 @@ def main():
else:
sys.stdout.write(ansi['restore'] + ansi['clearline'])
- loop = (update + op.delay - 1) / op.delay
+ loop = (update + op.delay - 1) / op.delay
step = ((update - 1) % op.delay) + 1
### Unbuffered sys.stdout
View
12 dstat.1
@@ -51,17 +51,27 @@ enable time counter
\fB\-y\fR, \fB\-\-sys\fR
enable system stats
.TP
+\fB\-M\fR stat1,stat2
+enable specific stats
+
+Possible stats are:
+ cpu, disk, page, int, load, mem, net, proc,
+ swap, sys, tcp, time, udp
+.TP
\fB\-a\fR, \fB\-\-all\fR
equals \fB\-cdngyl\fR
.TP
\fB\-v\fR, \fB\-\-vmstat\fR
equals \fB\-pmgdsc\fR \fB\-D\fR total
.TP
+\fB\-f\fR, \fB\-\-full\fR
+expand -D, -I and -N disovery lists
+.TP
\fB\-\-integer\fR
show integer values
.TP
\fB\-\-nocolor\fR
-disable colors
+disable colors (implies --noupdate)
.TP
\fB\-\-noheader\fR
disable repetitive headers
View
4 dstat.spec
@@ -58,14 +58,14 @@ interprete real-time data as easy as possible.
%files
%defattr(-, root, root, 0755)
-%doc AUTHORS ChangeLog COPYING README TODO
+%doc AUTHORS ChangeLog COPYING README* TESTS TODO
#%doc *.conf
%doc %{_mandir}/man1/dstat.1*
#%config(noreplace) %{_sysconfdir}/dstat.conf
%{_bindir}/dstat
%changelog
-* Mon Nov 22 2004 Dag Wieers <dag@wieers.com> - 0.5.4-1
+* Thu Nov 25 2004 Dag Wieers <dag@wieers.com> - 0.5.4-1
- Updated to release 0.5.4.
* Sun Nov 21 2004 Dag Wieers <dag@wieers.com> - 0.5.3-1
View
32 dstat15
@@ -38,7 +38,7 @@ class Options:
self.header = True
try:
- opts, args = getopt.getopt (args, 'acdghilmnpstvyD:I:M:N:',
+ opts, args = getopt.getopt (args, 'acdfghilmnpstvyD:I:M:N:',
['all', 'cpu', 'disk', 'help', 'int', 'load', 'mem', 'net', 'page',
'proc', 'swap', 'sys', 'tcp', 'time', 'udp', 'version', 'vmstat',
'full', 'integer', 'mods', 'modules', 'nocolor', 'noheader', 'noupdate'])
@@ -90,12 +90,13 @@ class Options:
self.modlist = self.modlist + [ 'proc', 'mem', 'page', 'disk', 'sys', 'cpu' ]
self.disklist = ('total',)
- elif opt in ['--full']:
+ elif opt in ['-f', '--full']:
self.full = True
elif opt in ['--integer']:
self.integer = True
elif opt in ['--nocolor']:
self.color = False
+ self.update = False
elif opt in ['--noheader']:
self.header = False
elif opt in ['--noupdate']:
@@ -162,9 +163,9 @@ Dstat options:
-a, --all equals -cdngyl
-v, --vmstat equals -pmgdsc -D total
- --full expand -D, -I and -N disovery lists
+ -f, --full expand -D, -I and -N disovery lists
--integer show integer values
- --nocolor disable colors
+ --nocolor disable colors (implies --noupdate)
--noheader disable repetitive headers
--noupdate disable intermediate updates when delay > 1
'''
@@ -1027,6 +1028,9 @@ def main():
signal.signal(signal.SIGALRM, signaler)
signal.alarm(interval)
+ ### Always show header the first time
+ showheader = True
+
### Let the games begin
while update <= op.delay * op.count or op.count == -1:
@@ -1040,7 +1044,14 @@ def main():
plist.append(o)
### Check when to display the header
- if oldplist != plist or (loop == 0 or op.header) and step == op.delay and loop % (rows - 1) == 0:
+ if op.header:
+ if oldplist != plist:
+ showheader = True
+ elif step == 1 and loop % (rows - 1) == 0:
+ showheader = True
+
+ if showheader:
+ showheader = False
for o in plist:
sys.stdout.write(o.title1)
if o != plist[-1]:
@@ -1059,7 +1070,7 @@ def main():
oldplist = plist
- ### Prepare the colors for intermediate updates, last step in a loop is normal
+ ### Prepare the colors for intermediate updates, last step in a loop is definitive
if step == op.delay:
ansi['default'] = ansi['reset']
else:
@@ -1092,7 +1103,8 @@ def main():
else:
sys.stdout.write(ansi['restore'] + ansi['clearline'])
- loop = update / op.delay
+ loop = (update + op.delay - 1) / op.delay
+# loop = update / op.delay
step = ((update - 1) % op.delay) + 1
### Unbuffered sys.stdout
@@ -1122,15 +1134,15 @@ if __name__ == '__main__':
main()
except KeyboardInterrupt, e:
signal.signal(signal.SIGALRM, signal.SIG_DFL)
- print
- print ansi['reset'] + 'Exiting on user request'
- sys.exit(6)
+ print ansi['reset']
except OSError, e:
signal.signal(signal.SIGALRM, signal.SIG_DFL)
# print e.errno
print
print ansi['reset'] + 'OSError: %s' %e
sys.exit(7)
+sys.exit(0)
+
# vim:ts=4:sw=4

0 comments on commit c19115b

Please sign in to comment.
Something went wrong with that request. Please try again.