03-08-2010
Simple thing would be,
1. At the start of the process, check whether a lock file is there, else create the lock file. Do the process A. At the end delete the lock file.
2. Do the same for process B, check whether a lock file exist, if it is there, dont start process B, else start and do as similar as step 1.
10 More Discussions You Might Find Interesting
1. Solaris
Hi,
Thanks in advance.
i need to kill a unix background running job after that job process completes.
i can kill a job by giving the following unix command
kill -9 processid
how to kill the job after the current process run gets completed ?
Appreciate your valuable help.
Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies
2. Shell Programming and Scripting
Hi,
I have a situation... I have a script it checks for a file in a folder which comes to the folder every day at specified time...2am to 4 am, once the file is in the polder my process starts...but the problem is the files being placed are huge and it is even taking half an hour for the file... (3 Replies)
Discussion started by: mgirinath
3 Replies
3. UNIX for Advanced & Expert Users
Hi,
can you please help me with one problem?
There is some server, there are a lot of AIX applications which run on this server under different UserIDs.
These applications starts via crontab.
From time to time some application doesn't start.
What can this "not-action" be dependent on?
At... (5 Replies)
Discussion started by: Anta
5 Replies
4. AIX
Hi ,
I am trying to execute one script residing on server B from server A and in automated way but with a trigger.
My main quetion are
1) How I will login to the remote server automatically with user name and password. ( rsh or any other way ?)
2) Once logged in I need to execute... (2 Replies)
Discussion started by: agent47
2 Replies
5. UNIX for Advanced & Expert Users
Hello - I submitted one background job last night and it completed today morning.I want to know exact time the job completed.
I submitted backgroung job like this
nohup cp -Rp /opt/apps/prod/proddb/proddata . &
I want to know when above job completed on UNIX server.Above command... (9 Replies)
Discussion started by: Mansoor8810
9 Replies
6. Shell Programming and Scripting
Hi,
The HPCs I used earlier used PBS (Portable Batch System) to schedule when I was running various jobs and it had an option to send me an email once a job is completed.
I'm wondering whether this is possible for any other process (without the use of PBS). For example, I'm running some codes... (2 Replies)
Discussion started by: lost.identity
2 Replies
7. Shell Programming and Scripting
I'm running diff at the command prompt against two very large text files (>1GB) and system kills the process and replys back "Terminated" after 15 seconds.
I believe a system parameter needs to be adjusted but can't figure it out.
I'm running Red Hat 4.1.2-46, 2.6.18-028stab089.1
Thanks... (4 Replies)
Discussion started by: azpetef
4 Replies
8. UNIX for Dummies Questions & Answers
Hi,
There are 2000 jobs in the list and i need to draw their status. I put all the jobs in the list and trying to read one by one from the list and to find out the status.
Help me out in correcting the script.
#!/bin/csh
for a in $(cat Jobs_List.txt);
do
source <<path>>
autorep -j $a... (1 Reply)
Discussion started by: venkatesht
1 Replies
9. UNIX for Advanced & Expert Users
I have submitted an autosys job and force start it. Autosys hit the job 4 times to restart but it did not start and finally I terminate the job. Any idea why the job did not start. Below is the code I executed.
1214 missun0ap /export/home/bzn97r/develop/dswi/jil$ sendevent -E FORCE_STARTJOB... (0 Replies)
Discussion started by: jnrohit2k
0 Replies
10. Shell Programming and Scripting
Unix box: solaris 5.8
Server: IP
Need to to set trap for cron job failures by writing a shell script (5 Replies)
Discussion started by: ChandruBala73
5 Replies
LEARN ABOUT OPENDARWIN
qstat
QSTAT(1) User Contributed Perl Documentation QSTAT(1)
NAME
qstat - display job/partition information in a familiar pbs format
SYNOPSIS
qstat [-f] [-a|-i|-r] [-n [-1]] [-G|-M] [-u user_list] [-? | --help] [--man] [job_id...]
qstat -Q [-f]
qstat -q
DESCRIPTION
The qstat command displays information about jobs.
OPTIONS
-a Displays all jobs in a single-line format. See the STANDARD OUTPUT section for format details.
-i Displays information about idle jobs. This includes jobs which are queued or held.
-f Displays the full information for each selected job in a multi-line format. See the STANDARD OUTPUT section for format details.
-G Display size information in gigabytes.
-M Show size information, disk or memory in mega-words. A word is considered to be 8 bytes.
-n Displays nodes allocated to a job in addition to the basic information.
-1 In combination with -n, the -1 option puts all of the nodes on the same line as the job id.
-r Displays information about running jobs. This includes jobs which are running or suspended.
-u user_list
Display job information for all jobs owned by the specified user(s). The format of user_list is: user_name[,user_name...].
-? | --help
brief help message
--man
full documentation
STANDARD OUTPUT
Displaying Job Status
If the -a, -i, -f, -r, -u, -n, -G, and -M options are not specified, the brief single-line display format is used. The following items are
displayed on a single line, in the specified order, separated by white space:
the job id
the job name
the job owner
the cpu time used
the job state
C - Job is completed after having run E - Job is exiting after having run. H - Job is held. Q - job is queued, eligible to run or
routed. R - job is running. T - job is being moved to new location. W - job is waiting for its execution time (-a option) to be
reached. S - job is suspended.
the queue that the job is in
If the -f option is specified, the multi-line display format is used. The output for each job consists of the header line: Job Id: job
identifier followed by one line per job attribute of the form: attribute_name = value
If any of the options -a, -i, -r, -u, -n, -G or -M are specified, the normal single-line display format is used. The following items are
displayed on a single line, in the specified order, separated by white space:
the job id
the job owner
the queue the job is in
the job name
the session id (if the job is running)
the number of nodes requested by the job
the number of cpus or tasks requested by the job
the amount of memory requested by the job
either the cpu time, if specified, or wall time requested by the job, (in hh:mm)
the job state
The amount of cpu time or wall time used by the job (in hh:mm)
EXIT STATUS
On success, qstat will exit with a value of zero. On failure, qstat will exit with a value greater than zero.
perl v5.14.2 2012-04-10 QSTAT(1)