mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 05:07:54 +00:00
parallel: ignore errors from sysctl. sr #107762: get multiple sysctl: not found message when running parallel
This commit is contained in:
parent
82b50467ce
commit
3a7097684c
|
@ -166,24 +166,41 @@ https://lists.gnu.org/mailman/admindb/parallel
|
|||
from:tange@gnu.org
|
||||
to:parallel@gnu.org, bug-parallel@gnu.org, info-gnu@gnu.org, bug-directory@gnu.org
|
||||
cc:Peter Simons <simons@cryp.to>, Sandro Cazzaniga <kharec@mandriva.org>,
|
||||
Tim Cuthbertson <tim3d.junk@gmail.com>, Ludovic Courtès <ludo@gnu.org>,
|
||||
Markus Ammer <mkmm@gmx-topmail.de>, Pavel Nuzhdin <pnzhdin@gmail.com>,
|
||||
Phil Sung <psung@alum.mit.edu>, Michael Shigorin <mike@altlinux.org>,
|
||||
Andrew McFague <amcfague@wgen.net>, Steven M. Christensen <sunfreeware@gmail.com>,
|
||||
Chris Howey <howeyc@gmail.com>, Fethican Coşkuner <fethicanc@gmail.com>,
|
||||
Rogério Brito <rbrito@ime.usp.br>,
|
||||
Koen Vervloesem <koen@vervloesem.eu>, R. Tyler Croy <tyler@monkeypox.org>,
|
||||
ryoichiro.suzuki@gmail.com,kerick@shiftedbit.net,
|
||||
Christian Faulhammer <fauli@gentoo.org>, Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>,
|
||||
Jesse Alama <jesse.alama@gmail.com>
|
||||
Tim Cuthbertson <tim3d.junk@gmail.com>, Ludovic Courtès
|
||||
<ludo@gnu.org>, Markus Ammer <mkmm@gmx-topmail.de>, Pavel Nuzhdin
|
||||
<pnzhdin@gmail.com>, Phil Sung <psung@alum.mit.edu>, Michael
|
||||
Shigorin <mike@altlinux.org>, Andrew McFague <amcfague@wgen.net>,
|
||||
Steven M. Christensen <sunfreeware@gmail.com>, Chris Howey
|
||||
<howeyc@gmail.com>, Fethican Coşkuner <fethicanc@gmail.com>,
|
||||
Rogério Brito <rbrito@ime.usp.br>, Koen Vervloesem
|
||||
<koen@vervloesem.eu>, R. Tyler Croy <tyler@monkeypox.org>,
|
||||
kerick@shiftedbit.net, Christian Faulhammer <fauli@gentoo.org>,
|
||||
Ryoichiro Suzuki <ryoichiro.suzuki@gmail.com>, Jesse Alama
|
||||
<jesse.alama@gmail.com>
|
||||
|
||||
Subject: GNU Parallel 20110822 ('Utøya') released
|
||||
|
||||
GNU Parallel 20110822 ('Utøya') has been released. It is
|
||||
available for download at: http://ftp.gnu.org/gnu/parallel/
|
||||
|
||||
Debian and Ubuntu people have complained GNU Parallel is not in their
|
||||
official distributions.
|
||||
|
||||
Ubuntu people: Log into LaunchPad and on
|
||||
https://bugs.launchpad.net/ubuntu/+bug/740630 click 'This bug affect
|
||||
me too'.
|
||||
|
||||
Debian people: This is the (2 years old) bug to push:
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518696
|
||||
|
||||
|
||||
New in this release:
|
||||
|
||||
* Neat example of a parallel webcrawler in the man page.
|
||||
|
||||
* Blog post in Japanese.
|
||||
http://dminor11th.blogspot.com/2011/08/gnu-parallel.html
|
||||
|
||||
* Blog post about optimizing JPEGs. Thanks to Thomas Jost.
|
||||
http://schnouki.net/2011/07/22/optimizing-jpeg-pictures/
|
||||
|
||||
|
|
|
@ -480,7 +480,7 @@ sub get_options_from_array {
|
|||
sub parse_options {
|
||||
# Returns: N/A
|
||||
# Defaults:
|
||||
$Global::version = 20110722;
|
||||
$Global::version = 20110802;
|
||||
$Global::progname = 'parallel';
|
||||
$Global::infinity = 2**31;
|
||||
$Global::debug = 0;
|
||||
|
@ -2463,7 +2463,7 @@ sub no_of_cpus_darwin {
|
|||
# Number of physical CPUs on Mac Darwin
|
||||
# undef if not Mac Darwin
|
||||
my $no_of_cpus =
|
||||
(`sysctl -n hw.physicalcpu`
|
||||
(`sysctl -n hw.physicalcpu 2>/dev/null`
|
||||
or
|
||||
`sysctl -a hw 2>/dev/null | grep -w physicalcpu | awk '{ print \$2 }'`);
|
||||
return $no_of_cpus;
|
||||
|
@ -2474,7 +2474,7 @@ sub no_of_cores_darwin {
|
|||
# Number of CPU cores on Mac Darwin
|
||||
# undef if not Mac Darwin
|
||||
my $no_of_cores =
|
||||
(`sysctl -n hw.logicalcpu`
|
||||
(`sysctl -n hw.logicalcpu 2>/dev/null`
|
||||
or
|
||||
`sysctl -a hw 2>/dev/null | grep -w logicalcpu | awk '{ print \$2 }'`);
|
||||
return $no_of_cores;
|
||||
|
@ -2485,7 +2485,7 @@ sub no_of_cpus_freebsd {
|
|||
# Number of physical CPUs on FreeBSD
|
||||
# undef if not FreeBSD
|
||||
my $no_of_cpus =
|
||||
(`sysctl -a dev.cpu | grep \%parent | awk '{ print \$2 }' | uniq | wc -l | awk '{ print \$1 }'`
|
||||
(`sysctl -a dev.cpu 2>/dev/null | grep \%parent | awk '{ print \$2 }' | uniq | wc -l | awk '{ print \$1 }'`
|
||||
or
|
||||
`sysctl hw.ncpu 2>/dev/null | awk '{ print \$2 }'`);
|
||||
chomp $no_of_cpus;
|
||||
|
|
|
@ -51,9 +51,9 @@ B<parallel> is capable of.
|
|||
You can also watch the intro video for a quick introduction:
|
||||
http://tinyogg.com/watch/TORaR/ http://tinyogg.com/watch/hfxKj/ and
|
||||
http://tinyogg.com/watch/YQuXd/ or
|
||||
http://www.youtube.com/watch?v=OpaiGYxkSuQ and
|
||||
http://www.youtube.com/watch?v=1ntxT-47VPA
|
||||
|
||||
http://www.youtube.com/watch?v=OpaiGYxkSuQ
|
||||
http://www.youtube.com/watch?v=1ntxT-47VPA and
|
||||
http://www.youtube.com/watch?v=fOX1EyHkQwc
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
|
@ -1368,19 +1368,19 @@ B<parallel lame {} -o {.}.mp3 ::: *.wav>
|
|||
|
||||
=head1 EXAMPLE: Inserting multiple arguments
|
||||
|
||||
When moving a lot of files like this: B<mv * destdir> you will
|
||||
When moving a lot of files like this: B<mv *.log destdir> you will
|
||||
sometimes get the error:
|
||||
|
||||
B<bash: /bin/mv: Argument list too long>
|
||||
|
||||
because there are too many files. You can instead do:
|
||||
|
||||
B<ls | parallel mv {} destdir>
|
||||
B<ls | grep -E '\.log$' | parallel mv {} destdir>
|
||||
|
||||
This will run B<mv> for each file. It can be done faster if B<mv> gets
|
||||
as many arguments that will fit on the line:
|
||||
|
||||
B<ls | parallel -m mv {} destdir>
|
||||
B<ls | grep -E '\.log$' | parallel -m mv {} destdir>
|
||||
|
||||
|
||||
=head1 EXAMPLE: Context replace
|
||||
|
@ -1860,6 +1860,24 @@ B<parallel --onall -S server1,server2 echo ::: 1 2 3>
|
|||
If you have a lot of hosts use '-j0' to access more hosts in parallel.
|
||||
|
||||
|
||||
=head1 EXAMPLE: Parallelizing rsync
|
||||
|
||||
B<rsync> is a great tool, but sometimes it will not fill up the
|
||||
available bandwidth. This is often a problem when copying several big
|
||||
files over high speed connections.
|
||||
|
||||
The following will start one B<rsync> per big file in I<src-dir> to
|
||||
I<dest-dir> on the server I<fooserver>:
|
||||
|
||||
B<find src-dir -type f -size +100000 | parallel -v ssh fooserver
|
||||
mkdir -p /dest-dir/{//}\;rsync -Havessh {} fooserver:/dest-dir/{}>
|
||||
|
||||
The dirs created may end up with wrong permissions and smaller files
|
||||
are not being transferred. To fix those run B<rsync> a final time:
|
||||
|
||||
B<rsync -Havessh src-dir/ fooserver:/dest-dir/>
|
||||
|
||||
|
||||
=head1 EXAMPLE: Use multiple inputs in one command
|
||||
|
||||
Copy files like foo.es.ext to foo.ext:
|
||||
|
|
Loading…
Reference in a new issue