Discussion:
[PATCH 1/3] python-schedutils: Correct typos in usage messages
John Kacur
2016-05-10 16:18:15 UTC
Permalink
Correct typos in usage messages
- "chrt" should say "pchrt"
- "taskset" should say "ptaskset"

Also update the email address for bug reports and patches.

Signed-off-by: John Kacur <***@redhat.com>
---
pchrt.py | 4 ++--
ptaskset.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pchrt.py b/pchrt.py
index c4f1f2c5e5ec..0761792454fa 100755
--- a/pchrt.py
+++ b/pchrt.py
@@ -18,7 +18,7 @@ import os, schedutils, sys

def usage():
print '''pchrt (python-schedutils)
-usage: chrt [options] [prio] [pid | cmd [args...]]
+usage: pchrt [options] [prio] [pid | cmd [args...]]
manipulate real-time attributes of a process
-b, --batch set policy to SCHED_BATCH
-f, --fifo set policy to SCHED_FIFO
@@ -32,7 +32,7 @@ manipulate real-time attributes of a process

You must give a priority if changing policy.

-Report bugs and send patches to <***@ghostprotocols.net>'''
+Report bugs and send patches to <tuna-***@lists.fedorahosted.org>'''
return

def show_priority_limits(policy):
diff --git a/ptaskset.py b/ptaskset.py
index 15f0ec5bfa1f..afd18477f109 100755
--- a/ptaskset.py
+++ b/ptaskset.py
@@ -18,7 +18,7 @@ import os, schedutils, sys

def usage():
print '''ptaskset (python-schedutils)
-usage: taskset [options] [mask | cpu-list] [pid | cmd [args...]]
+usage: ptaskset [options] [mask | cpu-list] [pid | cmd [args...]]
set or get the affinity of a process

-p, --pid operate on existing given pid
--
2.4.11
John Kacur
2016-05-10 16:18:16 UTC
Permalink
Add some minimal man pages based on the output of --help for
pchrt and ptaskset

Signed-off-by: John Kacur <***@redhat.com>
---
pchrt.1 | 47 +++++++++++++++++++++++++++++++++++++++++++++++
ptaskset.1 | 26 ++++++++++++++++++++++++++
2 files changed, 73 insertions(+)
create mode 100644 pchrt.1
create mode 100644 ptaskset.1

diff --git a/pchrt.1 b/pchrt.1
new file mode 100644
index 000000000000..cc5136d4dbda
--- /dev/null
+++ b/pchrt.1
@@ -0,0 +1,47 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH PCHRT 1 "May 10 2016"
+.SH NAME
+.B pchrt (python\-schedutils) \- manipulate the real-time attributes of a process
+.SH SYNOPSIS
+pchrt [options] [prio] [pid | cmd [args...]]
+.SH OPTIONS
+.TP
+.B \-b, \-\-batch
+set policy to SCHED_BATCH
+.TP
+.B \-f, \-\-fifo
+set policy to SCHED_FIFO
+.TP
+.B \-i, \-\-idle
+set policy to SCHED_IDLE
+.TP
+.B \-p, \-\-pid
+operate on existing given pid
+.TP
+.B \-m, \-\-max
+show min and max valid priorities
+.TP
+.B \-o, \-\-other
+set policy to SCHED_OTHER
+.TP
+.B \-r, \-\-rr
+set policy to SCHED_RR (default)
+.TP
+.B \-R, \-\-reset-on-fork
+set SCHED_RESET_ON_FORK for FIFO or RR
+.TP
+.B \-h, \-\-help
+display help
+.TP
+.B Note:
+You must give a priority if changing policy.
+.SH SEE ALSO
+.BR chrt (1)
+.SH AUTHOR
+pchrt was written by Arnaldo Carvalho de Melo <***@redhat.com>
+.br
+as part of python\-schedutils
+.PP
+This manual page was written by John Kacur <***@redhat.com>
+.PP
+Report bugs and send patches to <tuna-***@lists.fedorahosted.org>
diff --git a/ptaskset.1 b/ptaskset.1
new file mode 100644
index 000000000000..022d8f8bed65
--- /dev/null
+++ b/ptaskset.1
@@ -0,0 +1,26 @@
+.\" Hey, EMACS: -*- nroff -*-
+.TH PTASKSET 1 "May 10 2016"
+.SH NAME
+.B ptaskset (python\-schedutils) \- set or get the affinity of a process
+.SH SYNOPSIS
+ptaskset [options] [mask | cpu\-list] [pid | cmd [args...]]
+.SH OPTIONS
+.TP
+.B \-p, \-\-pid
+operate on existing given pid
+.TP
+.B \-c, \-\-cpu\-list
+display and specify cpus in list format
+.TP
+.B \-h, \-\-help
+display help
+.SH SEE ALSO
+.BR taskset (1)
+.SH AUTHOR
+ptaskset was written by Arnaldo Carvalho de Melo <***@redhat.com>
+.br
+as part of python\-schedutils
+.PP
+This manual page was written by John Kacur <***@redhat.com>
+.PP
+Report bugs and send patches to <tuna-***@lists.fedorahosted.org>
--
2.4.11
John Kacur
2016-05-10 16:18:17 UTC
Permalink
Install pchrt.1 and ptaskset.1 using the spec file

Signed-off-by: John Kacur <***@redhat.com>
---
rpm/SPECS/python-schedutils.spec | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/rpm/SPECS/python-schedutils.spec b/rpm/SPECS/python-schedutils.spec
index 24749581fd2f..084f0978a4ac 100644
--- a/rpm/SPECS/python-schedutils.spec
+++ b/rpm/SPECS/python-schedutils.spec
@@ -4,7 +4,7 @@
Summary: Linux scheduler python bindings
Name: python-schedutils
Version: 0.4
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
URL: http://git.kernel.org/?p=linux/kernel/git/acme/python-schedutils.git
Source: http://userweb.kernel.org/~acme/python-schedutils/%{name}-%{version}.tar.bz2
@@ -28,6 +28,9 @@ rm -rf %{buildroot}
mkdir -p %{buildroot}%{_bindir}
cp -p pchrt.py %{buildroot}%{_bindir}/pchrt
cp -p ptaskset.py %{buildroot}%{_bindir}/ptaskset
+mkdir -p %{buildroot}%{_mandir}/man1
+gzip -c pchrt.1 > %{buildroot}%{_mandir}/man1/pchrt.1.gz
+gzip -c ptaskset.1 > %{buildroot}%{_mandir}/man1/ptaskset.1.gz

%clean
rm -rf %{buildroot}
@@ -41,8 +44,14 @@ rm -rf %{buildroot}
%if "%{python_ver}" >= "2.5"
%{python_sitearch}/*.egg-info
%endif
+%{_mandir}/man1/pchrt.1.gz
+%{_mandir}/man1/ptaskset.1.gz

%changelog
+* Tue May 10 2016 John Kacur <***@redhat.com> - 0.4-2
+- Add man pages for pchrt and ptaskset
+- Fix and update usage messages for pchrt and ptaskset
+
* Mon Aug 1 2011 Arnaldo Carvalho de Melo <***@redhat.com> - 0.4-1
- New upstream release.

@@ -63,8 +72,8 @@ rm -rf %{buildroot}
* Tue Jun 10 2008 Arnaldo Carvalho de Melo <***@redhat.com> - 0.1-3
- add dist to the release tag

-* Tue Dec 19 2007 Arnaldo Carvalho de Melo <***@redhat.com> - 0.1-2
+* Wed Dec 19 2007 Arnaldo Carvalho de Melo <***@redhat.com> - 0.1-2
- First build into rhel5-rt

-* Tue Dec 19 2007 Arnaldo Carvalho de Melo <***@redhat.com> - 0.1-1
+* Wed Dec 19 2007 Arnaldo Carvalho de Melo <***@redhat.com> - 0.1-1
- Initial package
--
2.4.11
Loading...