[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU Parallel Bug Reports Problems with --memfree option
From: |
Andreas Bernauer |
Subject: |
Re: GNU Parallel Bug Reports Problems with --memfree option |
Date: |
Thu, 13 Aug 2015 11:06:22 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
Good find!
Looks as if --memfree should parse /proc/meminfo directly (instead of
the output of 'free', which parses /proc/meminfo). The meminfo format
looks easily grepable.
Further, I'm wondering why parallel is grepping the buffers/cache line
instead of the 'free' column...
-Andreas
On 13/08/15 10:03, Martin Møller Skarbiniks Pedersen wrote:
> I can confirm this bug on Fedora 22 (Linux).
> $ lsb_release -d
> Description:Fedora release 22 (Twenty Two)
>
> The output from free on this machine is:
>
> $ free
> total used free shared buff/cache
> available
> Mem: 8093376 4613684 222132 291592 3257560
> 2885712
> Swap: 0 0 0
>
> And that is not the expected format:
>
> I think the problem is line 4183:
>
> 4173: sub memfreescript {
> 4174:# Returns:
> 4175:# shellscript for giving available memory in bytes
> 4176:if(not $script) {
> 4177: my %script_of = (
> 4178:# $ free
> 4179:# total used free shared buffers
> cached
> 4180:# Mem: 8075152 4922780 3152372 338856 233356
> 1658604
> 4181:# -/+ buffers/cache: 3030820 5044332
> 4182:# Swap: 8286204 116924 8169280
> 4183:"linux" => q{ print (1024*((grep /buffers.cache/, `free`)[0] =~
> /buffers.cache:\s+\S+\s+(\S+)/)[0]) },
>
>
> Regards
> Martin M. S. Pedersen
>
>