New version
- Removed patches (all upstreamed): show-watts-only-if-discharging, valid-html-output, factor-out-powertop-init, catch-fstream-errors
This commit is contained in:
parent
8c6b563a76
commit
d449850aad
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
powertop-*.tar.bz2
|
||||
/powertop-2.1.tar.gz
|
||||
|
||||
@ -1,98 +0,0 @@
|
||||
commit e3a0dce60a1ff1663dab0f91cc4dacf89b565dea
|
||||
Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Date: Fri May 18 13:17:39 2012 +0300
|
||||
|
||||
catch fstream exceptions in lib routines
|
||||
|
||||
Catch possible fstream and traits_type exceptions in lib.
|
||||
|
||||
Reported-by: Lekensteyn <lekensteyn@gmail.com>
|
||||
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
|
||||
diff --git a/src/lib.cpp b/src/lib.cpp
|
||||
index 53638dd..bcd809f 100644
|
||||
--- a/src/lib.cpp
|
||||
+++ b/src/lib.cpp
|
||||
@@ -172,8 +172,13 @@ void write_sysfs(const string &filename, const string &value)
|
||||
file.open(filename.c_str(), ios::out);
|
||||
if (!file)
|
||||
return;
|
||||
- file << value;
|
||||
- file.close();
|
||||
+ try
|
||||
+ {
|
||||
+ file << value;
|
||||
+ file.close();
|
||||
+ } catch (std::exception &exc) {
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
int read_sysfs(const string &filename, bool *ok)
|
||||
@@ -187,10 +192,17 @@ int read_sysfs(const string &filename, bool *ok)
|
||||
*ok = false;
|
||||
return 0;
|
||||
}
|
||||
- file >> i;
|
||||
+ try
|
||||
+ {
|
||||
+ file >> i;
|
||||
+ if (ok)
|
||||
+ *ok = true;
|
||||
+ } catch (std::exception &exc) {
|
||||
+ if (ok)
|
||||
+ *ok = "false";
|
||||
+ i = 0;
|
||||
+ }
|
||||
file.close();
|
||||
- if (ok)
|
||||
- *ok = true;
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -203,11 +215,17 @@ string read_sysfs_string(const string &filename)
|
||||
file.open(filename.c_str(), ios::in);
|
||||
if (!file)
|
||||
return "";
|
||||
- file.getline(content, 4096);
|
||||
- file.close();
|
||||
- c = strchr(content, '\n');
|
||||
- if (c)
|
||||
- *c = 0;
|
||||
+ try
|
||||
+ {
|
||||
+ file.getline(content, 4096);
|
||||
+ file.close();
|
||||
+ c = strchr(content, '\n');
|
||||
+ if (c)
|
||||
+ *c = 0;
|
||||
+ } catch (std::exception &exc) {
|
||||
+ file.close();
|
||||
+ return "";
|
||||
+ }
|
||||
return content;
|
||||
}
|
||||
|
||||
@@ -224,11 +242,17 @@ string read_sysfs_string(const char *format, const char *param)
|
||||
file.open(filename, ios::in);
|
||||
if (!file)
|
||||
return "";
|
||||
- file.getline(content, 4096);
|
||||
- file.close();
|
||||
- c = strchr(content, '\n');
|
||||
- if (c)
|
||||
- *c = 0;
|
||||
+ try
|
||||
+ {
|
||||
+ file.getline(content, 4096);
|
||||
+ file.close();
|
||||
+ c = strchr(content, '\n');
|
||||
+ if (c)
|
||||
+ *c = 0;
|
||||
+ } catch (std::exception &exc) {
|
||||
+ file.close();
|
||||
+ return "";
|
||||
+ }
|
||||
return content;
|
||||
}
|
||||
|
||||
@ -1,199 +0,0 @@
|
||||
From f121fe4d1eb444b1026cd936d839a877fd177727 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
Date: Thu, 17 May 2012 19:44:58 +0300
|
||||
Subject: [PATCH] factor out powertop_init() function
|
||||
|
||||
Factor out powertop_init() function to perform basic initialization on
|
||||
powertop start up.
|
||||
|
||||
Commit 057d6126eb6329c86b29a2e0219c0d0e49a84191 moved init after
|
||||
commandline options parsing. However, in some cases we need it before
|
||||
parsing, e.g. -- calibration.
|
||||
|
||||
Reported-by: Lekensteyn <lekensteyn@gmail.com>
|
||||
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
|
||||
---
|
||||
src/main.cpp | 110 ++++++++++++++++++++++++++++++---------------------------
|
||||
1 files changed, 58 insertions(+), 52 deletions(-)
|
||||
|
||||
diff --git a/src/main.cpp b/src/main.cpp
|
||||
index 433fea6..b5720f0 100644
|
||||
--- a/src/main.cpp
|
||||
+++ b/src/main.cpp
|
||||
@@ -280,15 +280,68 @@ static void checkroot() {
|
||||
}
|
||||
|
||||
}
|
||||
-int main(int argc, char **argv)
|
||||
+
|
||||
+static void powertop_init(void)
|
||||
{
|
||||
+ static char initialized = 0;
|
||||
int ret;
|
||||
+ struct statfs st_fs;
|
||||
+
|
||||
+ if (initialized)
|
||||
+ return;
|
||||
+
|
||||
+ checkroot();
|
||||
+ ret = system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1");
|
||||
+ ret = system("/sbin/modprobe msr > /dev/null 2>&1");
|
||||
+ statfs("/sys/kernel/debug", &st_fs);
|
||||
+
|
||||
+ if (st_fs.f_type != (long) DEBUGFS_MAGIC) {
|
||||
+ if (access("/bin/mount", X_OK) == 0) {
|
||||
+ ret = system("/bin/mount -t debugfs debugfs /sys/kernel/debug > /dev/null 2>&1");
|
||||
+ } else {
|
||||
+ ret = system("mount -t debugfs debugfs /sys/kernel/debug > /dev/null 2>&1");
|
||||
+ }
|
||||
+ if (ret != 0) {
|
||||
+ printf(_("Failed to mount debugfs!\n"));
|
||||
+ printf(_("exiting...\n"));
|
||||
+ exit(EXIT_FAILURE);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ srand(time(NULL));
|
||||
+
|
||||
+ if (access("/var/cache/", W_OK) == 0)
|
||||
+ mkdir("/var/cache/powertop", 0600);
|
||||
+ else
|
||||
+ mkdir("/data/local/powertop", 0600);
|
||||
+
|
||||
+ load_results("saved_results.powertop");
|
||||
+ load_parameters("saved_parameters.powertop");
|
||||
+
|
||||
+ enumerate_cpus();
|
||||
+ create_all_devices();
|
||||
+ detect_power_meters();
|
||||
+
|
||||
+ register_parameter("base power", 100, 0.5);
|
||||
+ register_parameter("cpu-wakeups", 39.5);
|
||||
+ register_parameter("cpu-consumption", 1.56);
|
||||
+ register_parameter("gpu-operations", 0.5576);
|
||||
+ register_parameter("disk-operations-hard", 0.2);
|
||||
+ register_parameter("disk-operations", 0.0);
|
||||
+ register_parameter("xwakes", 0.1);
|
||||
+
|
||||
+ load_board_params();
|
||||
+ initialized = 1;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+int main(int argc, char **argv)
|
||||
+{
|
||||
int option_index;
|
||||
int c;
|
||||
bool wantreport = FALSE;
|
||||
char filename[4096];
|
||||
int iterations = 1;
|
||||
- struct statfs st_fs;
|
||||
|
||||
#ifndef DISABLE_TRYCATCH
|
||||
set_new_handler(out_of_memory);
|
||||
@@ -322,6 +375,7 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
+ powertop_init();
|
||||
calibrate();
|
||||
break;
|
||||
|
||||
@@ -350,48 +404,8 @@ int main(int argc, char **argv)
|
||||
break;
|
||||
}
|
||||
}
|
||||
-
|
||||
- checkroot();
|
||||
- ret = system("/sbin/modprobe cpufreq_stats > /dev/null 2>&1");
|
||||
- ret = system("/sbin/modprobe msr > /dev/null 2>&1");
|
||||
-
|
||||
- statfs("/sys/kernel/debug", &st_fs);
|
||||
- if (st_fs.f_type != (long) DEBUGFS_MAGIC) {
|
||||
- if (access("/bin/mount", X_OK) == 0) {
|
||||
- ret = system("/bin/mount -t debugfs debugfs /sys/kernel/debug > /dev/null 2>&1");
|
||||
- } else {
|
||||
- ret = system("mount -t debugfs debugfs /sys/kernel/debug > /dev/null 2>&1");
|
||||
- }
|
||||
- if (ret != 0) {
|
||||
- printf(_("Failed to mount debugfs!\n"));
|
||||
- printf(_("exiting...\n"));
|
||||
- exit(EXIT_FAILURE);
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- srand(time(NULL));
|
||||
-
|
||||
- if (access("/var/cache/", W_OK) == 0)
|
||||
- mkdir("/var/cache/powertop", 0600);
|
||||
- else
|
||||
- mkdir("/data/local/powertop", 0600);
|
||||
|
||||
- load_results("saved_results.powertop");
|
||||
- load_parameters("saved_parameters.powertop");
|
||||
-
|
||||
- enumerate_cpus();
|
||||
- create_all_devices();
|
||||
- detect_power_meters();
|
||||
-
|
||||
- register_parameter("base power", 100, 0.5);
|
||||
- register_parameter("cpu-wakeups", 39.5);
|
||||
- register_parameter("cpu-consumption", 1.56);
|
||||
- register_parameter("gpu-operations", 0.5576);
|
||||
- register_parameter("disk-operations-hard", 0.2);
|
||||
- register_parameter("disk-operations", 0.0);
|
||||
- register_parameter("xwakes", 0.1);
|
||||
-
|
||||
- load_board_params();
|
||||
+ powertop_init();
|
||||
|
||||
if (wantreport)
|
||||
report(time_out, iterations, filename);
|
||||
@@ -399,8 +413,6 @@ int main(int argc, char **argv)
|
||||
if (debug_learning)
|
||||
printf("Learning debugging enabled\n");
|
||||
|
||||
-
|
||||
-
|
||||
learn_parameters(250, 0);
|
||||
save_parameters("saved_parameters.powertop");
|
||||
|
||||
@@ -412,7 +424,6 @@ int main(int argc, char **argv)
|
||||
exit(0);
|
||||
}
|
||||
|
||||
-
|
||||
/* first one is short to not let the user wait too long */
|
||||
init_display();
|
||||
one_measurement(1);
|
||||
@@ -420,11 +431,9 @@ int main(int argc, char **argv)
|
||||
tuning_update_display();
|
||||
show_tab(0);
|
||||
|
||||
-
|
||||
-
|
||||
while (!leave_powertop) {
|
||||
- one_measurement(time_out);
|
||||
show_cur_tab();
|
||||
+ one_measurement(time_out);
|
||||
learn_parameters(15, 0);
|
||||
}
|
||||
#ifndef DISABLE_NCURSES
|
||||
@@ -432,7 +441,6 @@ int main(int argc, char **argv)
|
||||
#endif
|
||||
printf(_("Leaving PowerTOP\n"));
|
||||
|
||||
-
|
||||
end_process_data();
|
||||
clear_process_data();
|
||||
end_cpu_data();
|
||||
@@ -450,6 +458,4 @@ int main(int argc, char **argv)
|
||||
clear_all_cpus();
|
||||
|
||||
return 0;
|
||||
-
|
||||
-
|
||||
}
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
diff -up powertop-2.0/src/measurement/measurement.cpp.orig powertop-2.0/src/measurement/measurement.cpp
|
||||
--- powertop-2.0/src/measurement/measurement.cpp.orig 2012-04-17 15:47:59.000000000 +0200
|
||||
+++ powertop-2.0/src/measurement/measurement.cpp 2012-04-17 15:49:31.690862740 +0200
|
||||
@@ -130,7 +130,7 @@ void power_supply_callback(const char *d
|
||||
while (file) {
|
||||
file.getline(line, 4096);
|
||||
|
||||
- if (strstr(line, "POWER_SUPPLY_STATUS") && strstr(line, "POWER_SUPPLY_STATUS"))
|
||||
+ if (strstr(line, "POWER_SUPPLY_STATUS") && strstr(line, "Discharging"))
|
||||
discharging = true;
|
||||
}
|
||||
file.close();
|
||||
@ -1,640 +0,0 @@
|
||||
From dca19ed0aa83e558f050b28620262bcd0af9b55c Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
|
||||
Date: Wed, 16 May 2012 16:36:54 +0200
|
||||
Subject: [PATCH] Fixed HTML output to make W3C validator happy
|
||||
|
||||
Various fixes to pass W3C HTML validation. Also unified
|
||||
whitespaces - preferred tabs over multiple spaces to save
|
||||
some space.
|
||||
---
|
||||
src/powertop.css | 481 ++++++++++++++++++++++----------------------
|
||||
src/process/do_process.cpp | 2 +-
|
||||
src/report.cpp | 2 +-
|
||||
3 files changed, 243 insertions(+), 242 deletions(-)
|
||||
|
||||
diff --git a/src/powertop.css b/src/powertop.css
|
||||
index 4a67c7f..087e384 100644
|
||||
--- a/src/powertop.css
|
||||
+++ b/src/powertop.css
|
||||
@@ -1,52 +1,55 @@
|
||||
-<!DOCTYPE html PUBLIC \"-//W3C/DTD HTML 4.01//EN\">
|
||||
+<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">
|
||||
<html>
|
||||
+<head>
|
||||
+<title>PowerTOP report</title>
|
||||
+<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">
|
||||
<script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js\"></script>
|
||||
-<script>
|
||||
-$(document).ready(function(){
|
||||
-
|
||||
- $('#system h2').addClass('hide');
|
||||
+<script type=\"text/javascript\">
|
||||
+$(document).ready(function(){
|
||||
+
|
||||
+ $('#system h2').addClass('hide');
|
||||
$('#system table').addClass('hide');
|
||||
- $('#cpuidle h2').addClass('hide');
|
||||
- $('#cpuidle table').addClass('hide');
|
||||
- $('#cpufreq h2').addClass('hide');
|
||||
- $('#cpufreq table').addClass('hide');
|
||||
- $('#software h2').addClass('hide');
|
||||
- $('#software table').addClass('hide');
|
||||
- $('#device h2').addClass('hide');
|
||||
- $('#device table').addClass('hide');
|
||||
- $('#device p').addClass('hide');
|
||||
- $('#tuning h2').addClass('hide');
|
||||
- $('#tuning table').addClass('hide');
|
||||
-
|
||||
- $('#top').append('<div class=\"SystemButton\" onclick=\"toggleSystem()\">System Info</div>');
|
||||
- $('#top').append('<div class=\"SummaryButton\" onclick=\"toggleSummary()\">Summary</div>');
|
||||
- $('#top').append('<div class=\"CpuidleButton\" onclick=\"toggleCpuidle()\">CPU Idle</div>');
|
||||
- $('#top').append('<div class=\"CpufreqButton\" onclick=\"toggleCpufreq()\">CPU Frequency</div>');
|
||||
- $('#top').append('<div class=\"SoftwareButton\" onclick=\"toggleSoftware()\">Software info</div>');
|
||||
- $('#top').append('<div class=\"DeviceButton\" onclick=\"toggleDevice()\">Device Info</div>');
|
||||
- $('#top').append('<div class=\"TuningButton\" onclick=\"toggleTuning()\">Tuning</div>');
|
||||
- $('#top').append('<div class=\"AllButton\" onclick=\"toggleAll()\">All</div>');
|
||||
+ $('#cpuidle h2').addClass('hide');
|
||||
+ $('#cpuidle table').addClass('hide');
|
||||
+ $('#cpufreq h2').addClass('hide');
|
||||
+ $('#cpufreq table').addClass('hide');
|
||||
+ $('#software h2').addClass('hide');
|
||||
+ $('#software table').addClass('hide');
|
||||
+ $('#device h2').addClass('hide');
|
||||
+ $('#device table').addClass('hide');
|
||||
+ $('#device p').addClass('hide');
|
||||
+ $('#tuning h2').addClass('hide');
|
||||
+ $('#tuning table').addClass('hide');
|
||||
+
|
||||
+ $('#top').append('<div class=\"SystemButton\" onclick=\"toggleSystem()\">System Info<\\/div>');
|
||||
+ $('#top').append('<div class=\"SummaryButton\" onclick=\"toggleSummary()\">Summary<\\/div>');
|
||||
+ $('#top').append('<div class=\"CpuidleButton\" onclick=\"toggleCpuidle()\">CPU Idle<\\/div>');
|
||||
+ $('#top').append('<div class=\"CpufreqButton\" onclick=\"toggleCpufreq()\">CPU Frequency<\\/div>');
|
||||
+ $('#top').append('<div class=\"SoftwareButton\" onclick=\"toggleSoftware()\">Software info<\\/div>');
|
||||
+ $('#top').append('<div class=\"DeviceButton\" onclick=\"toggleDevice()\">Device Info<\\/div>');
|
||||
+ $('#top').append('<div class=\"TuningButton\" onclick=\"toggleTuning()\">Tuning<\\/div>');
|
||||
+ $('#top').append('<div class=\"AllButton\" onclick=\"toggleAll()\">All<\\/div>');
|
||||
$('#top .SummaryButton').toggleClass('pressed');
|
||||
|
||||
}
|
||||
);
|
||||
-function toggleDummy() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleDummy() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -56,23 +59,23 @@ function toggleDummy() {
|
||||
$('#top .TuningButton').toggleClass('pressed', false);
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
-function toggleSystem() {
|
||||
- $('#system table').toggleClass('hide', false);
|
||||
- $('#system h2').toggleClass('hide', false);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleSystem() {
|
||||
+ $('#system table').toggleClass('hide', false);
|
||||
+ $('#system h2').toggleClass('hide', false);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', true);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -82,23 +85,23 @@ function toggleSystem() {
|
||||
$('#top .TuningButton').toggleClass('pressed', false);
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
-function toggleSummary() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', false);
|
||||
- $('#summary h2').toggleClass('hide', false);
|
||||
- $('#summary p').toggleClass('hide', false);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleSummary() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', false);
|
||||
+ $('#summary h2').toggleClass('hide', false);
|
||||
+ $('#summary p').toggleClass('hide', false);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', true);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -108,23 +111,23 @@ function toggleSummary() {
|
||||
$('#top .TuningButton').toggleClass('pressed', false);
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
-function toggleCpuidle() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', false);
|
||||
- $('#cpuidle h2').toggleClass('hide', false);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleCpuidle() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', false);
|
||||
+ $('#cpuidle h2').toggleClass('hide', false);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', true);
|
||||
@@ -133,25 +136,25 @@ function toggleCpuidle() {
|
||||
$('#top .DeviceButton').toggleClass('pressed', false);
|
||||
$('#top .TuningButton').toggleClass('pressed', false);
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
-
|
||||
-}
|
||||
-function toggleCpufreq() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', false);
|
||||
- $('#cpufreq h2').toggleClass('hide', false);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+
|
||||
+}
|
||||
+function toggleCpufreq() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', false);
|
||||
+ $('#cpufreq h2').toggleClass('hide', false);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -162,23 +165,23 @@ function toggleCpufreq() {
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
|
||||
-function toggleSoftware() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', false);
|
||||
- $('#software h2').toggleClass('hide', false);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleSoftware() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', false);
|
||||
+ $('#software h2').toggleClass('hide', false);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -189,23 +192,23 @@ function toggleSoftware() {
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
|
||||
-function toggleDevice() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', false);
|
||||
- $('#device h2').toggleClass('hide', false);
|
||||
- $('#device p').toggleClass('hide', false);
|
||||
- $('#tuning table').toggleClass('hide', true);
|
||||
- $('#tuning h2').toggleClass('hide', true);
|
||||
+function toggleDevice() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', false);
|
||||
+ $('#device h2').toggleClass('hide', false);
|
||||
+ $('#device p').toggleClass('hide', false);
|
||||
+ $('#tuning table').toggleClass('hide', true);
|
||||
+ $('#tuning h2').toggleClass('hide', true);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -216,23 +219,23 @@ function toggleDevice() {
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
|
||||
-function toggleTuning() {
|
||||
- $('#system table').toggleClass('hide', true);
|
||||
- $('#system h2').toggleClass('hide', true);
|
||||
- $('#summary table').toggleClass('hide', true);
|
||||
- $('#summary h2').toggleClass('hide', true);
|
||||
- $('#summary p').toggleClass('hide', true);
|
||||
- $('#cpuidle table').toggleClass('hide', true);
|
||||
- $('#cpuidle h2').toggleClass('hide', true);
|
||||
- $('#cpufreq table').toggleClass('hide', true);
|
||||
- $('#cpufreq h2').toggleClass('hide', true);
|
||||
- $('#software table').toggleClass('hide', true);
|
||||
- $('#software h2').toggleClass('hide', true);
|
||||
- $('#device table').toggleClass('hide', true);
|
||||
- $('#device h2').toggleClass('hide', true);
|
||||
- $('#device p').toggleClass('hide', true);
|
||||
- $('#tuning table').toggleClass('hide', false);
|
||||
- $('#tuning h2').toggleClass('hide', false);
|
||||
+function toggleTuning() {
|
||||
+ $('#system table').toggleClass('hide', true);
|
||||
+ $('#system h2').toggleClass('hide', true);
|
||||
+ $('#summary table').toggleClass('hide', true);
|
||||
+ $('#summary h2').toggleClass('hide', true);
|
||||
+ $('#summary p').toggleClass('hide', true);
|
||||
+ $('#cpuidle table').toggleClass('hide', true);
|
||||
+ $('#cpuidle h2').toggleClass('hide', true);
|
||||
+ $('#cpufreq table').toggleClass('hide', true);
|
||||
+ $('#cpufreq h2').toggleClass('hide', true);
|
||||
+ $('#software table').toggleClass('hide', true);
|
||||
+ $('#software h2').toggleClass('hide', true);
|
||||
+ $('#device table').toggleClass('hide', true);
|
||||
+ $('#device h2').toggleClass('hide', true);
|
||||
+ $('#device p').toggleClass('hide', true);
|
||||
+ $('#tuning table').toggleClass('hide', false);
|
||||
+ $('#tuning h2').toggleClass('hide', false);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -242,23 +245,23 @@ function toggleTuning() {
|
||||
$('#top .TuningButton').toggleClass('pressed', true);
|
||||
$('#top .AllButton').toggleClass('pressed', false);
|
||||
}
|
||||
-function toggleAll() {
|
||||
- $('#system table').toggleClass('hide', false);
|
||||
- $('#system h2').toggleClass('hide', false);
|
||||
- $('#summary table').toggleClass('hide', false);
|
||||
- $('#summary h2').toggleClass('hide', false);
|
||||
- $('#summary p').toggleClass('hide', false);
|
||||
- $('#cpuidle table').toggleClass('hide', false);
|
||||
- $('#cpuidle h2').toggleClass('hide', false);
|
||||
- $('#cpufreq table').toggleClass('hide', false);
|
||||
- $('#cpufreq h2').toggleClass('hide', false);
|
||||
- $('#software table').toggleClass('hide', false);
|
||||
- $('#software h2').toggleClass('hide', false);
|
||||
- $('#device table').toggleClass('hide', false);
|
||||
- $('#device h2').toggleClass('hide', false);
|
||||
- $('#device p').toggleClass('hide', false);
|
||||
- $('#tuning table').toggleClass('hide', false);
|
||||
- $('#tuning h2').toggleClass('hide', false);
|
||||
+function toggleAll() {
|
||||
+ $('#system table').toggleClass('hide', false);
|
||||
+ $('#system h2').toggleClass('hide', false);
|
||||
+ $('#summary table').toggleClass('hide', false);
|
||||
+ $('#summary h2').toggleClass('hide', false);
|
||||
+ $('#summary p').toggleClass('hide', false);
|
||||
+ $('#cpuidle table').toggleClass('hide', false);
|
||||
+ $('#cpuidle h2').toggleClass('hide', false);
|
||||
+ $('#cpufreq table').toggleClass('hide', false);
|
||||
+ $('#cpufreq h2').toggleClass('hide', false);
|
||||
+ $('#software table').toggleClass('hide', false);
|
||||
+ $('#software h2').toggleClass('hide', false);
|
||||
+ $('#device table').toggleClass('hide', false);
|
||||
+ $('#device h2').toggleClass('hide', false);
|
||||
+ $('#device p').toggleClass('hide', false);
|
||||
+ $('#tuning table').toggleClass('hide', false);
|
||||
+ $('#tuning h2').toggleClass('hide', false);
|
||||
$('#top .SystemButton').toggleClass('pressed', false);
|
||||
$('#top .SummaryButton').toggleClass('pressed', false);
|
||||
$('#top .CpuidleButton').toggleClass('pressed', false);
|
||||
@@ -269,9 +272,7 @@ function toggleAll() {
|
||||
$('#top .AllButton').toggleClass('pressed', true);
|
||||
}
|
||||
</script>
|
||||
- <head>
|
||||
<style type=\"text/css\">
|
||||
-
|
||||
table
|
||||
{
|
||||
background-color: #F8F8F8;
|
||||
@@ -439,94 +440,94 @@ tr.device_even
|
||||
}
|
||||
|
||||
body {
|
||||
- background-color: #eee; /* Background color */
|
||||
- color: #222; /* Foreground color used for text */
|
||||
- font-family: Helvetica;
|
||||
- font-size: 14px;
|
||||
- margin: 0; /* Amount of negative space around the
|
||||
- outside of the body */
|
||||
- padding: 0; /* Amount of negative space around the
|
||||
- inside of the body */
|
||||
+ background-color: #eee; /* Background color */
|
||||
+ color: #222; /* Foreground color used for text */
|
||||
+ font-family: Helvetica;
|
||||
+ font-size: 14px;
|
||||
+ margin: 0; /* Amount of negative space around the
|
||||
+ outside of the body */
|
||||
+ padding: 0; /* Amount of negative space around the
|
||||
+ inside of the body */
|
||||
}
|
||||
#top h1 {
|
||||
- margin: 0;
|
||||
- padding: 0;
|
||||
+ margin: 0;
|
||||
+ padding: 0;
|
||||
}
|
||||
#top h1 a {
|
||||
- background-color: #ccc;
|
||||
- border-bottom: 1px solid #666;
|
||||
- color: #222;
|
||||
- display: block;
|
||||
- font-size: 20px;
|
||||
- font-weight: bold;
|
||||
- padding: 10px 0;
|
||||
- text-align: center;
|
||||
- text-decoration: none;
|
||||
+ background-color: #ccc;
|
||||
+ border-bottom: 1px solid #666;
|
||||
+ color: #222;
|
||||
+ display: block;
|
||||
+ font-size: 20px;
|
||||
+ font-weight: bold;
|
||||
+ padding: 10px 0;
|
||||
+ text-align: center;
|
||||
+ text-decoration: none;
|
||||
text-shadow: 0px 1px 1px #fff;
|
||||
- background-image: -webkit-gradient(linear, left top, left bottom,
|
||||
- from(#ccc), to(#999));
|
||||
+ background-image: -webkit-gradient(linear, left top, left bottom,
|
||||
+ from(#ccc), to(#999));
|
||||
}
|
||||
|
||||
|
||||
#top div {
|
||||
- height: 30px;
|
||||
- font-weight: bold;
|
||||
- text-align: center;
|
||||
- color: white;
|
||||
- text-shadow: rgba(0,0,0,0.6) 0px -1px 1px;
|
||||
- line-height: 28px;
|
||||
- border-width:0px 8px 0px 8px;
|
||||
+ height: 30px;
|
||||
+ font-weight: bold;
|
||||
+ text-align: center;
|
||||
+ color: white;
|
||||
+ text-shadow: rgba(0,0,0,0.6) 0px -1px 1px;
|
||||
+ line-height: 28px;
|
||||
+ border-width:0px 8px 0px 8px;
|
||||
}
|
||||
#top div.SystemButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 6px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 6px;
|
||||
}
|
||||
#top div.SummaryButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 160px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 160px;
|
||||
}
|
||||
#top div.CpuidleButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 320px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 320px;
|
||||
}
|
||||
#top div.CpufreqButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 480px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 480px;
|
||||
}
|
||||
#top div.SoftwareButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 640px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 640px;
|
||||
}
|
||||
#top div.DeviceButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 800px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 800px;
|
||||
}
|
||||
#top div.TuningButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 960px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 960px;
|
||||
}
|
||||
#top div.AllButton {
|
||||
- position: absolute;
|
||||
- top: 7px;
|
||||
- left: 1120px;
|
||||
+ position: absolute;
|
||||
+ top: 7px;
|
||||
+ left: 1120px;
|
||||
}
|
||||
div.pressed {
|
||||
background-color: #000000;
|
||||
- border: 1px solid #000000;
|
||||
- color: #000000;
|
||||
- display: block;
|
||||
+ border: 1px solid #000000;
|
||||
+ color: #000000;
|
||||
+ display: block;
|
||||
border-width:0px 8px 0px 8px;
|
||||
- -webkit-border-top-left-radius: 8px;
|
||||
- -webkit-border-top-right-radius: 8px;
|
||||
+ -webkit-border-top-left-radius: 8px;
|
||||
+ -webkit-border-top-right-radius: 8px;
|
||||
-webkit-border-bottom-left-radius: 8px;
|
||||
- -webkit-border-bottom-right-radius: 8px;
|
||||
+ -webkit-border-bottom-right-radius: 8px;
|
||||
}
|
||||
table.hide {
|
||||
display: none;
|
||||
diff --git a/src/process/do_process.cpp b/src/process/do_process.cpp
|
||||
index ef2d1d2..7366454 100644
|
||||
--- a/src/process/do_process.cpp
|
||||
+++ b/src/process/do_process.cpp
|
||||
@@ -985,7 +985,7 @@ void report_process_update_display(void)
|
||||
|
||||
if (show_power) {
|
||||
if (reporttype)
|
||||
- fprintf(reportout.http_report,"<tr class=\"%s\"><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td></td><td class=\"process_power\">%s</td><td>%s</td><td>%s</td></tr>\n",
|
||||
+ fprintf(reportout.http_report,"<tr class=\"%s\"><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td class=\"process_power\">%s</td><td>%s</td><td>%s</td></tr>\n",
|
||||
process_class(lines), power, usage, wakes, gpus, disks, xwakes, name, pretty_print(all_power[i]->description(), descr, 128));
|
||||
else
|
||||
fprintf(reportout.csv_report,"%s, %s, %s, %s, %s, %s, %s, %s,\n",
|
||||
diff --git a/src/report.cpp b/src/report.cpp
|
||||
index d4f032d..82599e3 100644
|
||||
--- a/src/report.cpp
|
||||
+++ b/src/report.cpp
|
||||
@@ -120,7 +120,7 @@ static void system_info(void)
|
||||
|
||||
if (reporttype) {
|
||||
fprintf(reportout.http_report, "<div id=\"top\">\n<h1><a href=\"#top\"> </a></h1>\n</div>\n<div id=\"system\">\n<table>");
|
||||
- fprintf(reportout.http_report, "<tr class=\"system_even\"><td width=20%%>PowerTOP Version</td><td>%s</td></tr>\n", POWERTOP_VERSION);
|
||||
+ fprintf(reportout.http_report, "<tr class=\"system_even\"><td width=\"20%%\">PowerTOP Version</td><td>%s</td></tr>\n", POWERTOP_VERSION);
|
||||
} else {
|
||||
fprintf(reportout.csv_report, "***PowerTOP Report***, \n");
|
||||
fprintf(reportout.csv_report, "**System Information**, \n");
|
||||
--
|
||||
1.7.7.6
|
||||
|
||||
@ -1,26 +1,18 @@
|
||||
Name: powertop
|
||||
Version: 2.0
|
||||
Release: 4%{?dist}
|
||||
Version: 2.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Power consumption monitor
|
||||
|
||||
Group: Applications/System
|
||||
License: GPLv2
|
||||
URL: http://01.org/powertop/
|
||||
Source0: http://01.org/powertop/sites/default/files/downloads/%{name}-%{version}.tar.bz2
|
||||
Source0: http://01.org/powertop/sites/default/files/downloads/%{name}-%{version}.tar.gz
|
||||
|
||||
# Sent upstream
|
||||
Patch0: powertop-2.0-always-create-params.patch
|
||||
Patch1: powertop-2.0-html-escape.patch
|
||||
# Sent upstream
|
||||
Patch2: powertop-2.0-show-watts-only-if-discharging.patch
|
||||
# Sent upstream
|
||||
Patch3: powertop-2.0-valid-html-output.patch
|
||||
# Patch for rhbz#823502, backported from upstream
|
||||
Patch4: powertop-2.0-factor-out-powertop-init.patch
|
||||
# Patch for rhbz#832497, backported from upstream
|
||||
Patch5: powertop-2.0-catch-fstream-errors.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl-devel
|
||||
BuildRequires: gettext, ncurses-devel, pciutils-devel, zlib-devel, libnl3-devel
|
||||
|
||||
%description
|
||||
PowerTOP is a tool that finds the software component(s) that make your
|
||||
@ -30,10 +22,6 @@ computer use more power than necessary while it is idle.
|
||||
%setup -q
|
||||
%patch0 -p1 -b .always-create-params
|
||||
%patch1 -p1 -b .html-escape
|
||||
%patch2 -p1 -b .show-watts-only-if-discharging
|
||||
%patch3 -p1 -b .valid-html-output
|
||||
%patch4 -p1 -b .factor-out-powertop-init
|
||||
%patch5 -p1 -b .catch-fstream-errors
|
||||
|
||||
%build
|
||||
%configure
|
||||
@ -54,17 +42,20 @@ touch %{_localstatedir}/cache/powertop/{saved_parameters.powertop,saved_results.
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files -f %{name}.lang
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc COPYING README TODO
|
||||
%dir %{_localstatedir}/cache/powertop
|
||||
%ghost %{_localstatedir}/cache/powertop/saved_parameters.powertop
|
||||
%ghost %{_localstatedir}/cache/powertop/saved_results.powertop
|
||||
%{_sbindir}/powertop
|
||||
# No man page yet.
|
||||
#%{_mandir}/man8/powertop.8*
|
||||
%{_mandir}/man8/powertop.8*
|
||||
|
||||
%changelog
|
||||
* Thu Aug 16 2012 Jaroslav Škarvada <jskarvad@redhat.com> - 2.1-1
|
||||
- New version
|
||||
- Removed patches (all upstreamed): show-watts-only-if-discharging,
|
||||
valid-html-output, factor-out-powertop-init, catch-fstream-errors
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user