mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
Fixed: bug #36151: swap_activity broken in v20120322. Passes testsuite.
This commit is contained in:
parent
457320998f
commit
463ec5bc0b
10
src/parallel
10
src/parallel
|
@ -537,7 +537,7 @@ sub get_options_from_array {
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
# Defaults:
|
# Defaults:
|
||||||
$Global::version = 20120420;
|
$Global::version = 20120421;
|
||||||
$Global::progname = 'parallel';
|
$Global::progname = 'parallel';
|
||||||
$Global::infinity = 2**31;
|
$Global::infinity = 2**31;
|
||||||
$Global::debug = 0;
|
$Global::debug = 0;
|
||||||
|
@ -2155,9 +2155,11 @@ sub swap_activity {
|
||||||
-e $ENV{'HOME'}."/.parallel" or mkdir $ENV{'HOME'}."/.parallel";
|
-e $ENV{'HOME'}."/.parallel" or mkdir $ENV{'HOME'}."/.parallel";
|
||||||
-e $ENV{'HOME'}."/.parallel/tmp" or mkdir $ENV{'HOME'}."/.parallel/tmp";
|
-e $ENV{'HOME'}."/.parallel/tmp" or mkdir $ENV{'HOME'}."/.parallel/tmp";
|
||||||
my $swap_activity;
|
my $swap_activity;
|
||||||
$swap_activity = ("vmstat 1 2 2>/dev/null | tail -n1 | awk '{print \$7*\$8}' || ".
|
# If the (remote) machine is Mac we should use vm_stat
|
||||||
# If the (remote) machine is Mac and the above fails, try this:
|
# swap_in and swap_out on GNU/Linux is $7 and $8
|
||||||
"vm_stat 1 | head -n 3 | tail -n1 | awk '{print \$9*\$10}'");
|
# swap_in and swap_out on Mac is $10 and $11
|
||||||
|
$swap_activity = q[ { vmstat 1 2> /dev/null || vm_stat 1; } | ].
|
||||||
|
q[ awk 'NR!=4{next} NF==16{print $7*$8} NF==11{print $10*$11} {exit}' ];
|
||||||
if($self->{'string'} ne ":") {
|
if($self->{'string'} ne ":") {
|
||||||
$swap_activity = $self->sshcommand() . " " . $self->serverlogin() . " " .
|
$swap_activity = $self->sshcommand() . " " . $self->serverlogin() . " " .
|
||||||
::shell_quote_scalar($swap_activity);
|
::shell_quote_scalar($swap_activity);
|
||||||
|
|
|
@ -13,6 +13,7 @@ testsuite: ../src/parallel tests-to-run/* wanted-results/* startdb
|
||||||
niceload true || (echo niceload is required for testsuite; /bin/false)
|
niceload true || (echo niceload is required for testsuite; /bin/false)
|
||||||
which burnP6 || (echo burnP6 is required for testsuite; /bin/false)
|
which burnP6 || (echo burnP6 is required for testsuite; /bin/false)
|
||||||
which timeout || (echo timeout is required for testsuite; /bin/false)
|
which timeout || (echo timeout is required for testsuite; /bin/false)
|
||||||
|
parallel ssh parallel@parallel-server{} parallel --minversion 20100101 ::: 1 2 3 || (echo parallel on remote required for testsuite; /bin/false)
|
||||||
time sh Start.sh
|
time sh Start.sh
|
||||||
date
|
date
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
### Test of --retries - it should run 13 jobs in total
|
### Test of --retries - it should run 13 jobs in total
|
||||||
13
|
12
|
||||||
### Test of --retries - it should run 25 jobs in total
|
### Test of --retries - it should run 25 jobs in total
|
||||||
25
|
24
|
||||||
### Test of --retries - it should run 49 jobs in total
|
### Test of --retries - it should run 49 jobs in total
|
||||||
49
|
48
|
||||||
### Bug with --retries
|
### Bug with --retries
|
||||||
8
|
8
|
||||||
8
|
8
|
||||||
|
|
|
@ -51,11 +51,11 @@
|
||||||
3
|
3
|
||||||
### Test --nonall
|
### Test --nonall
|
||||||
vm1
|
vm1
|
||||||
vm10
|
vm11
|
||||||
### Test --nonall -u
|
### Test --nonall -u
|
||||||
vm10
|
vm11
|
||||||
vm1
|
vm1
|
||||||
vm10
|
vm11
|
||||||
vm1
|
vm1
|
||||||
### Test read sshloginfile from STDIN
|
### Test read sshloginfile from STDIN
|
||||||
vm1
|
vm1
|
||||||
|
|
Loading…
Reference in a new issue