Several warnings for you:
1. Never run a job in the background without storing its PID or waiting for it to end
2. Never run a process in the background and quit
3. If your shell script gets too complicated then it might be a good idea to use a programming language like perl, python, java, etc.
I have seen some "framework" that executed:
As a result user called a command and then had a disowned process running in the system. It might never end. It might do whatever it wants. You cannot tell when it finished.
As a workaround people are using "ps -ef|grep scriptname" but it fails for long paths as ps won't show full path then.
Now the performance - if there are only 20 processes then you should'n worry about it unless your server is very limited (like 4MiB of RAM, 50MHz CPU). Everything depends on: how often does it happen, what extra operations are performed for every process (ex. loading of a complex environment) and how many resources are consumed by the processes. It might be that your server is not capable of running even a single process like that (ex. the process might try to backup whole internet ).
In a korn shell script, how can I run several processes in parallel at the same time?
For example, I have 3 processes say p1, p2, p3
if I call them as
p1.ksh
p2.ksh
p3.ksh
they will run after one process finishes. But I want to run them in parallel and want to display "Process p1... (3 Replies)
Hi,
Could any one please explain the difference between DataStage server edition jobs and DS parallel extender jobs...?
In which scenarios or application areas do we use either of these jobs.?
Regards
Suresh (0 Replies)
i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help.
$cat run_job.ksh
#!/usr/bin/ksh
####################################
typeset -u SCHEMA_NAME=$1
... (1 Reply)
Hi all,
How do i run a command in parallel 50 times and capturing the result of each run in a separate file
Eg: myApp arg1 > run1.txt
myApp arg1 > run2.txt
:::::::::::::::::::::::::
:::::::::::::::::::::::::
myApp arg1 > run50.txt
The above way is sequential.
... (3 Replies)
how can i process jobs parallel with conditions below.
Script1.ksh
Script2.ksh
Script3.ksh
Script4.ksh
Script5.ksh
Script6.ksh
Script7.ksh
Script8.ksh
Script9.ksh
Script10.ksh
After successful completion of Script1.ksh I need to run Script7.ksh.
After successful... (4 Replies)
I have a list with four dates
say load_date.lst contains
2010-01-01 2010-01-31
2010-03-01 2010-03-31
2010-05-01 2010-05-31
2010-07-01 2010-07-31
And I have directory /lll/src/sql with set of sql's
1_load.sql
2_load.sql
3_load.sql
I want to run the sql'in series with respective to... (3 Replies)
I need to process 50 sqlplus scripts which are listed in a text file. I need to develop a shell script that'll read this file and run these sqlplus scripts. At any point of time, the number of sqlplus scripts running shouldn't exceed 6. If any of the sqlplus scripts completes successfully then... (17 Replies)
Hello,
I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
I have multiple jobs and each job dependent on other job.
Each Job generates a log and If job completed successfully log file end's with JOB ENDED SUCCESSFULLY message and if it failed then it will end with JOB ENDED with FAILURE.
I need an help how to start.
Attaching the JOB dependency... (3 Replies)
Discussion started by: santoshkumarkal
3 Replies
LEARN ABOUT DEBIAN
qterm
qterm(8B) PBS qterm(8B)NAME
qterm - terminate processing by a PBS batch server
SYNOPSIS
qterm [-t type] [server...]
DESCRIPTION
The qterm command terminates a PBS batch server. When a server receives a terminate command, the server will go into a terminating state.
While in this state, the server will not allow new jobs to be started or enqueued. By default, qterm will request a "quick" shutdown of
the PBS server. Other ways of shutting down the server (specified with the -t argument), and their impact on running jobs, are described
below. The qterm command will not exit until the server has completed its shutdown procedure.
In order to execute qterm, the user must have PBS Operation or Manager privilege.
OPTIONS -t type Specifies the type of shut down. The types are:
immediate
All running jobs are to immediately stop execution.
If checkpoint is supported, running jobs that were submitted with "-c shutdown" are checkpointed, terminated, and
requeued. If checkpoint is not supported or the job cannot be checkpointed, running jobs are requeued if the rerunable
attribute is true. Otherwise, jobs are killed.
Normally the server will not shutdown until there are no jobs in the running state. If the server is unable to contact
the MOM of running job, the job is still listed as running. The server may be forced down by a second qterm -t immediate
command.
delay If checkpoint is supported, running jobs that were submitted with "-c shutdown" are checkpointed, terminated, and
requeued. If a job cannot be checkpointed, but can be rerun, the job is terminated and requeued. Otherwise, running jobs
are allowed to continue to run. Note, the operator or administrator may use the qrerun and qdel commands to remove run-
ning jobs.
quick This option is used when you wish that running jobs be left running when the server shuts down. The server will cleanly
shutdown and can be restarted when desired. Upon restart of the server, jobs that continue to run are shown as running;
jobs that terminated during the server's absence will be placed into the exiting state.
OPERANDS
The server operand specifies which servers are to shutdown. If no servers are given, then the default server will be terminated.
STANDARD ERROR
The qterm command will write a diagnostic message to standard error for each error occurrence.
EXIT STATUS
Upon successful processing of all the operands presented to the qterm command, the exit status will be a value of zero.
If the qterm command fails to process any operand, the command exits with a value greater than zero.
SEE ALSO pbs_server(8B), qmgr(1B), pbs_resources_aix4(7B), pbs_resources_irix5(7B), pbs_resources_sp2(7B), pbs_resources_sunos4(7B), and
pbs_resources_unicos8(7B)Localqterm(8B)