niceload: --verbose output to STDERR.

This commit is contained in:
Ole Tange 2014-03-21 22:39:54 +01:00
parent 040586e172
commit a3f11158b5
6 changed files with 44 additions and 58 deletions

28
README
View file

@ -30,7 +30,7 @@ The 10 seconds installation will try do to a full installation; if
that fails, a personal installation; if that fails, a minimal that fails, a personal installation; if that fails, a minimal
installation. installation.
(wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash (wget -O - pi.dk/3 || curl pi.dk/3/ || fetch -o - http://pi.dk/3) | bash
This will literally install faster than reading the rest of this This will literally install faster than reading the rest of this
document. document.
@ -40,10 +40,10 @@ document.
Full installation of GNU Parallel is as simple as: Full installation of GNU Parallel is as simple as:
wget http://ftpmirror.gnu.org/parallel/parallel-20140222.tar.bz2 wget http://ftpmirror.gnu.org/parallel/parallel-20140222.tar.bz2
bzip2 -dc parallel-20140222.tar.bz2 | tar xvf - bzip2 -dc parallel-20140222.tar.bz2 | tar xvf -
cd parallel-20140222 cd parallel-20140222
./configure && make && make install ./configure && make && make install
= Personal installation = = Personal installation =
@ -51,10 +51,10 @@ Full installation of GNU Parallel is as simple as:
If you are not root you can add ~/bin to your path and install in If you are not root you can add ~/bin to your path and install in
~/bin and ~/share: ~/bin and ~/share:
wget http://ftpmirror.gnu.org/parallel/parallel-20140222.tar.bz2 wget http://ftpmirror.gnu.org/parallel/parallel-20140222.tar.bz2
bzip2 -dc parallel-20140222.tar.bz2 | tar xvf - bzip2 -dc parallel-20140222.tar.bz2 | tar xvf -
cd parallel-20140222 cd parallel-20140222
./configure --prefix=$HOME && make && make install ./configure --prefix=$HOME && make && make install
Or if your system lacks 'make' you can simply copy src/parallel Or if your system lacks 'make' you can simply copy src/parallel
src/sem src/niceload src/sql to a dir in your path. src/sem src/niceload src/sql to a dir in your path.
@ -65,17 +65,17 @@ src/sem src/niceload src/sql to a dir in your path.
If you just need parallel and do not have 'make' installed (maybe the If you just need parallel and do not have 'make' installed (maybe the
system is old or Microsoft Windows): system is old or Microsoft Windows):
wget http://git.savannah.gnu.org/cgit/parallel.git/plain/src/parallel wget http://git.savannah.gnu.org/cgit/parallel.git/plain/src/parallel
chmod 755 parallel chmod 755 parallel
cp parallel sem cp parallel sem
mv parallel sem dir-in-your-$PATH/bin/ mv parallel sem dir-in-your-$PATH/bin/
= Test the installation = = Test the installation =
After this you should be able to do: After this you should be able to do:
parallel -j0 ping -nc 3 ::: foss.org.my gnu.org freenetproject.org parallel -j0 ping -nc 3 ::: foss.org.my gnu.org freenetproject.org
This will send 3 ping packets to 3 different hosts in parallel and print This will send 3 ping packets to 3 different hosts in parallel and print
the output when they complete. the output when they complete.

View file

@ -193,7 +193,6 @@ from:tange@gnu.org
to:parallel@gnu.org, bug-parallel@gnu.org to:parallel@gnu.org, bug-parallel@gnu.org
cc:Sandro Cazzaniga <kharec@mandriva.org>, cc:Sandro Cazzaniga <kharec@mandriva.org>,
Tim Cuthbertson <tim3d.junk@gmail.com>, Tim Cuthbertson <tim3d.junk@gmail.com>,
Steven M. Christensen <sunfreeware@gmail.com>,
Ludovic Courtès <ludo@gnu.org>, Markus Ammer <mkmm@gmx-topmail.de>, Ludovic Courtès <ludo@gnu.org>, Markus Ammer <mkmm@gmx-topmail.de>,
Pavel Nuzhdin <pnzhdin@gmail.com>, Phil Sung <psung@alum.mit.edu>, Pavel Nuzhdin <pnzhdin@gmail.com>, Phil Sung <psung@alum.mit.edu>,
Michael Shigorin <mike@altlinux.org>, Michael Shigorin <mike@altlinux.org>,
@ -207,13 +206,22 @@ cc:Sandro Cazzaniga <kharec@mandriva.org>,
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>, Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
Jesse Alama <jesse.alama@gmail.com> Jesse Alama <jesse.alama@gmail.com>
Subject: GNU Parallel 20140322 ('昆明 Kunming') released Subject: GNU Parallel 20140322 ('昆明 MH370') released
GNU Parallel 20140322 ('昆明 Kunming') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/
GNU Parallel 20140322 ('昆明 MH370') has been released. It is available for download at: http://ftp.gnu.org/gnu/parallel/
New in this release: New in this release:
* Offical package for Alpine Linux now exists: http://alpinelinux.org/apk/main/x86/parallel
* GNU Parallel was cited in: Estimating uncertainties in statistics computed from direct numerical simulation http://dx.doi.org/10.1063/1.4866813
* GNU Parallel was cited in: Vehicle routing problems with time windows and multiple service workers: a systematic comparison between ACO and GRASP http://link.springer.com/article/10.1007/s10100-014-0341-z
* GNU Parallel, quick and easy http://www.reganmian.net/blog/2014/03/09/gnu-parallel-quick-and-easy/
* Using Multiple CPU Cores With Command Line Tools http://prateekvjoshi.com/2014/03/07/using-multiple-cpu-cores-with-command-line-tools/
* Batch convert mp3 CBR to VBR http://blogs.zercle.com/bouroo/2013/03/batch-convert-mp3-cbr-to-vbr/ * Batch convert mp3 CBR to VBR http://blogs.zercle.com/bouroo/2013/03/batch-convert-mp3-cbr-to-vbr/
* Running Behat in parallel with Selenium grid http://zalas.eu/running-behat-in-parallel-with-selenium-grid/ * Running Behat in parallel with Selenium grid http://zalas.eu/running-behat-in-parallel-with-selenium-grid/
@ -222,6 +230,8 @@ New in this release:
* Пишем многопоточный скрипт на bash http://dafter.ru/duf/howto/130.html * Пишем многопоточный скрипт на bash http://dafter.ru/duf/howto/130.html
* 如何利用多核CPU来加速你的Linux命令 http://www.chinadmd.com/file/xpcr6wpctzwtuu3ivwiaatcs_1.html
* Bug fixes and man page updates. * Bug fixes and man page updates.

View file

@ -603,7 +603,7 @@ sub sleep_for_recheck {
} }
if($self->verbose()) { if($self->verbose()) {
$self->{'recheck'} = int($self->{'recheck'}*100)/100; $self->{'recheck'} = int($self->{'recheck'}*100)/100;
print "Sleeping $self->{'recheck'}s\n"; print STDERR "Sleeping $self->{'recheck'}s\n";
} }
::debug("recheck in $self->{'recheck'}s\n"); ::debug("recheck in $self->{'recheck'}s\n");
::usleep(1); # For some reason this gets interrupted ::usleep(1); # For some reason this gets interrupted
@ -616,7 +616,7 @@ sub sleep_while_running {
::debug("check in $self->{'runtime'}s\n"); ::debug("check in $self->{'runtime'}s\n");
if($self->verbose()) { if($self->verbose()) {
$self->{'runtime'} = int($self->{'runtime'}*100)/100; $self->{'runtime'} = int($self->{'runtime'}*100)/100;
print "Running $self->{'runtime'}s\n"; print STDERR "Running $self->{'runtime'}s\n";
} }
::usleep(1); # For some reason this gets interrupted ::usleep(1); # For some reason this gets interrupted
::usleep(1000*$self->{'runtime'}); ::usleep(1000*$self->{'runtime'});

Binary file not shown.

View file

@ -537,10 +537,11 @@ B<parallel> uses GNU B<parallel> to compute this, so you will get an
infinite loop. This will likely be fixed in a later release. infinite loop. This will likely be fixed in a later release.
=item B<--gnu> =item B<--gnu>
Behave like GNU B<parallel>. If B<--tollef> and B<--gnu> are both set, Behave like GNU B<parallel>. If B<--tollef> and B<--gnu> are both set,
B<--gnu> takes precedence. B<--gnu> takes precedence. B<--tollef> is retired, but B<--gnu> is
kept for compatibility.
=item B<--group> =item B<--group>
@ -877,9 +878,9 @@ B<--files> is often used with B<--pipe>.
=item B<--plain> =item B<--plain>
Ignore any B<--profile>, $PARALLEL, ~/.parallel/config, and Ignore any B<--profile>, $PARALLEL, and ~/.parallel/config to get full
B<--tollef> to get full control on the command line (used by GNU control on the command line (used by GNU B<parallel> internally when
B<parallel> internally when called with B<--sshlogin>). called with B<--sshlogin>).
=item B<--progress> =item B<--progress>
@ -1473,19 +1474,6 @@ computed as a percentage of the median average runtime. Only values
> 100% will make sense. > 100% will make sense.
=item B<--tollef> (obsolete - will be retired 20140222)
Make GNU B<parallel> behave more like Tollef's parallel command. It
activates B<-u>, B<-q>, and B<--arg-sep -->. It also causes B<-l> to
change meaning to B<--load>.
Not giving '--' is unsupported.
B<Do not use --tollef unless you know what you are doing>.
To override use B<--gnu>.
=item B<--verbose> =item B<--verbose>
=item B<-t> =item B<-t>
@ -3109,7 +3097,7 @@ this. To see this in action try:
parallel -kP4 -n1 grep 1 > out.par ::: a b c d e f parallel -kP4 -n1 grep 1 > out.par ::: a b c d e f
echo a b c d e f | xargs -P4 -n1 grep 1 > out.xargs-unbuf echo a b c d e f | xargs -P4 -n1 grep 1 > out.xargs-unbuf
echo a b c d e f | xargs -P4 -n1 grep --line-buffered 1 > out.xargs-linebuf echo a b c d e f | xargs -P4 -n1 grep --line-buffered 1 > out.xargs-linebuf
echo a b c d e f | xargs -n1 grep --line-buffered 1 > out.xargs-serial echo a b c d e f | xargs -n1 grep 1 > out.xargs-serial
ls -l out* ls -l out*
md5sum out* md5sum out*

View file

@ -564,11 +564,12 @@ $PARALLEL, /etc/parallel/config or similar. This is because GNU
@strong{parallel} uses GNU @strong{parallel} to compute this, so you will get an @strong{parallel} uses GNU @strong{parallel} to compute this, so you will get an
infinite loop. This will likely be fixed in a later release. infinite loop. This will likely be fixed in a later release.
@item @strong{--gnu} @item @strong{--gnu}
@anchor{@strong{--gnu}} @anchor{@strong{--gnu} }
Behave like GNU @strong{parallel}. If @strong{--tollef} and @strong{--gnu} are both set, Behave like GNU @strong{parallel}. If @strong{--tollef} and @strong{--gnu} are both set,
@strong{--gnu} takes precedence. @strong{--gnu} takes precedence. @strong{--tollef} is retired, but @strong{--gnu} is
kept for compatibility.
@item @strong{--group} @item @strong{--group}
@anchor{@strong{--group}} @anchor{@strong{--group}}
@ -933,9 +934,9 @@ defaults to '\n'. To have no record separator use @strong{--recend ""}.
@item @strong{--plain} @item @strong{--plain}
@anchor{@strong{--plain}} @anchor{@strong{--plain}}
Ignore any @strong{--profile}, $PARALLEL, ~/.parallel/config, and Ignore any @strong{--profile}, $PARALLEL, and ~/.parallel/config to get full
@strong{--tollef} to get full control on the command line (used by GNU control on the command line (used by GNU @strong{parallel} internally when
@strong{parallel} internally when called with @strong{--sshlogin}). called with @strong{--sshlogin}).
@item @strong{--progress} @item @strong{--progress}
@anchor{@strong{--progress}} @anchor{@strong{--progress}}
@ -1576,19 +1577,6 @@ If @emph{val} is followed by a % then the timeout will dynamically be
computed as a percentage of the median average runtime. Only values computed as a percentage of the median average runtime. Only values
> 100% will make sense. > 100% will make sense.
@item @strong{--tollef} (obsolete - will be retired 20140222)
@anchor{@strong{--tollef} (obsolete - will be retired 20140222)}
Make GNU @strong{parallel} behave more like Tollef's parallel command. It
activates @strong{-u}, @strong{-q}, and @strong{--arg-sep --}. It also causes @strong{-l} to
change meaning to @strong{--load}.
Not giving '--' is unsupported.
@strong{Do not use --tollef unless you know what you are doing}.
To override use @strong{--gnu}.
@item @strong{--verbose} @item @strong{--verbose}
@anchor{@strong{--verbose}} @anchor{@strong{--verbose}}