[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BUG: swap_activity broken in v20120322

From: Thomas Sattler
Subject: Re: BUG: swap_activity broken in v20120322
Date: Fri, 30 Mar 2012 10:41:16 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120312 Thunderbird/11.0

Hi Ole,

you did not (yet) comment the BUG, so I've had a closer look
at the reported issue:

 vmstat 1 2 2>/dev/null | tail -n1 | awk '{print $7*$8}' ||
   vm_stat 1 | head -n 3 | tail -n1 | awk '{print $9*$10}'

The idea seems to be "run 'vmstat' and run 'vm_stat' in case
'vmstat' failed". But in fact it is only *one* commandline
where 'vm_stat' is run in case *awk* failed.

The following commands demonstrate this:

 $ false | tail | true || date  # <-- date is not run
 $ true | tail | false || date  # <-- date is run
     \              \
      \__ vmstat     \__ awk

If somebody would reply with the output of 'vm_stat', I'd
offer a patch to fix the issue. (I don't have a MAC.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]