pcp
[Top] [All Lists]

Re: [pcp] Linux Swap Patch

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] Linux Swap Patch
From: Martins Innus <minnus@xxxxxxxxxxx>
Date: Tue, 05 Mar 2013 09:40:03 -0500
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1500834928.14491458.1362463817995.JavaMail.root@xxxxxxxxxx>
References: <1500834928.14491458.1362463817995.JavaMail.root@xxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0
Nathan,

On 3/5/13 1:10 AM, Nathan Scott wrote:
       I wasn't able to get the linux pmda to report any swap
       activity
without the attached patch.  Not sure if this is the right way
...
I see the problem.  FWIW, there is a workaround as follows - before
running pmval, if you issue "pminfo -f mem.vmstat >/dev/null" it'll
work correctly.

The problem is to do with the logic handling the move of swap metric
values from /proc/stat to /proc/vmstat early on in the life of 2.6.
If the mem.vmstat values are not queried any time before requesting
swap.* values, the test has not been evaluated and incorrect choices
are made in the code as you've observed.

So, your patch was using a good strategy.  I've committed it, and
then made the minor tweak I suggested (using access(2)) and moved
the check in with the rest of the /proc/vmstat code.

Thanks!  This will be in pcp-3.6.11, which we're expecting will be
done and dusted by the end of this week.

Perfect, thanks!

Martins

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