I have a sript which is going to trigger other 3 scripts in background simultaneously
for eg:
Main Script:(main.sh)
-----------
sh a.sh &
sh b.sh &
sh c.sh &
How to catch the exit status and store it in a variable for all those three scripts in main script. Is there any other way of... (4 Replies)
In my last job someone gave me the command to put in my .profile that let me know when a job I had running in the background finished. It was a word about 5 char long. I can't remember it! (4 Replies)
I have the following sample script to run a script the jobs with the same
priority(in this case field3) in parallel; wait for the jobs to finish
and run the next set of jobs in parallel.When all the lines are read
exit the script.
I have the following script which is doing evrything I want... (1 Reply)
Hi All,
I have a scenario where I am executing some child shell scripts in background (using &)through a master parent script.
Is there a way I can capture the exit status of each individual child script after the execution is completed. (2 Replies)
Hi all, i hava a specific backgroud process. I have de PID of this process. At some time, the process finish his job, is there any way to catch the exit code? I use "echo $?" normally for commands.
Thanks! (2 Replies)
Hi, I have written a script that allows me to repetitively play a music file $N times, which is specified through user input. However, if I want to exit the script before it has finished looping $N times, if I use CTRL+c, I have to CTRL+c however many times are left in order to complete the loop.... (9 Replies)
Hi, below is my master script wihch inturn runs 2 scripts in background
#master_script.sh
./subscript1.sh &
./subscript2.sh &
executed the master_script.sh from unix command prompt
$ ./master_script.sh
it is executing the subscripts and they are completing fine, however master_script.sh is... (2 Replies)
Hi
Could someone offer some help on this problem I've got with running a background process.
As part of a script that does a stop/start/status for a piece of software called SAS, the following extract is from part of the start step.
My issue is that when the script is run, the control... (0 Replies)
Hello,
I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using,
#!/bin/bash
# main backup location, trailing slash included
backup_loc="/Volumes/Archive_Volume/00_macos_backup/"
# generic backup function
function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies
LEARN ABOUT DEBIAN
qsig
qsig(1B) PBS qsig(1B)NAME
qsig - signal pbs batch job
SYNOPSIS
qsig [-s signal] job_identifier ...
DESCRIPTION
The qsig command requests that a signal be sent to executing batch jobs. The signal is sent to the session leader of the job.
If the -s option is not specified, `SIGTERM' is sent. The request to signal a batch job will be rejected if:
- The user is not authorized to signal the job.
- The job is not in the running state.
- The requested signal is not supported by the system upon which the job is executing.
The qsig command sends a Signal Job batch request to the server which owns the job.
OPTIONS -s signal Declares which signal is sent to the job.
The signal argument is either a signal name, e.g. SIGKILL, the signal name without the SIG prefix, e.g. KILL, or a unsigned
signal number, e.g. 9. The signal name SIGNULL is allowed; the server will send the signal 0 to the job which will have no
effect on the job, but will cause an obituary to be sent if the job is no longer executing. Not all signal names will be
recognized by qsig. If it doesn't recognize the signal name, try issuing the signal number instead.
Two special signal names, "suspend" and "resume", are used to suspend and resume jobs. Cray systems use the Cray-specific
suspend()/resume() calls.
On non-Cray system, suspend causes a SIGTSTP to be sent to all processes in job's top task, wait 5 seconds, and then send a
SIGSTOP to all processes in all tasks on all nodes in the job. This differs from TORQUE 2.0.0 which did not have the abil-
ity to propogate signals to sister nodes. Resume sends a SIGCONT to all processes in all tasks on all nodes.
When suspended, a job continues to occupy system resources but is not executing and is not charged for walltime. The job
will be listed in the "S" state. Manager or operator privilege is required to suspend or resume a job.
Note that interactive jobs may not resume properly because the top-level shell will background the suspended child process.
OPERANDS
The qsig command accepts one or more job_identifier operands of the form: sequence_number[.server_name][@server]
STANDARD ERROR
The qsig command will write a diagnostic messages to standard error for each error occurrence.
EXIT STATUS
Upon successful processing of all the operands presented to the qsig command, the exit status will be a value of zero.
If the qsig command fails to process any operand, the command exits with a value greater than zero.
SEE ALSO qsub(1B), pbs_sigjob(3B), pbs_resources_*(7B) where * is system type, and the PBS ERS.
Localqsig(1B)