Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

turbostat tool update for Linux-3.8

20 views
Skip to first unread message

Len Brown

unread,
Nov 14, 2012, 3:43:39 PM11/14/12
to linu...@vger.kernel.org, linux-...@vger.kernel.org
Here are some turbostat patches I have staged.
The 1st two I've requested be pulled into 3.7,
the rest are for 3.8

The final patch allows turbostat to print Watts
as measured by hardware RAPL counters -- something
that people have been asking for.

Please let me know if you see troubles with any of these patches.

thanks,
Len Brown, Intel Open Source Technology Center

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Len Brown

unread,
Nov 14, 2012, 3:45:52 PM11/14/12
to linu...@vger.kernel.org, linux-...@vger.kernel.org, Len Brown
From: Len Brown <len....@intel.com>

Fix regression caused by commit 8e180f3cb6b7510a3bdf14e16ce87c9f5d86f102
(tools/power turbostat: add [-d MSR#][-D MSR#] options to print counter
deltas)

Signed-off-by: Len Brown <len....@intel.com>
---
tools/power/x86/turbostat/turbostat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index 2655ae9..9942dee 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -1594,7 +1594,7 @@ void cmdline(int argc, char **argv)

progname = argv[0];

- while ((opt = getopt(argc, argv, "+pPSvisc:sC:m:M:")) != -1) {
+ while ((opt = getopt(argc, argv, "+pPSvi:sc:sC:m:M:")) != -1) {
switch (opt) {
case 'p':
show_core_only++;
--
1.8.0

Betty Dall

unread,
Nov 15, 2012, 3:59:51 PM11/15/12
to Len Brown, linu...@vger.kernel.org, linux-...@vger.kernel.org, Len Brown
On Wed, 2012-11-14 at 15:43 -0500, Len Brown wrote:
> From: Len Brown <len....@intel.com>
..

> @@ -1644,7 +1967,7 @@ int main(int argc, char **argv)
> cmdline(argc, argv);
>
> if (verbose > 1)
> - fprintf(stderr, "turbostat v2.1 October 6, 2012"
> + fprintf(stderr, "turbostat v3.0 November 14, 2012"
> " - Len Brown <le...@kernel.org>\n");
>
> turbostat_init();

I applied these 7 patches in order to a the upstream kernel and this
last hunk was rejected:

$ cat turbostat.c.rej
--- tools/power/x86/turbostat/turbostat.c
+++ tools/power/x86/turbostat/turbostat.c
@@ -1967,7 +2290,7 @@
cmdline(argc, argv);

if (verbose > 1)
- fprintf(stderr, "turbostat v2.1 October 6, 2012"
+ fprintf(stderr, "turbostat v3.0 November 14, 2012"
" - Len Brown <lenb@xxxxxxxxxx>\n");

turbostat_init();


-Betty

Betty Dall

unread,
Nov 15, 2012, 4:54:55 PM11/15/12
to Len Brown, linu...@vger.kernel.org, linux-...@vger.kernel.org
On Wed, 2012-11-14 at 15:43 -0500, Len Brown wrote:
> Here are some turbostat patches I have staged.
> The 1st two I've requested be pulled into 3.7,
> the rest are for 3.8
>
> The final patch allows turbostat to print Watts
> as measured by hardware RAPL counters -- something
> that people have been asking for.
>
> Please let me know if you see troubles with any of these patches.

Hi Len,

I tested out these patches on an IvyBridge system and see the new Watts
fields. They look like reasonable numbers to me. I ran with the system
idle and then with lookbusy -c 50 and saw the Watts increase. Is there
anything else to do to validate the numbers? In one case I saw that the
Pkg_W for the system was off by .01, e.g. socket 0 was 28.33 and socket
1 was 29.74 and the system total was 58.08 instead of 58.07. That is
probably fine and just rounding up.

-Betty

Len Brown

unread,
Dec 17, 2012, 1:34:43 PM12/17/12
to Betty Dall, linu...@vger.kernel.org, linux-...@vger.kernel.org
On 11/15/2012 03:37 PM, Betty Dall wrote:
> On Wed, 2012-11-14 at 15:43 -0500, Len Brown wrote:
>> Here are some turbostat patches I have staged.
>> The 1st two I've requested be pulled into 3.7,
>> the rest are for 3.8
>>
>> The final patch allows turbostat to print Watts
>> as measured by hardware RAPL counters -- something
>> that people have been asking for.
>>
>> Please let me know if you see troubles with any of these patches.
>
> Hi Len,
>
> I tested out these patches on an IvyBridge system and see the new Watts
> fields. They look like reasonable numbers to me. I ran with the system
> idle and then with lookbusy -c 50 and saw the Watts increase. Is there
> anything else to do to validate the numbers? In one case I saw that the
> Pkg_W for the system was off by .01, e.g. socket 0 was 28.33 and socket
> 1 was 29.74 and the system total was 58.08 instead of 58.07. That is
> probably fine and just rounding up.

This is likely a result of printf truncation.
note that these numbers are added internally w/o that truncation,
and then their sum is printed.

If the total system power is what you're looking for, note that
you need to calibrate these numbers vs an external A/C watt meter.
eg. add a base Watts to idle -- which covers things like fans
and fixed power supply loss, then use a coefficient on the counter
to handle factors such as power conversion loss, which tend to be
somewhat linear with load.

With constant temperature, I've found this trivial curve fitting
to be remarkably accurate.

eg. on a dual SNB Xeon box I have...

45 Watts + 1.25 * RAPL-Watt-Meter = System A/C watts
within a couple %.

cheers,
-Len
0 new messages