On Fri, Mar 30, 2012 at 4:46 PM, Thomas Sattler
<[email protected]> wrote:

>>> P.S.: Why do we use 'awk' within 'perl'?
>>
>> Because it runs on the remote machine, and `awk` has less
>> overhead than `perl`.  (Though since it's waiting for at
>> least 1 second to gather stats, it may not be a
>> significant overhead.)
>
> Perl is not my prefered language so I might be wrong with the
> following, but I thought that sub "swap_activity" used 'qx'
> to execute "$swap_activity" on the local machine.
>
> Reading the code again I see something I ignored last time:
> 'qx' spawns a background process to get (and save!) these
> information. At first I thought it would read them back
> into 'parallel'.

The reason for this is that Parallel should not wait for the load to
be computed, if it for some reason takes a lot of time. So instead it
will spawn off a process to do this and read the output back next
time.


/Ole

Reply via email to