08-24-2005
Hw to Know the status of running JoB
Hi all,
I am running a job .. and i want to know the status tht it is runnig or not ..
and how can i find the jobId of my job ..
I have to get it to kill my running job
Pls let me know da Unix commands to do it ..
i m wrking on Hp UNIX
10 More Discussions You Might Find Interesting
1. Programming
Hi,
I have a requirement.
Scenario:
A parent job invokes a child job and gets killed. The child becomes orphan and gets attached to init. Child job is removed from the pid table as soon as it gets completed.
Requirement is i need the status of the child job even after the parent job is... (7 Replies)
Discussion started by: anjul_thegreat
7 Replies
2. Shell Programming and Scripting
Dear All,
I want to write a shell script to test the server is running or not. The method is pinging the server and examine the status code.
the script:
#/bin/tcsh
ping -c 3 host
if ($? != 0) then
actionA
endif
This script work fine in terminal. The status code is 0 when the... (1 Reply)
Discussion started by: isaac_ho
1 Replies
3. Shell Programming and Scripting
I have one unix job which can be executed using following commands:
csh
setenv HOME /data/ftpqa/ARTQ/orascripts
sudo -u artq /apps/ralocal/bin/runscript artq ../out/art_neg_item_cost_update.csh
I want to create one more script, which checks whether art_neg_item_cost_update.csh is already... (1 Reply)
Discussion started by: amarpreetka
1 Replies
4. UNIX for Dummies Questions & Answers
Hello,
I am running a shell script whose execution often takes several hours to complete. Is there way I can get some kind of status update as the job is running? Something as simple as the start and the current time stamp.
Thanks,
Gussi (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
5. UNIX for Dummies Questions & Answers
We are using autosys for job scheduling.
How to find successful job status completion in Autosys, programatically. Based on the successful job completion , mail has to be trigeered to Business users. Please help
Thanks (0 Replies)
Discussion started by: vkalya
0 Replies
6. UNIX for Advanced & Expert Users
Hi,
I have master job which will run based on the sub jobs status.
In the master job I am giving the condition like,
condition: s(sub_job) f(sub_job)
This scenario will work if the sub job status is success or failed. but I want to run my master job even if the sub_job was... (1 Reply)
Discussion started by: Kattoor
1 Replies
7. Shell Programming and Scripting
I have written a BASH script to autmatically start several jobs. I want to add additional function to the script so it would check these jobs from time to time (the jobs could take as short as 2 hours or as long as 1 day to finish). If a job is done, check the log file and output the error into a... (3 Replies)
Discussion started by: momentum
3 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. Shell Programming and Scripting
Hello everyone
While working on TUI for scripts, there there came the idea to' add a command' for dd too.
That was, after 'wrapping' tar and wget either, to display their growing size and return the exit code with a textual-visual-feedback to the user.
Now displaying the filesize of a... (13 Replies)
Discussion started by: sea
13 Replies
10. Shell Programming and Scripting
I want to get the job status from the second line "SU" to a variable
Input:
Job Name Last Start Last End ST Run/Ntry Pri/Xit
JOBNAME 10/24/2016 10:34:55 10/24/2016 10:44:15 SU 100344/32 0
Code tried
JSTATUS=$(cat Input | awk '$6 == "SU" {print $6}')... (5 Replies)
Discussion started by: Joselouis
5 Replies
LEARN ABOUT PHP
gearman_job_status
GEARMAN_JOB_STATUS(3) 1 GEARMAN_JOB_STATUS(3)
GearmanClient::jobStatus - Get the status of a background job
Object oriented style (method):
SYNOPSIS
public array GearmanClient::jobStatus (string $job_handle)
DESCRIPTION
Gets the status for a background job given a job handle. The status information will specify whether the job is known, whether the job is
currently running, and the percentage completion.
PARAMETERS
o $job_handle
- The job handle assigned by the Gearman server
RETURN VALUES
An array containing status information for the job corresponding to the supplied job handle. The first array element is a boolean indicat-
ing whether the job is even known, the second is a boolean indicating whether the job is still running, and the third and fourth elements
correspond to the numerator and denominator of the fractional completion percentage, respectively.
EXAMPLES
Example #1
Monitor the status of a long running background job
<?php
/* create our object */
$gmclient= new GearmanClient();
/* add the default server */
$gmclient->addServer();
/* run reverse client */
$job_handle = $gmclient->doBackground("reverse", "this is a test");
if ($gmclient->returnCode() != GEARMAN_SUCCESS)
{
echo "bad return code
";
exit;
}
$done = false;
do
{
sleep(3);
$stat = $gmclient->jobStatus($job_handle);
if (!$stat[0]) // the job is known so it is not done
$done = true;
echo "Running: " . ($stat[1] ? "true" : "false") . ", numerator: " . $stat[2] . ", denomintor: " . $stat[3] . "
";
}
while(!$done);
echo "done!
";
?>
The above example will output something similar to:
Running: true, numerator: 3, denomintor: 14
Running: true, numerator: 6, denomintor: 14
Running: true, numerator: 9, denomintor: 14
Running: true, numerator: 12, denomintor: 14
Running: false, numerator: 0, denomintor: 0
done!
SEE ALSO
GearmanClient::doStatus.
PHP Documentation Group GEARMAN_JOB_STATUS(3)