sar -m CPU returns 0 and interval is invalid

Bug #1680705 reported by bugproxy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
Undecided
Unassigned
sysstat (Ubuntu)
Fix Released
Undecided
Taco Screen team

Bug Description

== Comment: #0 - SEETEENA THOUFEEK <email address hidden> - 2017-04-07 00:44:28 ==
+++ This bug was initially created as a clone of Bug #140363 +++

=========
Issue
=========

'sar -m CPU <interval> <count>' command does not return valid CPU FREQ values on powerkvm. I have the result pasted below captured on powerkvm vs x86 fedora system.

On PowerKVM:

[root@c158f2u07os ~]# sar -m CPU 1 5
Linux 4.4.4-1.el7_1.pkvm3_1_1.1200.0.ppc64le (c158f2u07os.pok.stglabs.ibm.com) 06/17/2016 _ppc64le_ (160 CPU)

06:30:28 AM CPU MHz
06:30:36 AM all 0.00
06:30:44 AM all 0.00
06:30:53 AM all 0.00
06:31:01 AM all 0.00
06:31:09 AM all 0.00
Average: all 0.00

>>Though I have given 1 sec interval, the real interval seems to be different as shown above. And FREQ MHz is shown 0.

Same run on fedora x86 server:
[srikanth@bssrikanth-tp ~]$ sar -m CPU 1 5
Linux 4.3.4-300.fc23.x86_64 04/15/2016 _x86_64_ (4 CPU)

12:08:47 PM CPU MHz
12:08:48 PM all 1793.18
12:08:49 PM all 2214.71
12:08:50 PM all 2170.32
12:08:51 PM all 1758.41
12:08:52 PM all 2444.70
Average: all 2076.26

This is the commit id:

commit 93662b1dbe3eed926d67d418cd4996ede9686679
Author: Breno Leitao <email address hidden>
Date: Mon Oct 31 09:23:59 2016 -0400

    sar: Improve cpuinfo read for POWER architecture

    Currently CPU frequency is not being read properly on POWER archicture.
    It shows the frequency as:
      # sar -m CPU 1 5
    ...
      06:30:28 AM CPU MHz
      06:30:36 AM all 0.00

    This is caused because /proc/cpuinfo is differently between Intel and
    POWER.
    This patch simply fix the parsing function (read_cpuinfo).

    Signed-off-by: Breno Leitao <email address hidden>

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-153240 severity-medium targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Taco Screen team (taco-screen-team)
affects: ubuntu → sysstat (Ubuntu)
Revision history for this message
Michael Hohnbaum (hohnbaum) wrote : Re: [Bug 1680705] [NEW] sar -m CPU returns 0 and interval is invalid

Jon,

A patch for the Server team to evaluate.

                      Michael

On 04/06/2017 10:59 PM, Launchpad Bug Tracker wrote:
> bugproxy (bugproxy) has assigned this bug to you for Ubuntu:
>
> == Comment: #0 - SEETEENA THOUFEEK <email address hidden> - 2017-04-07 00:44:28 ==
> +++ This bug was initially created as a clone of Bug #140363 +++
>
>
> =========
> Issue
> =========
>
> 'sar -m CPU <interval> <count>' command does not return valid CPU FREQ
> values on powerkvm. I have the result pasted below captured on powerkvm
> vs x86 fedora system.
>
>
> On PowerKVM:
>
> [root@c158f2u07os ~]# sar -m CPU 1 5
> Linux 4.4.4-1.el7_1.pkvm3_1_1.1200.0.ppc64le (c158f2u07os.pok.stglabs.ibm.com) 06/17/2016 _ppc64le_ (160 CPU)
>
> 06:30:28 AM CPU MHz
> 06:30:36 AM all 0.00
> 06:30:44 AM all 0.00
> 06:30:53 AM all 0.00
> 06:31:01 AM all 0.00
> 06:31:09 AM all 0.00
> Average: all 0.00
>
>>> Though I have given 1 sec interval, the real interval seems to be
> different as shown above. And FREQ MHz is shown 0.
>
> Same run on fedora x86 server:
> [srikanth@bssrikanth-tp ~]$ sar -m CPU 1 5
> Linux 4.3.4-300.fc23.x86_64 04/15/2016 _x86_64_ (4 CPU)
>
> 12:08:47 PM CPU MHz
> 12:08:48 PM all 1793.18
> 12:08:49 PM all 2214.71
> 12:08:50 PM all 2170.32
> 12:08:51 PM all 1758.41
> 12:08:52 PM all 2444.70
> Average: all 2076.26
>
> This is the commit id:
>
> commit 93662b1dbe3eed926d67d418cd4996ede9686679
> Author: Breno Leitao <email address hidden>
> Date: Mon Oct 31 09:23:59 2016 -0400
>
> sar: Improve cpuinfo read for POWER architecture
>
> Currently CPU frequency is not being read properly on POWER archicture.
> It shows the frequency as:
> # sar -m CPU 1 5
> ...
> 06:30:28 AM CPU MHz
> 06:30:36 AM all 0.00
>
> This is caused because /proc/cpuinfo is differently between Intel and
> POWER.
> This patch simply fix the parsing function (read_cpuinfo).
>
> Signed-off-by: Breno Leitao <email address hidden>
>
> ** Affects: ubuntu
> Importance: Undecided
> Assignee: Taco Screen team (taco-screen-team)
> Status: New
>
>
> ** Tags: architecture-ppc64le bugnameltc-153240 severity-medium targetmilestone-inin---

--
Michael Hohnbaum
OIL Program Manager
Power (ppc64el) Development Project Manager
Canonical, Ltd.

Revision history for this message
Robert Luberda (robert-debian) wrote :

What version of sysstat does this bug refers to?

The commit 93662b1dbe3eed926d67d418cd4996ede9686679 mentioned in the bug report is part of systat 11.4.2, and Ubuntu has 11.4.3-1 already...

Manoj Iyer (manjo)
Changed in sysstat (Ubuntu):
status: New → Incomplete
Changed in ubuntu-power-systems:
status: New → Incomplete
Revision history for this message
Manoj Iyer (manjo) wrote :

Please retest with sysstat version 11.4.3-1 and report back here if the bug still exists.

Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla

------- Comment From <email address hidden> 2017-05-10 00:50 EDT-------
Sorry I was stuck in other bugs and not able to verify this.

root@ubuntu:dpkg -l sysstat*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii sysstat 11.4.3-1 ppc64el system performance tools for Linu
root@ubuntu:# sar -m CPU 1 5
Linux 4.10.1 (ubuntu) 05/10/2017 _ppc64le_ (2 CPU)

12:46:30 AM CPU MHz
12:46:31 AM all 3425.00
12:46:32 AM all 3425.00
12:46:33 AM all 3425.00
12:46:34 AM all 3425.00
12:46:35 AM all 3425.00
Average: all 3425.00
root@ubuntu:~/bug_data/151438/zesty/fs/jfs#

Tested and resolved in 11.4.3-1 package. .

Manoj Iyer (manjo)
tags: added: ubuntu-17.04
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

"Tested and resolved in 11.4.3-1 package. ." which is in zesty already.
Does this affect earlier releases that it needs to be considered for SRUs?

Changed in sysstat (Ubuntu):
status: Incomplete → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: Incomplete → Fix Released
Revision history for this message
bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2017-06-02 08:44 EDT-------
Hi,

> Does this affect earlier releases that it needs to be considered for SRUs?

I don't think so. Thanks for fixing it on zesty.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.