parallel: added exit Signal to --joblog

This commit is contained in:
Ole Tange 2011-06-12 01:19:29 +02:00
parent f28cda7a19
commit 780f000c92
8 changed files with 52 additions and 20 deletions

20
configure vendored
View file

@ -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 20110522. # Generated by GNU Autoconf 2.68 for parallel 20110607.
# #
# 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='20110522' PACKAGE_VERSION='20110607'
PACKAGE_STRING='parallel 20110522' PACKAGE_STRING='parallel 20110607'
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 20110522 to adapt to many kinds of systems. \`configure' configures parallel 20110607 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 20110522:";; short | recursive ) echo "Configuration of parallel 20110607:";;
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 20110522 parallel configure 20110607
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 20110522, which was It was created by parallel $as_me 20110607, 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='20110522' VERSION='20110607'
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 20110522, which was This file was extended by parallel $as_me 20110607, 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 20110522 parallel config.status 20110607
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\\"

View file

@ -1,4 +1,4 @@
AC_INIT([parallel], [20110522], [bug-parallel@gnu.org]) AC_INIT([parallel], [20110607], [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([

View file

@ -1,3 +1,10 @@
niceload seeks last column:
iostat -x 1 2
niceload --start-condition
Til QUOTING: Til QUOTING:
FN="two spaces" FN="two spaces"
@ -90,6 +97,17 @@ Postkort:
- Eet eksempel: parallel gzip ::: * - Eet eksempel: parallel gzip ::: *
- Link til video. http://nd.gd/0s - Link til video. http://nd.gd/0s
Til inspiration.
Hvis du stadig er ved at lave post- eller visitkort ting, så kunne du evt tilføje en QR code. Med MECARD tagget kan flere tags gemmes i en og samme fil:
qrencode -l L -o x.png "MECARD:N:GNU Parallel;EMAIL:parallel@gnu.org;URL:gnu.org/software/parallel;"
Den ser OK ud i en Androide tlf.
Husk at skrive indholdet under billedet, det er irreterende at skulle gætte.
GNU parallel is a UNIX-tool for running commands in parallel. GNU parallel is a UNIX-tool for running commands in parallel.
To gzip all files running one job per CPU write: To gzip all files running one job per CPU write:
parallel gzip ::: * parallel gzip ::: *

View file

@ -68,9 +68,9 @@ size with 1024, 1048576, 1073741824, or 1099511627776 respectively.
Sets niceness. See B<nice>(1). Sets niceness. See B<nice>(1).
=item B<-N> I<niceness> =item B<-N>
=item B<--noswap> I<niceness> =item B<--noswap>
Do not start new jobs on a given computer if there is both swap-in and Do not start new jobs on a given computer if there is both swap-in and
swap-out activity. swap-out activity.
@ -296,7 +296,7 @@ B<parallel>(1), B<nice>(1)
use strict; use strict;
use Getopt::Long; use Getopt::Long;
$Global::progname="niceload"; $Global::progname="niceload";
$Global::version = 20110526; $Global::version = 20110607;
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) {

View file

@ -445,7 +445,7 @@ sub get_options_from_array {
sub parse_options { sub parse_options {
# Returns: N/A # Returns: N/A
# Defaults: # Defaults:
$Global::version = 20110526; $Global::version = 20110607;
$Global::progname = 'parallel'; $Global::progname = 'parallel';
$Global::infinity = 2**31; $Global::infinity = 2**31;
$Global::debug = 0; $Global::debug = 0;
@ -639,7 +639,7 @@ sub parse_options {
} else { } else {
print $Global::joblog print $Global::joblog
join("\t", "Seq", "Host", "Starttime", "Runtime", join("\t", "Seq", "Host", "Starttime", "Runtime",
"Send", "Receive", "Exitval", "Command" "Send", "Receive", "Exitval", "Signal", "Command"
). "\n"; ). "\n";
} }
} }
@ -1538,6 +1538,7 @@ sub reaper {
my $job = $Global::running{$stiff}; my $job = $Global::running{$stiff};
$job or next; $job or next;
$job->set_exitstatus($? >> 8); $job->set_exitstatus($? >> 8);
$job->set_exitsignal($? & 127);
debug("died (".$job->exitstatus()."): ".$job->seq()); debug("died (".$job->exitstatus()."): ".$job->seq());
$job->set_endtime(); $job->set_endtime();
if($stiff == $Global::tty_taken) { if($stiff == $Global::tty_taken) {
@ -2656,6 +2657,7 @@ sub new {
# The commandline wrapped with rsync and ssh # The commandline wrapped with rsync and ssh
'sshlogin_wrap' => undef, 'sshlogin_wrap' => undef,
'exitstatus' => undef, 'exitstatus' => undef,
'exitsignal' => undef,
}, ref($class) || $class; }, ref($class) || $class;
} }
@ -3225,7 +3227,7 @@ sub print {
join("\t", $self->seq(), $self->sshlogin()->string(), join("\t", $self->seq(), $self->sshlogin()->string(),
$self->starttime(), $self->runtime(), $self->starttime(), $self->runtime(),
$self->transfersize(), $self->returnsize(), $self->transfersize(), $self->returnsize(),
$self->exitstatus(), $cmd $self->exitstatus(), $self->exitsignal(), $cmd
). "\n"; ). "\n";
flush $Global::joblog; flush $Global::joblog;
} }
@ -3279,6 +3281,17 @@ sub set_exitstatus {
$self->{'exitstatus'} = $exitstatus; $self->{'exitstatus'} = $exitstatus;
} }
sub exitsignal {
my $self = shift;
return $self->{'exitsignal'};
}
sub set_exitsignal {
my $self = shift;
my $exitsignal = shift;
$self->{'exitsignal'} = $exitsignal;
}
package CommandLine; package CommandLine;

View file

@ -737,7 +737,7 @@ This will set the owner of the homedir to the user:
B<tr ':' '\012' < /etc/passwd | parallel -N7 chown {1} {6}> B<tr ':' '\012' < /etc/passwd | parallel -N7 chown {1} {6}>
Implies B<-X> unless B<-m> or <--pipe> is set. Implies B<-X> unless B<-m> or B<--pipe> is set.
When used with B<--pipe> B<-N> is the number of records to read. This When used with B<--pipe> B<-N> is the number of records to read. This
is much slower than B<--blocksize> so avoid it if performance is is much slower than B<--blocksize> so avoid it if performance is

View file

@ -536,7 +536,7 @@ $Global::Initfile && unlink $Global::Initfile;
exit ($err); exit ($err);
sub parse_options { sub parse_options {
$Global::version = 20110526; $Global::version = 20110607;
$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

View file

@ -1,5 +1,5 @@
### Test -k ### Test -k
parallel: Warning: Only enough filehandles to run 20 jobs in parallel. Raising ulimit -n may help parallel: Warning: Only enough filehandles to run 20 jobs in parallel. Raising ulimit -n may help.
begin begin
1 1
2 2
@ -72,3 +72,4 @@ parallel: sleep 3; echo 17
parallel: sleep 3; echo 18 parallel: sleep 3; echo 18
### Test bug: empty line for | sh with -k ### Test bug: empty line for | sh with -k
a a
b