mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel.pod: Example of --tag with uptime
This commit is contained in:
parent
5c92569669
commit
50edcdd38d
20
configure
vendored
20
configure
vendored
|
@ -1,6 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.68 for parallel 20110822.
|
# Generated by GNU Autoconf 2.68 for parallel 20111010.
|
||||||
#
|
#
|
||||||
# Report bugs to <bug-parallel@gnu.org>.
|
# Report bugs to <bug-parallel@gnu.org>.
|
||||||
#
|
#
|
||||||
|
@ -559,8 +559,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='parallel'
|
PACKAGE_NAME='parallel'
|
||||||
PACKAGE_TARNAME='parallel'
|
PACKAGE_TARNAME='parallel'
|
||||||
PACKAGE_VERSION='20110822'
|
PACKAGE_VERSION='20111010'
|
||||||
PACKAGE_STRING='parallel 20110822'
|
PACKAGE_STRING='parallel 20111010'
|
||||||
PACKAGE_BUGREPORT='bug-parallel@gnu.org'
|
PACKAGE_BUGREPORT='bug-parallel@gnu.org'
|
||||||
PACKAGE_URL=''
|
PACKAGE_URL=''
|
||||||
|
|
||||||
|
@ -1176,7 +1176,7 @@ if test "$ac_init_help" = "long"; then
|
||||||
# Omit some internal or obsolete options to make the list less imposing.
|
# Omit some internal or obsolete options to make the list less imposing.
|
||||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures parallel 20110822 to adapt to many kinds of systems.
|
\`configure' configures parallel 20111010 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
@ -1242,7 +1242,7 @@ fi
|
||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of parallel 20110822:";;
|
short | recursive ) echo "Configuration of parallel 20111010:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
@ -1309,7 +1309,7 @@ fi
|
||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
parallel configure 20110822
|
parallel configure 20111010
|
||||||
generated by GNU Autoconf 2.68
|
generated by GNU Autoconf 2.68
|
||||||
|
|
||||||
Copyright (C) 2010 Free Software Foundation, Inc.
|
Copyright (C) 2010 Free Software Foundation, Inc.
|
||||||
|
@ -1326,7 +1326,7 @@ cat >config.log <<_ACEOF
|
||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by parallel $as_me 20110822, which was
|
It was created by parallel $as_me 20111010, which was
|
||||||
generated by GNU Autoconf 2.68. Invocation command line was
|
generated by GNU Autoconf 2.68. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
@ -2141,7 +2141,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='parallel'
|
PACKAGE='parallel'
|
||||||
VERSION='20110822'
|
VERSION='20111010'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
@ -2704,7 +2704,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||||
# report actual input values of CONFIG_FILES etc. instead of their
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by parallel $as_me 20110822, which was
|
This file was extended by parallel $as_me 20111010, which was
|
||||||
generated by GNU Autoconf 2.68. Invocation command line was
|
generated by GNU Autoconf 2.68. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
@ -2766,7 +2766,7 @@ _ACEOF
|
||||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
parallel config.status 20110822
|
parallel config.status 20111010
|
||||||
configured by $0, generated by GNU Autoconf 2.68,
|
configured by $0, generated by GNU Autoconf 2.68,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
AC_INIT([parallel], [20110822], [bug-parallel@gnu.org])
|
AC_INIT([parallel], [20111010], [bug-parallel@gnu.org])
|
||||||
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
||||||
AC_CONFIG_HEADERS([config.h])
|
AC_CONFIG_HEADERS([config.h])
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
|
|
|
@ -256,7 +256,7 @@ parallel convert -resize {3} -quality {2} {1} {1.}_{3}_q{2}.jpg :::: - ::: 25 50
|
||||||
# Thank you for watching
|
# Thank you for watching
|
||||||
#
|
#
|
||||||
# If you like GNU Parallel:
|
# If you like GNU Parallel:
|
||||||
# * Post this video on forums/blogs/Identi.ca/Google+/Twitter/Facebook/Linkedin
|
# * Post this video on Reddit/forums/blogs/Identi.ca/Google+/Twitter/Facebook/Linkedin
|
||||||
# * Join the mailing list http://lists.gnu.org/mailman/listinfo/parallel
|
# * Join the mailing list http://lists.gnu.org/mailman/listinfo/parallel
|
||||||
# * Request or write a review for your favourite blog or magazine
|
# * Request or write a review for your favourite blog or magazine
|
||||||
# * Request or build a package for your favourite distribution
|
# * Request or build a package for your favourite distribution
|
||||||
|
|
|
@ -195,16 +195,31 @@ do {
|
||||||
$target = (time - $start_time)*int($per_second);
|
$target = (time - $start_time)*int($per_second);
|
||||||
$this_round = $target - my_memory_usage();
|
$this_round = $target - my_memory_usage();
|
||||||
if($this_round > 0) {
|
if($this_round > 0) {
|
||||||
my $a = "x"x(rand($this_round*3));
|
my $this_size = min(rand($this_round*3), $target_max-$memusage);
|
||||||
|
my $a = "x"x$this_size;
|
||||||
push @a,$a;
|
push @a,$a;
|
||||||
} else {
|
} else {
|
||||||
pop @a;
|
pop @a;
|
||||||
}
|
}
|
||||||
debug("memusage $memusage target $target this_round $this_round target_max $target_max\n");
|
debug("$#a memusage $memusage target $target this_round $this_round target_max $target_max\n");
|
||||||
usleep(500);
|
usleep(500);
|
||||||
} while($memusage < $target_max);
|
} while($memusage < $target_max);
|
||||||
|
|
||||||
|
|
||||||
|
sub min {
|
||||||
|
# Returns:
|
||||||
|
# Minimum value of array
|
||||||
|
my $min;
|
||||||
|
for (@_) {
|
||||||
|
# Skip undefs
|
||||||
|
defined $_ or next;
|
||||||
|
defined $min or do { $min = $_; next; }; # Set $_ to the first non-undef
|
||||||
|
$min = ($min < $_) ? $min : $_;
|
||||||
|
}
|
||||||
|
return $min;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
sub debug {
|
sub debug {
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
$Global::debug or return;
|
$Global::debug or return;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
use strict;
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
$Global::progname="niceload";
|
$Global::progname="niceload";
|
||||||
$Global::version = 20110822;
|
$Global::version = 20111010;
|
||||||
Getopt::Long::Configure("bundling","require_order");
|
Getopt::Long::Configure("bundling","require_order");
|
||||||
get_options_from_array(\@ARGV) || die_usage();
|
get_options_from_array(\@ARGV) || die_usage();
|
||||||
if($::opt_version) {
|
if($::opt_version) {
|
||||||
|
|
|
@ -496,7 +496,7 @@ sub get_options_from_array {
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
# Defaults:
|
# Defaults:
|
||||||
$Global::version = 20111003;
|
$Global::version = 20111010;
|
||||||
$Global::progname = 'parallel';
|
$Global::progname = 'parallel';
|
||||||
$Global::infinity = 2**31;
|
$Global::infinity = 2**31;
|
||||||
$Global::debug = 0;
|
$Global::debug = 0;
|
||||||
|
|
|
@ -1716,6 +1716,10 @@ that more visible:
|
||||||
|
|
||||||
B<parallel --tag traceroute ::: foss.org.my debian.org freenetproject.org>
|
B<parallel --tag traceroute ::: foss.org.my debian.org freenetproject.org>
|
||||||
|
|
||||||
|
Check the uptime of the servers in I<~/.parallel/sshloginfile>:
|
||||||
|
|
||||||
|
B<parallel --tag -S .. --nonall uptime>
|
||||||
|
|
||||||
|
|
||||||
=head1 EXAMPLE: Keep order of output same as order of input
|
=head1 EXAMPLE: Keep order of output same as order of input
|
||||||
|
|
||||||
|
|
2
src/sql
2
src/sql
|
@ -551,7 +551,7 @@ $Global::Initfile && unlink $Global::Initfile;
|
||||||
exit ($err);
|
exit ($err);
|
||||||
|
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
$Global::version = 20110822;
|
$Global::version = 20111010;
|
||||||
$Global::progname = 'sql';
|
$Global::progname = 'sql';
|
||||||
|
|
||||||
# This must be done first as this may exec myself
|
# This must be done first as this may exec myself
|
||||||
|
|
|
@ -287,8 +287,8 @@ line 2
|
||||||
### Test --no-run-if-empty and -r: This should give no output
|
### Test --no-run-if-empty and -r: This should give no output
|
||||||
### Test --help and -h: Help output (just check we get the same amount of lines)
|
### Test --help and -h: Help output (just check we get the same amount of lines)
|
||||||
Output from -h and --help
|
Output from -h and --help
|
||||||
22
|
27
|
||||||
22
|
27
|
||||||
### Test --version: Version output (just check we get the same amount of lines)
|
### Test --version: Version output (just check we get the same amount of lines)
|
||||||
12
|
12
|
||||||
### Test --verbose and -t
|
### Test --verbose and -t
|
||||||
|
|
Loading…
Reference in a new issue