pcp
[Top] [All Lists]

Re: [pcp] pmiostat qa failures

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] pmiostat qa failures
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Mon, 08 Sep 2014 18:00:25 +1000
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <540D3DE3.9010502@xxxxxxxxx>
References: <540D316D.7060400@xxxxxxxxxxxxxxxx> <540D3413.50309@xxxxxxxxx> <540D3871.80201@xxxxxxxxxxxxxxxx> <540D3DE3.9010502@xxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0
On 09/08/2014 03:25 PM, Mark Goodwin wrote:
On 09/08/2014 03:02 PM, Ken McDonell wrote:
Host      bo bl gr 00 01 02 03 04 05 07 10 11 12 14 18 19 20 21 22 23 24
842  48%     X        X  X     X  X        X  X              X     X  X  842
python


the failures all seem to be 32bit platforms, though not all 32bit
platforms failed. I'll set up 32bit RHEL65 in a VM and investigate.

The qa test is checking various pmiostat fields against pmval for the
same metric and archive, with various update intervals. The output
from pmiostat (python code) seems to be correct and is the same on
both 32bit and 64bit platforms. I checked the raw values:
the correct value is 0.05 = (7504 - 7503) / 20.00 which will be
printed as 0.1 when rounded to 1 decimal place.

However there seems to be a bug in pmval or maybe in glibc:

Here's pmval on RHEL65/i386 (32bit) :

(gdb) run -t 20 -a archives/dm-io -f 1 disk.dev.read_merge'[sda]'
...
Breakpoint 2, printreal (v=0.049999999799474608, minwidth=21) at pmval.c:456

Whereas here's pmval on f19/x86_64 (64bit) :
...
Breakpoint 1, printreal (v=0.050000000000000003, minwidth=21) at pmval.c:456

Both are wrong! - as checked above, the correct value is 0.05. I'm not
sure if it's a bug in the raw values or the time delta, but the rate
converted value passed into pmval::printreal() is wrong.

454     void
455     printreal(double v, int minwidth)
456     {
...
473         if (fixed != -1) {
474             printf("%*.*f", minwidth, fixed, v);
475         }

So with fixed==1, the 32bit pmval prints 0.0 (rounded down) and
on the 64bit platform it prints 0.1 which happens to be correct.

-- Mark

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