update to parallel-20121222
Changes: * --shebang-wrap makes is possible to parallelize scripts by putting parallel in the shebang line (the first #! line in scripts). * --delay puts in a delay after starting each job. Useful to avoid raceconditions and thundering herd problems. * --results now uses / as separator instead of TAB and thus creates subdirs. Thanks to Drew Frank. * parallel: OpenBSD CPU detection. Thanks to Michal Markowski. * niceload --sensor allows for negative numbers to signify a lower number means the limit is lower. * niceload --prg suspend a named program that is already running. * niceload multiple --pid suspend process ids that are already running. * Bug fixes and man page updates. ok ajacoutot@ sthen@ pascal@ (MAINTAINER)
This commit is contained in:
parent
49733cfa6c
commit
2ff88e2acd
@ -1,8 +1,8 @@
|
||||
# $OpenBSD: Makefile,v 1.3 2012/12/06 20:30:09 rpe Exp $
|
||||
# $OpenBSD: Makefile,v 1.4 2012/12/30 17:05:10 rpe Exp $
|
||||
|
||||
COMMENT = execute jobs in parallel
|
||||
|
||||
DISTNAME = parallel-20121122
|
||||
DISTNAME = parallel-20121222
|
||||
|
||||
CATEGORIES = sysutils
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (parallel-20121122.tar.bz2) = AxUzYUFhK6LsH3bmyMWKcvRTF3fJa3m5HvZLOYC+WE8=
|
||||
SIZE (parallel-20121122.tar.bz2) = 236294
|
||||
SHA256 (parallel-20121222.tar.bz2) = DOlq1ONnNLqufObI2Z0ASBD7/fUgnW+G1bX8mpLcF/g=
|
||||
SIZE (parallel-20121222.tar.bz2) = 237603
|
||||
|
@ -1,36 +0,0 @@
|
||||
$OpenBSD: patch-src_parallel,v 1.1.1.1 2012/10/13 20:24:13 rpe Exp $
|
||||
--- src/parallel.orig Wed Aug 22 21:33:33 2012
|
||||
+++ src/parallel Sat Oct 13 16:04:50 2012
|
||||
@@ -2763,6 +2763,8 @@ sub no_of_cores {
|
||||
$no_of_cores = no_of_cores_gnu_linux();
|
||||
} elsif ($^O eq 'freebsd') {
|
||||
$no_of_cores = no_of_cores_freebsd();
|
||||
+ } elsif ($^O eq 'openbsd') {
|
||||
+ $no_of_cores = no_of_cores_openbsd();
|
||||
} elsif ($^O eq 'solaris') {
|
||||
$no_of_cores = no_of_cores_solaris();
|
||||
} elsif ($^O eq 'aix') {
|
||||
@@ -2771,6 +2773,7 @@ sub no_of_cores {
|
||||
$no_of_cores = no_of_cores_darwin();
|
||||
} else {
|
||||
$no_of_cores = (no_of_cores_freebsd()
|
||||
+ || no_of_cores_openbsd()
|
||||
|| no_of_cores_darwin()
|
||||
|| no_of_cores_solaris()
|
||||
|| no_of_cores_aix()
|
||||
@@ -2863,6 +2866,15 @@ sub no_of_cores_freebsd {
|
||||
(`sysctl hw.ncpu 2>/dev/null | awk '{ print \$2 }'`
|
||||
or
|
||||
`sysctl -a hw 2>/dev/null | grep -w logicalcpu | awk '{ print \$2 }'`);
|
||||
+ chomp $no_of_cores;
|
||||
+ return $no_of_cores;
|
||||
+}
|
||||
+
|
||||
+sub no_of_cores_openbsd {
|
||||
+ # Returns:
|
||||
+ # Number of CPU cores on OpenBSD
|
||||
+ # undef if not OpenBSD
|
||||
+ my $no_of_cores = `sysctl -n hw.ncpu 2>/dev/null`;
|
||||
chomp $no_of_cores;
|
||||
return $no_of_cores;
|
||||
}
|
Loading…
Reference in New Issue
Block a user