[svn] r6176 - in trunk/tools/dstat: . docs

packagers at lists.rpmforge.net packagers at lists.rpmforge.net
Tue Feb 26 01:52:34 CET 2008


Author: dag
Date: 2008-02-26 00:52:33 +0000 (Tue, 26 Feb 2008)
New Revision: 6176

Modified:
   trunk/tools/dstat/ChangeLog
   trunk/tools/dstat/docs/dstat.1.txt
   trunk/tools/dstat/dstat15
Log:
Last minute changes for python 1.5.

Modified: trunk/tools/dstat/ChangeLog
===================================================================
--- trunk/tools/dstat/ChangeLog	2008-02-26 00:25:29 UTC (rev 6175)
+++ trunk/tools/dstat/ChangeLog	2008-02-26 00:52:33 UTC (rev 6176)
@@ -19,6 +19,7 @@
 - Reinstated the use of -D md0 which got lost (Peter Rabbitson)
 - Improvement to cpufreq module for SMP systems (Bert de Bruijn)
 - Added VMware ESX dstat_vmknic plugin (Bert de Bruijn)
+- Added infrastructure to allow C plugins
 
 * 0.6.6 - Unemployed - released 28/04/2007
 - Removed SwapCached from the Cached counter (Dbt 418326, Peter Rabbitson)

Modified: trunk/tools/dstat/docs/dstat.1.txt
===================================================================
--- trunk/tools/dstat/docs/dstat.1.txt	2008-02-26 00:25:29 UTC (rev 6175)
+++ trunk/tools/dstat/docs/dstat.1.txt	2008-02-26 00:52:33 UTC (rev 6176)
@@ -40,76 +40,76 @@
 
 == OPTIONS
 -c, --cpu::
-	enable cpu stats
+    enable cpu stats
 
 -C 0,3,total::
-	include cpu0, cpu3 and total
+    include cpu0, cpu3 and total
 
 -d, --disk::
-	enable disk stats
+    enable disk stats
 
 -D total,hda::
-	include hda and total
+    include hda and total
 
 -g, --page::
-	enable page stats
+    enable page stats
 
 -i, --int::
-	enable interrupt stats
+    enable interrupt stats
 
 -I 5,10::
-	include interrupt 5 and 10
+    include interrupt 5 and 10
 
 -l, --load::
-	enable load stats
+    enable load stats
 
 -m, --mem::
-	enable memory stats
+    enable memory stats
 
 -n, --net::
-	enable network stats
+    enable network stats
 
 -N eth1,total::
-	include eth1 and total
+    include eth1 and total
 
 -p, --proc::
-	enable process stats
+    enable process stats
 
 -s, --swap::
-	enable swap stats
+    enable swap stats
 
 -S swap1,total::
-	include swap1 and total
+    include swap1 and total
 
 -t, --time::
-	enable time/date output
+    enable time/date output
 
 -T, --epoch::
-	enable time counter (seconds since epoch)
+    enable time counter (seconds since epoch)
 
 -y, --sys::
-	enable system stats
+    enable system stats
 
 --ipc::
-	enable ipc stats
+    enable ipc stats
 
 --lock::
-	enable lock stats
+    enable lock stats
 
 --raw::
-	enable raw stats
+    enable raw stats
 
 --tcp::
-	enable tcp stats
+    enable tcp stats
 
 --udp::
-	enable udp stats
+    enable udp stats
 
 --unix::
-	enable unix stats
+    enable unix stats
 
 -M stat1,stat2::
-	enable internal stats and external plugin stats
+    enable internal stats and external plugin stats
 
 Possible internal stats are::
   cpu, cpu24, disk, disk24, disk24old, epoch, int, int24, ipc, load, lock, mem,
@@ -119,28 +119,28 @@
   dstat -M list
 
 -a, --all::
-	equals -cdngy (default)
+    equals -cdngy (default)
 
 -f, --full::
-	expand -C, -D, -I, -N and -S discovery lists
+    expand -C, -D, -I, -N and -S discovery lists
 
 -v, --vmstat::
-	equals -pmgdsc -D total
+    equals -pmgdsc -D total
 
 --integer::
-	show integer values
+    show integer values
 
 --nocolor::
-	disable colors (implies --noupdate)
+    disable colors (implies --noupdate)
 
 --noheaders::
-	disable repetitive headers
+    disable repetitive headers
 
 --noupdate::
-	disable intermediate updates when delay > 1
+    disable intermediate updates when delay > 1
 
 --output file::
-	write CSV output to file
+    write CSV output to file
 
 
 == ARGUMENTS
@@ -203,45 +203,45 @@
 == FILES
 Paths that may contain external dstat_* plugins:
 
-	~/.dstat/
-	./
-	./plugins/
-	(path of binary)/plugins/
-	/usr/share/dstat/
-	/usr/local/share/dstat/
+    ~/.dstat/
+    ./
+    ./plugins/
+    (path of binary)/plugins/
+    /usr/share/dstat/
+    /usr/local/share/dstat/
 
 
 == SEE ALSO
 
 === Performance tools
-	ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(1), nfsstat(1), nstat, vmstat(1), xosview(1)
+    ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(1), nfsstat(1), nstat, vmstat(1), xosview(1)
 
 === Debugging tools
-	htop, lslk(1), lsof(8), top(1)
+    htop, lslk(1), lsof(8), top(1)
 
 === Process tracing
-	ltrace(1), pmap(1), ps(1), pstack(1), strace(1)
+    ltrace(1), pmap(1), ps(1), pstack(1), strace(1)
 
 === Binary debugging
-	ldd(1), file(1), nm(1), objdump(1), readelf(1)
+    ldd(1), file(1), nm(1), objdump(1), readelf(1)
 
 === Memory usage tools
-	free(1), memusage, memusagestat, slabtop(1)
+    free(1), memusage, memusagestat, slabtop(1)
 
 === Accounting tools
-	dump-acct, dump-utmp, sa(8)
+    dump-acct, dump-utmp, sa(8)
 
 === Hardware debugging tools
-	dmidecode, ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), smartctl(8), x86info(1)
+    dmidecode, ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), smartctl(8), x86info(1)
 
 === Application debugging
-	mailstats(8), qshape(1)
+    mailstats(8), qshape(1)
 
 === Xorg related tools
-	xdpyinfo(1), xrestop(1)
+    xdpyinfo(1), xrestop(1)
 
 === Other useful info
-	proc(5)
+    proc(5)
 
 
 == AUTHOR

Modified: trunk/tools/dstat/dstat15
===================================================================
--- trunk/tools/dstat/dstat15	2008-02-26 00:25:29 UTC (rev 6175)
+++ trunk/tools/dstat/dstat15	2008-02-26 00:52:33 UTC (rev 6176)
@@ -211,7 +211,7 @@
         color = ""
         if not gettermcolor(self.color):
             color = "no "
-        print 'Terminal type: %s (%scolor support)' % (os.getenv('TERM'), color)
+        print 'Terminal type: %s (%scolor support)' % (getenv('TERM'), color)
         rows, cols = gettermsize()
         print 'Terminal size: %d lines, %d columns' % (rows, cols)
         print
@@ -1610,6 +1610,11 @@
     info(0, str)
     exit(ret)
 
+def getenv(key):
+    if os.environ.has_key(key):
+        return os.environ[key]
+    return None
+
 def initterm():
     "Initialise terminal"
     global termsize
@@ -1648,7 +1653,7 @@
                 curses.setupterm()
                 return curses.tigetnum('lines'), curses.tigetnum('cols')
             else:
-                termsize = (int(os.environ['LINES']), int(os.environ['COLUMNS']))
+                termsize = (int(getenv('LINES')), int(getenv('COLUMNS')))
         except:
             termsize = 25, 80
     return termsize
@@ -1798,8 +1803,8 @@
 
     ### Write term-title
     if sys.stdout.isatty():
-        shell = os.getenv('XTERM_SHELL')
-        term = os.getenv('TERM')
+        shell = getenv('XTERM_SHELL')
+        term = getenv('TERM')
         if shell == '/bin/bash' and 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, ' ')))
 



More information about the svn-commits mailing list