[svn] r5919 - in trunk/tools/dstat: . plugins
packagers at lists.rpmforge.net
packagers at lists.rpmforge.net
Sun Oct 14 23:10:55 CEST 2007
Author: dag
Date: 2007-10-14 23:10:54 +0200 (Sun, 14 Oct 2007)
New Revision: 5919
Modified:
trunk/tools/dstat/ChangeLog
trunk/tools/dstat/plugins/dstat_topoom.py
Log:
Updates
Modified: trunk/tools/dstat/ChangeLog
===================================================================
--- trunk/tools/dstat/ChangeLog 2007-10-14 12:36:51 UTC (rev 5918)
+++ trunk/tools/dstat/ChangeLog 2007-10-14 21:10:54 UTC (rev 5919)
@@ -14,6 +14,7 @@
- Added external dstat_mysql_* and dstat_innodb_* plugins
- Added greppipe() and matchpipe() to improve performance on pipe-handling
- Added external dstat_topio and dstat_topbio plugins
+- Added external dstat_topoom plugin to show top out-of-memory score
* 0.6.6 - Unemployed - released 28/04/2007
- Removed SwapCached from the Cached counter (Dbt 418326, Peter Rabbitson)
Modified: trunk/tools/dstat/plugins/dstat_topoom.py
===================================================================
--- trunk/tools/dstat/plugins/dstat_topoom.py 2007-10-14 12:36:51 UTC (rev 5918)
+++ trunk/tools/dstat/plugins/dstat_topoom.py 2007-10-14 21:10:54 UTC (rev 5919)
@@ -8,16 +8,16 @@
class dstat_topoom(dstat):
def __init__(self):
- self.name = 'kill score'
+ self.name = 'out of memory'
self.format = ('s', 20, 34)
- self.nick = ('oom process',)
+ self.nick = ('kill score',)
self.vars = self.nick
self.pid = str(os.getpid())
self.cn1 = {}; self.cn2 = {}; self.val = {}
def check(self):
if not os.access('/proc/1/oom_score', os.R_OK):
- raise Exception, 'Kernel does not support /proc/pid/oom_score interface.'
+ raise Exception, 'Kernel does not support /proc/pid/oom_score, use at least 2.6.20.'
return True
def extract(self):
@@ -92,7 +92,7 @@
if self.val['max'] == 0.0:
return '%-*s' % (self.format[1], '')
else:
- return '%s%-*s%s' % (ansi['default'], self.format[1]-6, self.val['process'][0:self.format[1]-6], cprint(self.val['max'], ('p', 6, 34)))
+ return '%s%-*s%s' % (ansi['default'], self.format[1]-4, self.val['process'][0:self.format[1]-4], cprint(self.val['max'], ('f', 4, 1000)))
def showcsv(self):
return '%s / %d%%' % (self.val['name'], self.val['max'])
More information about the svn-commits
mailing list