rpms/dstat/F-8 dstat-0.6.6-manfix.patch, NONE, 1.1 dstat-0.6.6-nocolor.patch, NONE, 1.1 dstat-0.6.6-raw.patch, NONE, 1.1 dstat.spec, 1.5, 1.6
Radek Brich (rbrich)
fedora-extras-commits at redhat.com
Mon Jan 21 13:15:23 UTC 2008
Author: rbrich
Update of /cvs/extras/rpms/dstat/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4147
Modified Files:
dstat.spec
Added Files:
dstat-0.6.6-manfix.patch dstat-0.6.6-nocolor.patch
dstat-0.6.6-raw.patch
Log Message:
fix --nocolor and --raw, fix man page
dstat-0.6.6-manfix.patch:
--- NEW FILE dstat-0.6.6-manfix.patch ---
diff -up dstat-0.6.6/docs/dstat.1.manfix dstat-0.6.6/docs/dstat.1
--- dstat-0.6.6/docs/dstat.1.manfix 2007-04-28 10:31:12.000000000 +0200
+++ dstat-0.6.6/docs/dstat.1 2008-01-17 11:14:36.000000000 +0100
@@ -72,7 +72,7 @@ enable process stats
\-s, \-\-swap
enable swap stats
.TP
-\-S swal1,total
+\-S swap1,total
include swap1 and total
.TP
\-t, \-\-time
@@ -151,7 +151,7 @@ So in case you specified a delay of 10,
Using dstat to relate disk\-throughput with network\-usage (eth0), total CPU\-usage and system counters:
.sp
.nf
-dstat \-dnyc \-n eth0 \-C total \-f 5
+dstat \-dnyc \-N eth0 \-C total \-f 5
.fi
.TP
Checking dstat's behaviour and the system's impact on dstat:
@@ -160,10 +160,16 @@ Checking dstat's behaviour and the syste
dstat \-taf \-\-debug
.fi
.TP
-Using the external clock and app plugins together with normal system resources:
+Using the external app plugin together with time and normal system resources:
.sp
.nf
-dstat \-M clock,app \-cndylp
+dstat \-tcndylp \-M app
+.fi
+.TP
+This is identical to:
+.sp
+.nf
+dstat \-M time,cpu,net,disk,sys,load,proc,app
.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 at wieers.com\fR
diff -up dstat-0.6.6/docs/dstat.1.txt.manfix dstat-0.6.6/docs/dstat.1.txt
--- dstat-0.6.6/docs/dstat.1.txt.manfix 2006-12-12 17:13:24.000000000 +0100
+++ dstat-0.6.6/docs/dstat.1.txt 2008-01-17 11:14:46.000000000 +0100
@@ -83,7 +83,7 @@ OPTIONS
-s, --swap::
enable swap stats
--S swal1,total::
+-S swap1,total::
include swap1 and total
-t, --time::
@@ -174,7 +174,7 @@ USAGE
-----
Using dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:::
.....
-dstat -dnyc -n eth0 -C total -f 5
+dstat -dnyc -N eth0 -C total -f 5
.....
Checking dstat's behaviour and the system's impact on dstat:::
@@ -182,9 +182,13 @@ Checking dstat's behaviour and the syste
dstat -taf --debug
.....
-Using the external clock and app plugins together with normal system resources:::
+Using the external app plugin together with time and normal system resources:::
....
-dstat -M clock,app -cndylp
+dstat -tcndylp -M app
+....
+This is identical to:
+....
+dstat -M time,cpu,net,disk,sys,load,proc,app
....
diff -up dstat-0.6.6/docs/dstat.1.html.manfix dstat-0.6.6/docs/dstat.1.html
--- dstat-0.6.6/docs/dstat.1.html.manfix 2007-04-28 10:31:14.000000000 +0200
+++ dstat-0.6.6/docs/dstat.1.html 2008-01-17 11:09:04.000000000 +0100
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.1.0" />
+<meta name="generator" content="AsciiDoc 8.2.2" />
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
@@ -225,6 +225,9 @@ div.hlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
+div.hlist td {
+ padding-bottom: 5px;
+}
td.hlist1 {
vertical-align: top;
font-style: italic;
@@ -247,12 +250,21 @@ div#toctitle {
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2 {
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
div.toclevel2 {
margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
}
include1::./stylesheets/xhtml11-manpage.css[]
/* Workarounds for IE6's broken and incomplete CSS2. */
@@ -441,7 +453,7 @@ information.</td>
</p>
</dd>
<dt>
--S swal1,total
+-S swap1,total
</dt>
<dd>
<p>
@@ -635,21 +647,17 @@ average on a new line, just like with vm
Using dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:
</dt>
<dd>
-<p>
-</p>
</dd>
</dl>
<div class="literalblock">
<div class="content">
-<pre><tt>dstat -dnyc -n eth0 -C total -f 5</tt></pre>
+<pre><tt>dstat -dnyc -N eth0 -C total -f 5</tt></pre>
</div></div>
<dl>
<dt>
Checking dstat's behaviour and the system's impact on dstat:
</dt>
<dd>
-<p>
-</p>
</dd>
</dl>
<div class="literalblock">
@@ -658,16 +666,19 @@ Checking dstat's behaviour and the syste
</div></div>
<dl>
<dt>
-Using the external clock and app plugins together with normal system resources:
+Using the external app plugin together with time and normal system resources:
</dt>
<dd>
-<p>
-</p>
</dd>
</dl>
<div class="literalblock">
<div class="content">
-<pre><tt>dstat -M clock,app -cndylp</tt></pre>
+<pre><tt>dstat -tcndylp -M app</tt></pre>
+</div></div>
+<p>this is identical to</p>
+<div class="literalblock">
+<div class="content">
+<pre><tt>dstat -M time,cpu,net,disk,sys,load,proc,app</tt></pre>
</div></div>
</div>
<h2>BUGS</h2>
@@ -763,7 +774,7 @@ updated by Dag Wieers <a href="mailto:da
<div id="footer">
<div id="footer-text">
Version 0.6.4<br />
-Last updated 28-Apr-2007 10:31:13 CEST
+Last updated 17-Jan-2008 11:09:04 CEST
</div>
</div>
</body>
dstat-0.6.6-nocolor.patch:
--- NEW FILE dstat-0.6.6-nocolor.patch ---
diff -up dstat-0.6.6/dstat.nocolor dstat-0.6.6/dstat
--- dstat-0.6.6/dstat.nocolor 2007-04-28 10:18:06.000000000 +0200
+++ dstat-0.6.6/dstat 2008-01-17 15:04:41.000000000 +0100
@@ -83,16 +83,16 @@ class Options:
self.intlist = None
self.netlist = None
self.swaplist = None
- self.color = False
+ self.color = True
self.update = True
self.header = True
self.output = False
- self.isatty = sys.stdout.isatty()
### Implicit if no terminal is used
- if not self.isatty:
+ if not sys.stdout.isatty():
self.update = False
self.header = False
+ self.color = False
### Temporary hardcoded for my own project
self.diskset = {
@@ -1610,6 +1610,18 @@ def gettermsize():
termsize = 25, 80
return termsize
+def gettermcolor(color=True):
+ if color and sys.stdout.isatty():
+ try:
+ import curses
+ curses.setupterm()
+ if curses.tigetnum('colors') < 0:
+ return False
+ except:
+ info(1, 'Color support is disabled, python-curses is not installed.')
+ return False
+ return color
+
def getcpunr():
"Return the number of CPUs in the system"
cpunr = -1
@@ -1742,7 +1754,7 @@ def main():
rows, cols = gettermsize()
### Write term-title
- if op.isatty:
+ if sys.stdout.isatty:
term = os.getenv('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]), ' '.join(op.args)))
@@ -1760,15 +1772,7 @@ def main():
# print 'Background is unknown, assuming dark.'
### Check terminal capabilities
- if op.isatty:
- op.color = True
- try:
- import curses
- curses.setupterm()
- if curses.tigetnum('colors') < 0:
- op.color = False
- except:
- op.color = False
+ op.color = gettermcolor(op.color)
if op.output:
if os.path.exists(op.output):
@@ -1874,7 +1878,7 @@ def main():
curwidth = 0
### Trim object list to what is visible on screen
- if op.isatty:
+ if sys.stdout.isatty:
rows, cols = gettermsize()
vislist = []
for o in totlist:
dstat-0.6.6-raw.patch:
--- NEW FILE dstat-0.6.6-raw.patch ---
diff -up dstat-0.6.6/dstat.raw dstat-0.6.6/dstat
--- dstat-0.6.6/dstat.raw 2008-01-17 15:06:34.000000000 +0100
+++ dstat-0.6.6/dstat 2008-01-17 15:12:05.000000000 +0100
@@ -1143,7 +1143,10 @@ class dstat_raw(dstat):
self.init(self.vars, 1)
def extract(self):
- self.val['sockets'] = len(self.readlines()) - 1
+ lines = -1
+ for line in self.readlines():
+ lines = lines + 1
+ self.val['sockets'] = lines
class dstat_swap(dstat):
def __init__(self):
Index: dstat.spec
===================================================================
RCS file: /cvs/extras/rpms/dstat/F-8/dstat.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dstat.spec 4 Sep 2007 15:24:28 -0000 1.5
+++ dstat.spec 21 Jan 2008 13:14:49 -0000 1.6
@@ -4,12 +4,15 @@
Summary: Versatile resource statistics tool
Name: dstat
Version: 0.6.6
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Group: System Environment/Base
URL: http://dag.wieers.com/home-made/dstat/
Source: http://dag.wieers.com/home-made/dstat/dstat-%{version}.tar.bz2
+Patch1: dstat-0.6.6-manfix.patch
+Patch2: dstat-0.6.6-nocolor.patch
+Patch3: dstat-0.6.6-raw.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root%(%{__id_u} -n)
BuildArch: noarch
@@ -33,6 +36,9 @@
%prep
%setup -q
+%patch1 -p1 -b .manfix
+%patch2 -p1 -b .nocolor
+%patch3 -p1 -b .raw
%build
# Make sure the docs are in unix format
@@ -56,18 +62,17 @@
%files
%defattr(-, root, root, 0755)
-
-%ghost %{_datadir}/dstat/*.pyo
%dir %{_datadir}/dstat
-
%doc AUTHORS ChangeLog COPYING README TODO *.conf docs/*.html docs/*.txt examples/
-
%{_mandir}/man1/dstat.1*
%{_bindir}/dstat
-%{_datadir}/dstat/*.py
-%{_datadir}/dstat/*.pyc
+%{_datadir}/dstat/*.py*
%changelog
+* Fri Jan 18 2008 Radek Brich <rbrich at redhat.com> - 0.6.6-3
+- Fix --nocolor and --raw (upstream patches)
+- Fix errors in man page
+
* Tue Sep 04 2007 Radek Brich <rbrich at redhat.com> - 0.6.6-2
- Updated license tag.
- Spec clean up.
More information about the fedora-extras-commits
mailing list