pcp
[Top] [All Lists]

Re: [pcp] qa/842 failing on Mac OS X ... wrong values from pmiostat

To: pcp@xxxxxxxxxxx
Subject: Re: [pcp] qa/842 failing on Mac OS X ... wrong values from pmiostat
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Thu, 17 Mar 2016 09:38:21 +1100
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <56E9D72E.8090200@xxxxxxxxxxxxxxxx>
References: <56E9D72E.8090200@xxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
On 03/17/2016 08:59 AM, Ken McDonell wrote:
...

and on Mac OS X

fuji:archives kenj$ pmiostat -t 1 -a dm-io -xt,h | head -8
Fri Aug  1 14:34:51 2014 sda              0.0     0.0    0.0    0.0      0.0    
  0.0     0.00     0.00     0.0     0.0     0.0   0.0
Fri Aug  1 14:34:51 2014 sdb              0.0     0.0    5.0    6.0     24.0    
  8.0     2.91     0.00     0.4     0.4     0.3   0.4
Fri Aug  1 14:34:52 2014 sda              0.0     0.0    0.0    0.0      0.2    
  0.0    34.00     0.00     9.6     9.6     0.0   0.0
Fri Aug  1 14:34:52 2014 sdb              0.0     0.0    0.3    0.0     12.4    
  0.0    40.65     0.00     0.9     0.9     0.2   0.0
Fri Aug  1 14:34:53 2014 sda                ?       ?      ?      ?        ?    
    ?        ?        ?       ?       ?       ?     ?
Fri Aug  1 14:34:53 2014 sdb                ?       ?      ?      ?        ?    
    ?        ?        ?       ?       ?       ?     ?

pmiostat prints "NODATA" for the instance along with a row of '?' if there is 
no data. So we have data.
If we have data, but any one of the columns is negative, i.e. counter went 
backwards or timestamp
went backwards, then it prints the instance and a row of '?' .. which is what 
we're getting.

Fri Aug  1 14:34:54 2014 sda              0.0     1.0    8.0   11.0   1048.0    
279.0    69.84     0.13     6.7    11.5     3.2   7.2
Fri Aug  1 14:34:54 2014 sdb              1.0     0.0  935.0   11.0  12795.0    
107.0    13.64     0.93     1.0     0.6    33.2  55.6
fuji:archives kenj$

There are no <mark> records in this archive and the data looks good in the time 
region in question ...

14:34:52.350  60.0.4 (disk.dev.read):
                 inst [0 or "sda"] value 15954
                 inst [1 or "sdb"] value 28066

14:34:53.443  60.0.4 (disk.dev.read):
                 inst [0 or "sda"] value 15960
                 inst [1 or "sdb"] value 30177

14:34:54.956  60.0.4 (disk.dev.read):
                 inst [0 or "sda"] value 15974
                 inst [1 or "sdb"] value 31224

Hard to see how this is a QA problem, so looks like a real code issue here ... 
another problem delivered on the cart labeled Python?


The above values reported by pmdumplog all look good. I tested the recipe on 
f23/x86 and it's fine too.
Must be something on MAC/OSX - perhaps timestamp precision or something? As 
part of the rate conversion,
we use the following to get the time delta :

    def timeStampDelta(self, group):
        c = 1000000.0 * group.timestamp.tv_sec + group.timestamp.tv_usec
        p = 1000000.0 * group.prevTimestamp.tv_sec + group.prevTimestamp.tv_usec
        return (c - p) / 1000000.0

I guess if any of those operands are int rather than long, then it could 
overflow?
I don't have a MAC, but can you print the timestamp just after it's calculated
in the above function, before returning.

Regards
-- Mark




<Prev in Thread] Current Thread [Next in Thread>