35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
From b4e975bef871c949e199952d4c3b84f73668f437 Mon Sep 17 00:00:00 2001
|
||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||
Date: Thu, 4 Mar 2021 21:14:54 +0100
|
||
Subject: [PATCH] powertop2tuned: work with PowerTOP 2.13 and newer
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
Fixes: #328
|
||
Reference:https://github.com/redhat-performance/tuned/pull/329/commits/b4e975bef871c949e199952d4c3b84f73668f437
|
||
Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
|
||
---
|
||
experiments/powertop2tuned.py | 7 +++++--
|
||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||
|
||
diff --git a/experiments/powertop2tuned.py b/experiments/powertop2tuned.py
|
||
index 211df2d3..8ab260cf 100755
|
||
--- a/experiments/powertop2tuned.py
|
||
+++ b/experiments/powertop2tuned.py
|
||
@@ -215,9 +215,12 @@ def generateHTML(self):
|
||
print('PowerTOP returned error code: %d' % proc.returncode, file=sys.stderr)
|
||
return -2
|
||
|
||
- prefix = "PowerTOP outputing using base filename "
|
||
+ prefix = "PowerTOP outputting using base filename "
|
||
if output.find(prefix) == -1:
|
||
- return -1
|
||
+ # workaround for PowerTOP older than 2.13
|
||
+ prefix = "PowerTOP outputing using base filename "
|
||
+ if output.find(prefix) == -1:
|
||
+ return -1
|
||
|
||
name = output[output.find(prefix)+len(prefix):-1]
|
||
#print "Parsed filename=", [name]
|