pcp
[Top] [All Lists]

Re: [pcp] Linux Swap Patch

To: Martins Innus <minnus@xxxxxxxxxxx>
Subject: Re: [pcp] Linux Swap Patch
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Tue, 5 Mar 2013 01:10:18 -0500 (EST)
Cc: PCP <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1965708587.14399506.1362436213532.JavaMail.root@xxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>

----- Original Message -----
> ----- Original Message -----
> > Nathan,
> > 
> > On 3/4/13 3:40 PM, 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.

cheers.

--
Nathan

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