1 Star 0 Fork 25

konglidong/tuned

forked from src-openEuler/tuned 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-powertop2tuned-work-with-PowerTOP-2.13-and-newer.patch 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
liudabo 提交于 2021-03-05 14:53 +08:00 . powertop2tuned: work with PowerTOP 2.13 and newer
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]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/konglidong/tuned.git
git@gitee.com:konglidong/tuned.git
konglidong
tuned
tuned
master

搜索帮助