Seg Fault due to function format_watts in file src/lib.cpp
by Ganapati Bhat
Dear All,
I was compiling powertop as an Android external module and using the option
powertop --html. However, there used to be a segmentation fault. When i
looked into it, I observed that in the function format_watts in
src/lib.cpp, the last argument to mbstows was zero. By changing the
argument to len, which is itself an argument to the function format_watts,
powertop worked properly? Does this also happen on an x86 machine? ( I am
unable to verify this due to some problems in my laptop which I have not
yet resolved.) If not then can someone explain to me why is it happening in
the case of android?
Thanks and Regards,
Ganapati
9 years, 2 months
new schedule
by Kristen Carlson Accardi
We delayed our string freeze date by 2 weeks to give me a chance to get
caught up on patches etc. As a result, the new string freeze date is
going to be 2/15, with release planned for March 1.
Thanks for your patience.
Kristen
9 years, 5 months
Version info in lib.h file
by Ganapati Bhat
Hello all,
I was just going through the code of the release 2.2 of powertop and in the
lib.h file in src/ directory POWERTOP_VERSION is defined as v2.1 and not
v2.2. Why is it so? Has it been modified in some subsequent patches?
Thanks and Regards,
Ganapati Bhat
9 years, 5 months
[PATCH] Add a more informative error message about MSR not found
by jani.nikula@linux.intel.com
From: Jani Nikula <jani.nikula(a)intel.com>
Suggest enabling CONFIG_X86_MSR. Add \n at the end of the error message.
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
---
Note: This breaks translations looking for msgid "msr reg not found". I'm
unsure how you want this kind of changes handled.
---
src/cpu/intel_cpus.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/intel_cpus.cpp b/src/cpu/intel_cpus.cpp
index 2b78d31..30c311f 100644
--- a/src/cpu/intel_cpus.cpp
+++ b/src/cpu/intel_cpus.cpp
@@ -58,7 +58,7 @@ static uint64_t get_msr(int cpu, uint64_t offset)
fd = sprintf(msr_path, "/dev/msr%d", cpu);
if (access(msr_path, R_OK) != 0){
- fprintf(stderr, _("msr reg not found"));
+ fprintf(stderr, _("Model-specific registers (MSR) not found (try enabling CONFIG_X86_MSR).\n"));
exit(-2);
}
}
--
1.7.9.5
9 years, 5 months
[PATCH] README: add CONFIG_X86_MSR to the list of required kernel config options
by jani.nikula@linux.intel.com
From: Jani Nikula <jani.nikula(a)intel.com>
PowerTOP fails on x86 without CONFIG_X86_MSR.
Signed-off-by: Jani Nikula <jani.nikula(a)intel.com>
---
README | 1 +
1 file changed, 1 insertion(+)
diff --git a/README b/README
index 7e789e0..07bbea0 100644
--- a/README
+++ b/README
@@ -43,6 +43,7 @@ CONFIG_PERF_COUNTERS
CONFIG_TRACEPOINTS
CONFIG_TRACING
CONFIG_EVENT_POWER_TRACING_DEPRECATED
+CONFIG_X86_MSR
ACPI_PROCFS_POWER
The patches in the patches/ sub-directory are required for PowerTOP to function
--
1.7.9.5
9 years, 5 months
Powertop --claibrate doesn't run
by Don Rhummy
When I run the command "powertop
--calibrate --debug" it turns my screen black but then does nothing
(even if I leave it for 30 minutes) and when I touch the mousepad, it
shows the command simply returned with no output like this:
myuser:~>kdesu /usr/sbin/powertop --calibrate --debug
myuser:~>
I'm using:
openSUSE 12.2
KDE 4.8.5
Kernel: 3.4.11 (64bit)
8GB RAM (6.5GB free)
Intel i5 1.7 quad core
How do I fix this? What could be wrong?
9 years, 6 months
Fwd: powertop is not showing power usage but everything
by royy walls
> Hi
>
> I am trying to run powertop on my machine, I think it's really cool tool.
>
> But after installation I was not able see any power related information on
> my macchine.
>
> Following is the configuration :-
>
> [root@fos1 linux-3.5]# uname -a
> Linux fos1 3.5.0 #1 SMP Wed Jan 30 17:27:06 PST 2013 x86_64 x86_64 x86_64
> GNU/Linux
> [root@fos1 linux-3.5]# cat /etc/redhat-release
> Red Hat Enterprise Linux Server release 6.1 (Santiago)
> [root@fos1 linux-3.5]#
>
>
> Here is the output produced by the powertop:-
>
> [root@fos1 powertop-2.2]# cat op
> PowerTOP 2.1 Overview Idle stats Frequency stats Device stats
> Tunables
>
> Summary: 67.4 wakeups/second, 0.0 GPU ops/seconds, 0.0 VFS ops/sec and
> 8.4% CPU use
>
> Usage Events/s Category Description
> 1.2 ms/s 37.8 Interrupt [7] sched(softirq)
> 81.0 ms/s 0.00 Process ./src/powertop
> 97.4 µs/s 12.6 Timer tick_sched_timer
> 93.9 µs/s 3.6 kWork cache_reap
> 45.7 µs/s 3.6 Interrupt [3] net_rx(softirq)
> 47.5 µs/s 1.8 Process /usr/sbin/ypbind
> 15.7 µs/s 1.8 Timer hrtimer_wakeup
> 87.2 µs/s 0.9 Process [ksoftirqd/9]
> 63.5 µs/s 0.9 Process sshd: ckulkarni@pts
> /0
> 13.4 µs/s 0.9 Process [sync_supers]
> 5.3 µs/s 0.9 kWork flush_to_ldisc
> 3.1 µs/s 0.9 kWork
> edac_pci_workq_function
> 2.6 µs/s 0.9 kWork
> _base_fault_reset_work
> 2.1 µs/s 0.9 kWork neigh_periodic_work
> 405.9 µs/s 0.00 Interrupt [9] RCU(softirq)
> 278.3 µs/s 0.00 Interrupt [1] timer(softirq)
> 79.1 µs/s 0.00 Process [kworker/9:1]
> 55.1 µs/s 0.00 kWork do_dbs_timer
> 51.8 µs/s 0.00 Timer rh_timer_func
> 32.2 µs/s 0.00 Process [kworker/0:1]
> 27.0 µs/s 0.00 Process [kworker/u:0]
> 18.6 µs/s 0.00 Process [kworker/7:1]
> 13.6 µs/s 0.00 kWork vmstat_update
> 10.1 µs/s 0.00 kWork
> edac_mc_workq_function
> 9.9 µs/s 0.00 Process [kworker/2:1]
> 9.8 µs/s 0.00 Process [kworker/1:1]
> 8.2 µs/s 0.00 Process [kworker/14:1]
> 6.6 µs/s 0.00 Process [kworker/u:2]
> 3.3 µs/s 0.00 Timer
> sync_supers_timer_fn
> 3.2 µs/s 0.00 Timer
> clocksource_watchdog
> 2.7 µs/s 0.00 Timer
> br_hello_timer_expired
> 2.6 µs/s 0.00 Interrupt [101] eth0-TxRx-0
> 2.0 µs/s 0.00 Interrupt [106] eth0-TxRx-5
> 1.6 µs/s 0.00 Interrupt [104] eth0-TxRx-3
> 1.6 µs/s 0.00 Interrupt [108] eth0-TxRx-7
> 0.7 µs/s 0.00 Timer tcp_write_timer
>
> [root@fos1 powertop-2.2]#
>
>
> I observed that first column is absent.
>
> As per the readme file I tried to look for kernel configuration but found
> following variables set in my .config file
>
> CONFIG_NO_HZ=y
> CONFIG_HIGH_RES_TIMERS=y
> CONFIG_HPET_TIMER=y
> CONFIG_CPU_FREQ_GOV_ONDEMAND=m
> CONFIG_USB_SUSPEND=y
> CONFIG_SND_AC97_POWER_SAVE=y
> CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5
> CONFIG_TIMER_STATS=y
> CONFIG_PERF_EVENTS=y
> CONFIG_PERF_COUNTERS<<<<<<<<<<<<<<<<<not available in my kernel
> CONFIG_TRACEPOINTS<<<<<<<<<<<<<<< not available in my kernel
> CONFIG_TRACEPOINTS=y
> CONFIG_TRACING=y
> CONFIG_TRACING_SUPPORT=y
> CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
> CONFIG_ACPI_PROCFS_POWER=y
>
> Can someone help to get powertop running?
>
>
> Regards,
> Royy
>
>
>
9 years, 6 months
[PATCH] src/cpu/cpu.cpp: Fix typo in error message: freque*nc*y
by Paul Menzel
Date: Sun, 3 Feb 2013 23:31:22 +0100
The following command was used to fix this typo.
$ git grep -l frequecny | xargs sed -i 's,frequecny,frequency,'
---
Please note, that I also changed the translations files. As Transifex is
used, that might be not the correct way to fix such a typo. So please
only apply this patch after a knowledgeable Transifex person commented
it.
po/bn_IN.po | 4 ++--
po/ca.po | 4 ++--
po/cs_CZ.po | 4 ++--
po/de_DE.po | 2 +-
po/en_GB.po | 2 +-
po/en_US.po | 2 +-
po/es_ES.po | 2 +-
po/hi.po | 2 +-
po/hu_HU.po | 2 +-
po/id_ID.po | 2 +-
po/lt.po | 2 +-
po/nl_NL.po | 2 +-
po/pl_PL.po | 2 +-
po/powertop.pot | 2 +-
po/zh_CN.po | 2 +-
po/zh_TW.po | 4 ++--
src/cpu/cpu.cpp | 2 +-
17 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/po/bn_IN.po b/po/bn_IN.po
index 6bd0b34..b47682a 100644
--- a/po/bn_IN.po
+++ b/po/bn_IN.po
@@ -100,8 +100,8 @@ msgstr "cpu_idle ইভেন্ট কোনও অবস্থাষ় ফ
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
-msgstr "ক্ষমতা বা cpu_frequecny ইভেন্ট কোনও অবস্থাষ় ফিরে আসেনি?\n"
+msgid "power or cpu_frequency event returned no state?\n"
+msgstr "ক্ষমতা বা cpu_frequency ইভেন্ট কোনও অবস্থাষ় ফিরে আসেনি?\n"
#: src/cpu/cpu_linux.cpp:92
msgid "C0 polling"
diff --git a/po/ca.po b/po/ca.po
index b9088e1..cbd4dda 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -88,8 +88,8 @@ msgstr "l'event cpu_idle no ha retornat cap estat?\n"
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
-msgstr "els events power o cpu_frequecny no han retornat cap estat?\n"
+msgid "power or cpu_frequency event returned no state?\n"
+msgstr "els events power o cpu_frequency no han retornat cap estat?\n"
#: src/cpu/cpu_linux.cpp:92
msgid "C0 polling"
diff --git a/po/cs_CZ.po b/po/cs_CZ.po
index f27b538..7a0f28a 100644
--- a/po/cs_CZ.po
+++ b/po/cs_CZ.po
@@ -86,9 +86,9 @@ msgstr "cpu_idle událost nevrátila stav?\n"
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
-"power nebo cpu_frequecny událost nevrátila stav?\n"
+"power nebo cpu_frequency událost nevrátila stav?\n"
"\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/de_DE.po b/po/de_DE.po
index 1b95e96..3e3951f 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -87,7 +87,7 @@ msgstr ""
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/en_GB.po b/po/en_GB.po
index 37659a2..9b76958 100644
--- a/po/en_GB.po
+++ b/po/en_GB.po
@@ -86,7 +86,7 @@ msgstr ""
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/en_US.po b/po/en_US.po
index 812a78f..8e74ed8 100644
--- a/po/en_US.po
+++ b/po/en_US.po
@@ -86,7 +86,7 @@ msgstr ""
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/es_ES.po b/po/es_ES.po
index 49edcb1..f406e1d 100644
--- a/po/es_ES.po
+++ b/po/es_ES.po
@@ -85,7 +85,7 @@ msgstr ""
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/hi.po b/po/hi.po
index 9fa4b4a..39c7cb6 100644
--- a/po/hi.po
+++ b/po/hi.po
@@ -100,7 +100,7 @@ msgstr "cpu_idle की घटना ने किसी भी तरीके
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr "शक्ति या सीपीयू_आवृति की घटना ने किसी भी तरीके की स्थिति नहीं लोटायी है?\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 031cdf6..c0800d0 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -87,7 +87,7 @@ msgstr "a CPU üresjáratesemény nem adott vissza állapotot?\n"
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
"a teljesítmény vagy CPU frekvencia esemény nem adott vissza állapotot?\n"
diff --git a/po/id_ID.po b/po/id_ID.po
index 13b1c63..cb5b9e9 100644
--- a/po/id_ID.po
+++ b/po/id_ID.po
@@ -85,7 +85,7 @@ msgstr "kejadian cpu_idle tak mengembalikan keadaan?\n"
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr "kejadian power atau cpu_frequency tak mengembalikan keadaan?\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/lt.po b/po/lt.po
index e4f37be..86af0b8 100644
--- a/po/lt.po
+++ b/po/lt.po
@@ -100,7 +100,7 @@ msgstr "cpu_idle įvykis negrąžino būsenos?\\n"
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr "power arba cpu_frequency įvykis negrąžino būsenos?\\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/nl_NL.po b/po/nl_NL.po
index 59cbab8..16d48c8 100644
--- a/po/nl_NL.po
+++ b/po/nl_NL.po
@@ -86,7 +86,7 @@ msgstr ""
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/pl_PL.po b/po/pl_PL.po
index 8667a63..0b3cd71 100644
--- a/po/pl_PL.po
+++ b/po/pl_PL.po
@@ -101,7 +101,7 @@ msgstr ""
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr "zdarzenie power lub cpu_frequency zwróciło no state?\\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/powertop.pot b/po/powertop.pot
index d541baa..d668255 100644
--- a/po/powertop.pot
+++ b/po/powertop.pot
@@ -99,7 +99,7 @@ msgstr ""
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr ""
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 1deae42..07787f6 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
@@ -100,7 +100,7 @@ msgstr "CPU 空闲事件没有返回状态?\n"
#: src/cpu/cpu.cpp:787
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
+msgid "power or cpu_frequency event returned no state?\n"
msgstr "电量或者 CPU 频率事件没有返回状态?\n"
#: src/cpu/cpu_linux.cpp:92
diff --git a/po/zh_TW.po b/po/zh_TW.po
index c93ff67..cd4dd9f 100644
--- a/po/zh_TW.po
+++ b/po/zh_TW.po
@@ -85,8 +85,8 @@ msgstr "cpu_idle 事件沒有傳回狀態?\n"
#: src/cpu/cpu.cpp:940
#, c-format
-msgid "power or cpu_frequecny event returned no state?\n"
-msgstr "power 或 cpu_frequecny 事件沒有傳回狀態?\n"
+msgid "power or cpu_frequency event returned no state?\n"
+msgstr "power 或 cpu_frequency 事件沒有傳回狀態?\n"
#: src/cpu/cpu_linux.cpp:92
msgid "C0 polling"
diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp
index 401bade..6df6d1c 100644
--- a/src/cpu/cpu.cpp
+++ b/src/cpu/cpu.cpp
@@ -808,7 +808,7 @@ void perf_power_bundle::handle_trace_point(void *trace, int cpunr, uint64_t time
ret = pevent_get_field_val(NULL, event, "state", &rec, &val, 0);
if (ret < 0) {
- fprintf(stderr, _("power or cpu_frequecny event returned no state?\n"));
+ fprintf(stderr, _("power or cpu_frequency event returned no state?\n"));
exit(-1);
}
--
1.7.10.4
9 years, 6 months
[PATCH] csstoh.sh shell script fixes cross compiling issues
by Thomas Waldecker
From: Thomas Waldecker <thomas.waldecker(a)tqs.de>
Added the csstoh.sh shell script from Igor Zhbanov found here:
http://lists.01.org/pipermail/powertop/2012-July/000151.html
also patched the Makefile.am to use the csstoh.sh script.
The compiled csstoh binary doesn't work for cross compiling,
however Igors Patch never got applied upstream.
---
src/Makefile.am | 8 +++-----
src/csstoh.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 5 deletions(-)
create mode 100755 src/csstoh.sh
diff --git a/src/Makefile.am b/src/Makefile.am
index f60426a..a53d942 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,9 +1,6 @@
AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = -I ../m4
-noinst_PROGRAMS = csstoh
-csstoh_SOURCES = csstoh.c
-
sbin_PROGRAMS = powertop
nodist_powertop_SOURCES = css.h
@@ -48,6 +45,7 @@ AM_LDFLAGS = $(LIBS) $(NCURSES_LIBS) $(PCIUTILS_LIBS) $(LIBNL_LIBS) $(LIBZ_LIBS)
BUILT_SOURCES = css.h
CLEANFILES = css.h
-css.h: csstoh powertop.css
- ./csstoh "$(srcdir)"/powertop.css css.h
+css.h: powertop.css
+ chmod +x ./csstoh.sh
+ ./csstoh.sh "$(srcdir)"/powertop.css css.h
diff --git a/src/csstoh.sh b/src/csstoh.sh
new file mode 100755
index 0000000..5918d12
--- /dev/null
+++ b/src/csstoh.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# This program file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program in a file named COPYING; if not, write to the
+# Free Software Foundation, Inc,
+# 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301 USA
+# or just google for it.
+#
+# Written by Igor Zhbanov<i.zhbanov at samsung.com>
+
+
+if [ $# -lt 2 ]; then
+ echo "Usage: csstoh.sh cssfile header.h"
+ exit 1
+fi
+
+if [ ! -r $1 ]; then
+ echo "Can't find file $1"
+ exit 1
+fi
+
+if ! echo -n>$2; then
+ echo "Can't open file $2 for writing."
+ exit 1
+fi
+
+echo "#ifndef __INCLUDE_GUARD_CCS_H">> $2
+echo "#define __INCLUDE_GUARD_CCS_H">> $2
+echo>> $2
+echo "const char css[] = ">> $2
+
+sed -r 's/^(.*)$/\t\"\1\\n\"/' $1>> $2
+
+echo ";">> $2
+echo "#endif">> $2
--
1.7.9.5
9 years, 6 months