Shell script runs fine in Solaris, in Linux hangs at wait command
HI,
I have a strange problem. A shell script that runs fine on solaris. when i ported to linux, it started hanging.
here is the core of the script
my CFG_FILE is
repeated for 32 times.
if i uncomment the body of while loop , here is the output (that shows what for "wait" is waiting)
Before entering parallel process 28416
what causes this script wait for a while/grep command in linux whereas in solaris it is fine.
To give further details, i suppose to call a (8) background process, for each of line read from the file. So i introduced a wait command and when all complete i read next line and so on.
Since wait was really waiting for grep and not for spawned child, my script broke.
Othercases when it can run fine in linux
1. fewer lines in config file
2. in one test, i shrink one of row length from 260 to 250, it worked.
i can't predict a consitance condition for this behaviour.
Any help is appreciated in fixing / explaining this behaviour.
thanks
AK
Last edited by Scott; 10-27-2010 at 04:22 PM..
Reason: Please use code tags
I have a .sh script which was running fine on all the UNIX Servers (AIX, SunSolaris). The script requires two mandatory parameters and many optional parameters. Now at a different client place who are on a Windows Server, when I try to execute the script through MKS Toolkit, there are couple of... (5 Replies)
Okay, I have the following script that runs fine from a command line as well as an executable .sh file. It just moves any file/folder with movie* in the name to a folder called _Movies. The issue I'm running into is when it's call from a cron.
find /mnt/HD_a2/BT/complete -iname "movie.*" -exec... (4 Replies)
Hi,
My script is running with no erros but not giving any output can anyonehelp.
#!/bin/ksh
. /home/application/bin/application.env
OUTFILE=Result.txt
PROD_PASSWORD=`${GET_PWD} -f ${PWD_FILE_PATH} -s ${PROD_SERVER} -u ${PROD_USER}`
echo "1)To get the book last loaded details "
read... (7 Replies)
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Hi, I'm new to these forums, and I'm hoping that someone can solve this problem...
To make things short:
I have DD-wrt set up on a router.
I'm trying to run a script in CRON that fetches the daily password from my database using SSH.
CRON is set like so(in web interface):
* * * *... (4 Replies)
Hello Guys,
I have scratched my head alot on this but couldn't find clue what's wrong. Can you please help me with this? My problem is as following.
1) When I manually execute following script it runs successfully with below output.
bash-3.00# more smssend
#!/bin/bash
echo -e "<Request... (16 Replies)
Hello Team,
As a part of my job we have made a script to automate a service to restart frequently.
Script having two functions when executing it's should find the existing service and kill it, then start the same service . Verified the script it's working fine when executing... (18 Replies)
Hi, I have a script that seems to run to completion when in the command-line, but when it is run using the cron, it seems to time out.
They both start and run fine, but on the CRON it stops prematurely.
The script hits an API every few seconds and grabs data.
Does anyone have any idea on... (4 Replies)
Hi All,
I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:
sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE
mv $TEMPFILE $ORIGFILE... (3 Replies)
#!/bin/sh
# This script returns the number of rows updated from a function
echo "The execution is starting ....."
sqlplus -silent $UP <<EOF
set serveroutput on
set echo off
set pagesize 0
VAR no_rows_updated NUMBER;
EXEC :no_rows_updated :=0;
DECLARE
CURSOR c_update is
SELECT * FROM... (4 Replies)
Discussion started by: LoneRanger
4 Replies
LEARN ABOUT DEBIAN
condor_wait
condor_wait(1) General Commands Manual condor_wait(1)Name
condor_wait Wait - for jobs to finish
Synopsis
condor_wait [-help -version]
condor_wait[-debug] [-wait seconds] [-num number-of-jobs] log-file[job ID]
Description
condor_waitwatches a user log file (created with the logcommand within a submit description file) and returns when one or more jobs from
the log have completed or aborted.
Because condor_waitexpects to find at least one job submitted event in the log file, at least one job must have been successfully submitted
with condor_submitbefore condor_waitis executed.
condor_waitwill wait forever for jobs to finish, unless a shorter wait time is specified.
Options-help
Display usage information
-version
Display version information
-debug
Show extra debugging information.
-wait seconds
Wait no more than the integer number of seconds. The default is unlimited time.
-num number-of-jobs
Wait for the integer number-of-jobsjobs to end. The default is all jobs in the log file.
log file
The name of the log file to watch for information about the job.
job ID
A specific job or set of jobs to watch. If the job IDis only the job ClassAd attribute ClusterId , then condor_wait waits for all jobs
with the given ClusterId . If the job IDis a pair of the job ClassAd attributes, given by ClusterId . ProcId , then condor_wait waits
for the specific job with this job ID. If this option is not specified, all jobs that exist in the log file when condor_wait is invoked
will be watched.
General Remarks
condor_waitis an inexpensive way to test or wait for the completion of a job or a whole cluster, if you are trying to get a process outside
of Condor to synchronize with a job or set of jobs.
It can also be used to wait for the completion of a limited subset of jobs, via the -numoption.
Examples
condor_wait logfile
This command waits for all jobs that exist in logfile to complete.
condor_wait logfile 40
This command waits for all jobs that exist in logfile with a job ClassAd attribute ClusterId of 40 to complete.
condor_wait -num 2 logfile
This command waits for any two jobs that exist in logfile to complete.
condor_wait logfile 40.1
This command waits for job 40.1 that exists in logfile to complete.
condor_wait -wait 3600 logfile 40.1
This waits for job 40.1 to complete by watching logfile , but it will not wait more than one hour (3600 seconds).
Exit Status
condor_waitexits with 0 if and only if the specified job or jobs have completed or aborted. condor_waitreturns 1 if unrecoverable errors
occur, such as a missing log file, if the job does not exist in the log file, or the user-specified waiting time has expired.
Author
Condor Team, University of Wisconsin-Madison
Copyright
Copyright (C) 1990-2012 Condor Team, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
Licensed under the Apache License, Version 2.0.
See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu
September 2012 condor_wait(1)