[PATCH 1/2] python-linux-procfs: Fix import of utilist
by John Kacur
If procfs/utilist.py is not in your PYTHONPATH, the import can fail.
Specify it fully.
Reported-by: David Runge <dave(a)sleepmap.de>
Suggested-by: Guy Streeter <guy.streeter(a)gmail.com>
Signed-off-by: John Kacur <jkacur(a)redhat.com>
---
procfs/procfs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/procfs/procfs.py b/procfs/procfs.py
index a586ae2b0156..3cfa941ffdb9 100755
--- a/procfs/procfs.py
+++ b/procfs/procfs.py
@@ -21,7 +21,7 @@
import os, time
from functools import reduce
from six.moves import range
-from utilist import bitmasklist
+from procfs.utilist import bitmasklist
import platform
import re
--
2.21.3
3 years, 5 months
[PATCH 01/13] python-linux-procfs: bitmasklist_test.py: python3 changes
by John Kacur
Only python3 is supported now
Changes to python3
- Specify python3 on the shebang
- Get rid of future
- Apply optional ws_comma from 2to3
Signed-off-by: John Kacur <jkacur(a)redhat.com>
---
bitmasklist_test.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/bitmasklist_test.py b/bitmasklist_test.py
index 60a8da33c77f..4519946858f1 100755
--- a/bitmasklist_test.py
+++ b/bitmasklist_test.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-from __future__ import print_function
+#!/usr/bin/python3
+
from procfs import bitmasklist
class bitmasklist_test:
@@ -52,17 +52,17 @@ t.bitmasklist_test()
# CPU 0, 32
t = \
- bitmasklist_test("00000000,00000000,00000000,00000000,00000001,00000001", 44, [0,32])
+ bitmasklist_test("00000000,00000000,00000000,00000000,00000001,00000001", 44, [0, 32])
t.bitmasklist_test()
# cpu 0-15
t = \
- bitmasklist_test("ffff", 44, [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15])
+ bitmasklist_test("ffff", 44, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
t.bitmasklist_test()
#cpu 0-71
t = \
- bitmasklist_test("ff,ffffffff,ffffffff", 96, [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71])
+ bitmasklist_test("ff,ffffffff,ffffffff", 96, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71])
t.bitmasklist_test()
exit(bitmasklist_test.unit_test_result)
--
2.21.3
3 years, 5 months
Inconsistency with tuna isolate command on s390x architecture
by Aniket Khisti
Hello,
There seems to be a bug while trying to isolate CPU using tuna-
utility on RHEL8 s380x architecture. Would it be possible to
accommodate this-
bugfix in any upcoming releases? I appreciate your help in advance, Thanks!
Observed issue -
[root@ibm-z-137 ~]# tuna --cpus=1 --isolate
Function: isolate_cpus , Invalid argument
[root@ibm-z-137 ~]# tuna --cpus 1 --isolate
Function: isolate_cpus , Invalid argument
Expected - [root@localhost ~]# tuna --cpus=1 --isolate
# no output, means works fine
root@localhost ~]# tuna --cpus 1 --isolate
# no output, means works fine
Issue Environment -
[root@ibm-z-137 ~]# uname -a
Linux ibm-z-137.rhts.eng.bos.redhat.com 4.18.0-193.el8.s390x #1 SMP Fri Mar
27
14:43:09 UTC 2020 s390x s390x s390x GNU/Linux
[root@ibm-z-137 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@ibm-z-137 tuna]# dnf whatprovides tuna
tuna-0.14-4.el8.noarch : Application tuning GUI & command line utility
Repo : @System
Matched from:
Provide : tuna = 0.14-4.el8
3 years, 5 months
[PATCH] python-linux-procfs: Create release 0.6.2
by John Kacur
Release 0.6.2
Signed-off-by: John Kacur <jkacur(a)redhat.com>
---
rpm/SPECS/python-linux-procfs.spec | 7 ++++++-
setup.py | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/rpm/SPECS/python-linux-procfs.spec b/rpm/SPECS/python-linux-procfs.spec
index 828f1bc25940..6103cbff8c19 100644
--- a/rpm/SPECS/python-linux-procfs.spec
+++ b/rpm/SPECS/python-linux-procfs.spec
@@ -5,7 +5,7 @@
%endif
Name: python-linux-procfs
-Version: 0.6.1
+Version: 0.6.2
Release: 1%{?dist}
License: GPLv2
Summary: Linux /proc abstraction classes
@@ -84,6 +84,11 @@ rm -rf %{buildroot}
%endif
%changelog
+* Mon Jun 22 2020 John Kacur <jkacur(a)redhat.com> - 0.6.2-1
+- Add bitmasklist_test
+- clean-ups for recent python formating regarding spacing, tabs, etc
+- Fix to parse the number of cpus correctly on s390(x)
+
* Fri Jan 11 2019 Jiri Kastner <jkastner(a)redhat.com> - 0.6.1-1
- python3 fixes
diff --git a/setup.py b/setup.py
index 82e6bc433b06..f1918fc50fd0 100755
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ if isfile("MANIFEST"):
PYTHONLIB = join(get_python_lib(standard_lib=1, prefix=''), 'site-packages')
setup(name="python-linux-procfs",
- version = "0.6.1",
+ version = "0.6.2",
description = "Linux /proc abstraction classes",
author = "Arnaldo Carvalho de Melo",
author_email = "acme(a)redhat.com",
--
2.21.3
3 years, 5 months
Inconsistency with tuna isolate command on s390x architecture
by Aniket Khisti
Hello,
There seems to be a bug while trying to isolate CPU using tuna-
utility on RHEL8 s380x architecture. Would it be possible to accommodate this-
bugfix in any upcoming releases? appreciate the efforts, Thanks!
Observed issue -
[root@ibm-z-137 ~]# tuna --cpus=1 --isolate
Function: isolate_cpus , Invalid argument
[root@ibm-z-137 ~]# tuna --cpus 1 --isolate
Function: isolate_cpus , Invalid argument
Expected -
[root@localhost ~]# tuna --cpus=1 --isolate
# no output, means works fine
[root@localhost ~]# tuna --cpus 1Thanks, --isolate
# no output, means works fine
Issue Environment -
[root@ibm-z-137 ~]# uname -a
Linux ibm-z-137.rhts.eng.bos.redhat.com 4.18.0-193.el8.s390x #1 SMP Fri Mar 27
14:43:09 UTC 2020 s390x s390x s390x GNU/Linux
[root@ibm-z-137 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.2 (Ootpa)
[root@ibm-z-137 tuna]# dnf whatprovides tuna
tuna-0.14-4.el8.noarch : Application tuning GUI & command line utility
Repo : @System
Matched from:
Provide : tuna = 0.14-4.el8
--
Aniket Khisti
3 years, 5 months