Permalink
Browse files

See ChangeLog.

  • Loading branch information...
1 parent 466db68 commit 4b398d5df19ebc68b68583d5cb6127560513031b @dagwieers committed Aug 20, 2008
Showing with 29 additions and 61 deletions.
  1. +2 −1 ChangeLog
  2. +3 −3 docs/dstat.1
  3. +15 −4 dstat
  4. +3 −3 dstat.spec
  5. +1 −1 dstat15
  6. +1 −9 plugins/dstat_topbio.py
  7. +1 −11 plugins/dstat_topcpu.py
  8. +1 −7 plugins/dstat_topio.py
  9. +1 −11 plugins/dstat_topmem.py
  10. +1 −11 plugins/dstat_topoom.py
View
3 ChangeLog
@@ -1,4 +1,4 @@
-* 0.6.7svn - ... - release 17/04/2008
+* 0.6.8 - Buenos Aires - release 17/08/2008
- Added improved tick patch (Kelly Long)
- Show milliseconds in dstat_time when using --debug cfr. dstat_epoch
- Difference in integer rounding should not affect colouring
@@ -16,6 +16,7 @@
- Fixed typo in dstat_topio and dstat_topbio when using CSV output (Bharvani Toshaan)
- Added external dstat_net_packets plugin to show the number of packets per interface
- Default to 25/80 when terminal height/width is set to zero, eg. XEmacs shell (Jeff Mincy)
+- Removed complex process name since /proc/pid/cmdline behaves different on new kernels (Adrian Alves)
* 0.6.7 - Cambridge overdue - released 26/02/2008
- Only rewrite xterm title when XTERM_SHELL is set to bash
View
6 docs/dstat.1
@@ -2,7 +2,7 @@
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
-.TH "DSTAT" "1" "02/26/2008" "" ""
+.TH "DSTAT" "1" "08/17/2008" "" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
@@ -178,7 +178,7 @@ Using dstat to relate cpu stats with interrupts per device:
dstat \-tcyif
.fi
.SH "BUGS"
-Since it's practically impossible to test dstat on every possible permutation of kernel, python or distribution version, I need your help and your feedback to fix the remaining problems. If you have improvements or bugreports, please send them to: [1]\&\fIdag@wieers.com\fR
+Since it is practically impossible to test dstat on every possible permutation of kernel, python or distribution version, I need your help and your feedback to fix the remaining problems. If you have improvements or bugreports, please send them to: [1]\&\fIdag@wieers.com\fR
.sp
.sp
.it 1 an-trap
@@ -209,7 +209,7 @@ ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(1), nfsstat(1), nstat, vmstat
.SS "Debugging tools"
.sp
.nf
-htop, lslk(1), lsof(8), top(1)
+htop(1), lslk(1), lsof(8), top(1)
.fi
.SS "Process tracing"
.sp
View
19 dstat
@@ -16,7 +16,7 @@
from __future__ import generators
-VERSION = '0.6.7svn'
+VERSION = '0.6.8'
def inspath(path):
if os.path.isdir(path) and path not in sys.path:
@@ -1662,7 +1662,8 @@ def gettermsize():
"Return the dynamic terminal geometry"
global termsize
- if not termsize[0] and not termsize[1]:
+# if not termsize[0] and not termsize[1]:
+ if not termsize[0]:
try:
if termsize[1] == 1:
s = struct.pack('HHHH', 0, 0, 0, 0)
@@ -1675,8 +1676,6 @@ def gettermsize():
termsize = (int(os.environ['LINES']), int(os.environ['COLUMNS']))
except:
termsize = 25, 80
- else:
- termsize = 25, 80
return termsize
def gettermcolor(color=True):
@@ -1778,6 +1777,18 @@ def readfile(file):
ret = ret + line
return ret
+#cdef extern from "sched.h":
+# struct sched_param:
+# int sched_priority
+# int sched_setscheduler(int pid, int policy,sched_param *p)
+#
+#SCHED_FIFO = 1
+#
+#def switchRTCPriority(nb):
+# cdef sched_param sp
+# sp.sched_priority = nb
+# sched_setscheduler (0,SCHED_FIFO , &sp);
+
def exit(ret):
sys.stdout.write(ansi['reset'])
sys.exit(ret)
View
6 dstat.spec
@@ -9,7 +9,7 @@
Summary: Versatile resource statistics tool
Name: dstat
-Version: 0.6.7svn
+Version: 0.6.8
Release: 1
License: GPL
Group: System Environment/Base
@@ -60,8 +60,8 @@ confusion, less mistakes.
%{_datadir}/dstat/
%changelog
-* Sun Mar 16 2008 Dag Wieers <dag@wieers.com> - 0.6.7svn-1
-- Updated to release 0.6.7svn.
+* Sun Aug 17 2008 Dag Wieers <dag@wieers.com> - 0.6.8-1
+- Updated to release 0.6.8.
* Tue Feb 26 2008 Dag Wieers <dag@wieers.com> - 0.6.7-1
- Updated to release 0.6.7.
View
2 dstat15
@@ -16,7 +16,7 @@
#from __future__ import generators
-VERSION = '0.6.7svn'
+VERSION = '0.6.8'
def inspath(path):
if os.path.isdir(path) and path not in sys.path:
View
10 plugins/dstat_topbio.py
@@ -67,15 +67,7 @@ def extract(self):
if self.val['usage'] == 0.0:
self.val['process'] = ''
else:
- ### If the name is a known interpreter, take the second argument from the cmdline
- if self.val['name'] in ('bash', 'csh', 'ksh', 'perl', 'python', 'sh'):
- ### Using dopen() will cause too many open files
-# l = string.split(dopen('/proc/%s/cmdline' % self.val['pid']).read(), '\0')
- l = string.split(open('/proc/%s/cmdline' % self.val['pid']).read(), '\0')
- if len(l) > 2:
- self.val['process'] = os.path.basename(l[1])
- else:
- self.val['process'] = self.val['name']
+ self.val['process'] = self.val['name']
### Debug (show PID)
# self.val['process'] = '%*s %-*s' % (5, self.val['pid'], self.format[1]-6, self.val['name'])
View
12 plugins/dstat_topcpu.py
@@ -42,17 +42,11 @@ def extract(self):
### Extract name
name = l[1][1:-1]
- ### Get commandline
- m = string.split(open('/proc/%s/cmdline' % pid).read(), '\0')
- if len(m) > 1:
- cmd = os.path.basename(m[1])
-
except ValueError:
continue
except IOError:
continue
- self.val['cmd'] = cmd
self.val['max'] = usage
self.val['name'] = name
self.val['pid'] = pid
@@ -69,11 +63,7 @@ def extract(self):
if self.val['max'] == 0.0:
self.val['process'] = ''
else:
- ### If the name is a known interpreter, take the second argument from the cmdline
- if self.val['name'] in ('bash', 'csh', 'ksh', 'perl', 'python', 'sh'):
- self.val['process'] = self.val['cmd']
- else:
- self.val['process'] = self.val['name']
+ self.val['process'] = self.val['name']
# l = l.reverse()
# for x in l:
View
8 plugins/dstat_topio.py
@@ -69,13 +69,7 @@ def extract(self):
if self.val['usage'] == 0.0:
self.val['process'] = ''
else:
- ### If the name is a known interpreter, take the second argument from the cmdline
- if self.val['name'] in ('bash', 'csh', 'ksh', 'perl', 'python', 'sh'):
- ### Using dopen() will cause too many open files
- l = string.split(open('/proc/%s/cmdline' % self.val['pid']).read(), '\0')
- self.val['process'] = os.path.basename(l[len(l)-1])
- else:
- self.val['process'] = self.val['name']
+ self.val['process'] = self.val['name']
### Debug (show PID)
# self.val['process'] = '%*s %-*s' % (5, self.val['pid'], self.format[1]-6, self.val['name'])
View
12 plugins/dstat_topmem.py
@@ -36,29 +36,19 @@ def extract(self):
### Extract name
name = l[1][1:-1]
- ### Get commandline
- m = string.split(open('/proc/%s/cmdline' % pid).read(), '\0')
- if len(m) > 1:
- cmd = os.path.basename(m[1])
-
except ValueError:
continue
except IOError:
continue
- self.val['cmd'] = cmd
self.val['max'] = usage
self.val['name'] = name
self.val['pid'] = pid
if self.val['max'] == 0.0:
self.val['process'] = ''
else:
- ### If the name is a known interpreter, take the second argument from the cmdline
- if self.val['name'] in ('bash', 'csh', 'ksh', 'perl', 'python', 'sh'):
- self.val['process'] = self.val['cmd']
- else:
- self.val['process'] = self.val['name']
+ self.val['process'] = self.val['name']
# l = l.reverse()
# for x in l:
View
12 plugins/dstat_topoom.py
@@ -42,29 +42,19 @@ def extract(self):
l = string.split(open('/proc/%s/stat' % pid).read())
name = l[1][1:-1]
- ### Get commandline
- m = string.split(open('/proc/%s/cmdline' % pid).read(), '\0')
- if len(m) > 1:
- cmd = os.path.basename(m[1])
-
except ValueError:
continue
except IOError:
continue
- self.val['cmd'] = cmd
self.val['max'] = oom_score
self.val['name'] = name
self.val['pid'] = pid
if self.val['max'] == 0.0:
self.val['process'] = ''
else:
- ### If the name is a known interpreter, take the second argument from the cmdline
- if self.val['name'] in ('bash', 'csh', 'ksh', 'perl', 'python', 'sh'):
- self.val['process'] = self.val['cmd']
- else:
- self.val['process'] = self.val['name']
+ self.val['process'] = self.val['name']
### Debug (show PID)
# self.val['process'] = '%*s %-*s' % (5, self.val['pid'], self.format[1]-6, self.val['name'])

0 comments on commit 4b398d5

Please sign in to comment.