How to find job runtime using Autorep


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to find job runtime using Autorep
# 1  
Old 12-10-2008
How to find job runtime using Autorep

Hey guys,

Is there an autorep option to find out the current runtime of a job..
Or do you have to work it out using machine time and start time?

What I'm trying to do is create a script that will email out the autosys job details. I was hoping there would be an autorep command that would return the jobs runtime.. Can't find anything on the cheatsheet or on the net about this..

Is there any other way around this? Am experimenting with the date function and trying to work out the run time that way but its not working out too well.. This is what I've tested with so far..

#! /bin/ksh -x
#
start=`date +%H%M`
#
sleep 120
#
end=`date +%H%M`
#
result=(($end - $start))
#
echo $result

But its coming back with:
date.ksh[9]: syntax error at line 9 : `(' unexpected



Thanks,
Jaz

Last edited by Jazmania; 12-10-2008 at 07:17 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to find the job outside the box?

Hi gurus, below file is job list, the records without s( in the begining is job name in the box, the records with s() is the job depends on them (some of them in the box, some of them not in the box). I need to use script to find the job name not in the box. sname-pname-cprexa... (6 Replies)
Discussion started by: ken6503
6 Replies

2. Shell Programming and Scripting

Autorep not found problem

Hi All, I am using a putty session to login a server in which autosys is installed. we get the GUI by entering . /opt/CA/UnicenterAutoSysJM/autouser/autosys.ksh.server and then jobscape. when i tried autorep -j jobname it gives me autorep not found. Please help me with this. (1 Reply)
Discussion started by: mahesh300182
1 Replies

3. Shell Programming and Scripting

How to find stack size at runtime?

hi, I just wondering is there any way that I can record the stack size of shell script at runtime. (2 Replies)
Discussion started by: yc962frank
2 Replies

4. Shell Programming and Scripting

Using awk with autosys autorep

Hi, How to get correct field/column from autosys autorep command. I'm using GNU/Linux I'm trying to get the difference of last end and last start and the status (ST). In awk, i get the following excluding the heading part $1 - jobname $2 - Last Start date $3 - Last Start time $4 - Last... (1 Reply)
Discussion started by: bobbygsk
1 Replies

5. Shell Programming and Scripting

autorep command in the script

I have created UNIX script for getting information for the autosys jobs using autorep command. Job_name=temp_job1 echo $Job_name autorep -j $job_name -l0 After running the script I am getting the below error Error while loading shared libraries: libautoeac_api.so: cannot share object... (1 Reply)
Discussion started by: onesuri
1 Replies

6. Red Hat

From where Machine name is taken in autorep report

Hi, When i tried to run a job on autosys which has to run a command on sys1 but its giving some other Machine name (sys56) , attempts ten times and fails. I would like to know from where this Machine column of autorep command gets input so that i can change to correct Host Machine (sys1) and... (4 Replies)
Discussion started by: Ishakarthi
4 Replies

7. Shell Programming and Scripting

How to find the job and its location

Guys; I first I thank you for helping me few times in the past; A job runs every day at 8AM and looks for a file “abcd.txt” in directory “/usr/task/tmp”. How to find the job and its location. I need to change the file name to “abcd.dat”. it is UNIX environment. (2 Replies)
Discussion started by: clem2610
2 Replies

8. Shell Programming and Scripting

autorep command in autosys

hi, i have autosys installed on unix. i use "autorep -j t8i%" command to see the scheduled jobs. now i have changed some of the jobs and saved them too. i gave the command jil< filename.jil to again insert the jobs. but my problem is what is the command to run all the jobs again so that i... (8 Replies)
Discussion started by: tejasingaraju17
8 Replies

9. Linux

Plz Help me to find GNU C++ Runtime Library

Hi, I am working with red hat Linux and i want to install one program but I am getting the error This product requires the GNU C++ Runtime Library (libstdc++-libc6.2-2.so.3) or later. Your system must be upgraded before installation can proceed. So please tell me how can i remove this... (2 Replies)
Discussion started by: smartgupta
2 Replies

10. Shell Programming and Scripting

autorep command cut longer jobnames. Anybody into autosys / autorep?

Hi there, my problem is, that i need to get all jobs with status from a autosys instance. If I use autorep -J ALL -d >joblist.txt longer Jobnames will be cut and the end will be replaced by 3 points like this "ThisIsALongerJobNameAnd..." If i try a single job query like ... (7 Replies)
Discussion started by: drmaniac
7 Replies
Login or Register to Ask a Question
job(n)								 Tnm Tcl Extension							    job(n)

__________________________________________________________________________________________________________________________________________________

NAME
job - Invoke Tcl procedures at regular intervals. _________________________________________________________________ DESCRIPTION
The job command provides a convenient mechanism to implement Tcl procedures that are invoked at regular intervals. Jobs are activated from the Tcl event loop. Every job can have arbitrary attributes to store job specific state information between two invocations. These attributes help to avoid global variables in order to keep the Tcl name-space clean. The job scheduler itself relies heavily on the Tcl timer interface which itself depends on the system clock. Moving the system clock back- wards can have the effect that jobs are not activated for the amount of time the system clock was moved backwards. Similarly, moving the system clock forward can have the effect that jobs are activated earlier for the amount of time the system clock was moved forward. JOB COMMAND
The job command allows to create new jobs and to wait for jobs to complete. The job command can also be used to retrieve status information from the job scheduler. job create [option value ...] The job create command creates a new job object. The options can be used to configure the behaviour of the new job. See the config- ure command below for the details. job current The job current command returns the name of the currently running job. An empty string is returned if no job is running. job info The job info command returns a list of all job names. The list will be empty if there are no jobs known in this Tcl interpreter. job schedule The job schedule command invoke the scheduler. This is usually done automatically from the event loop. This command may be used dur- ing long computations since the scheduler is not preemptive. Note, this command can cause arbitrary side effects and should be used with care. job wait The job wait command blocks until all existing jobs have been finished. The command will wait infinitely if there is at least one job left. Events are processed while waiting for the jobs to finish which can have arbitrary side effects. JOB INSTANCE COMMAND
Every job is represented by a job object command which allows to manipulate the job. job# attribute [name [value]] The job# attribute command allows to save job specific data in job attributes. If called without any arguments, all existing attribute names for this job will be returned. If called with a name argument, the current value of the attribute will be returned. Non-existing attributes do not produce an error. Instead, an empty string is returned. Calling the option with a name and a value causes the value to be saved in the job attribute. job# cget option The job# cget command returns the current value of a configuration option. See the description of supported options below. job# configure [option value ...] The job# configure command manipulates configuration options. See the description of supported options below. A list describing all current options is returns if the options argument is missing. job# destroy The job# destroy command destroys the job object. This command forces the object to change into the expired state. The scheduler will cleanup this object the next time it is active. job# wait The job# wait command blocks and processes events until the current job changes into the expired state. JOB OPTIONS
Every job has associated configuration options which control when a job is activated and which Tcl command is bound to the job. -command command The -command option defines the Tcl command that is evaluated whenever the job is activated. -interval time The -interval option defines the time interval between two job activations in milliseconds. -iterations number The -iterations option defines the total number of times that a job is activated. If this value reaches 0, the job will change its state to expired. Note, if the iterations options is never used, it will also have the value 0 but nothing special happens to the job object. -status state The -status option provides access to the current job state. A job is always in one of the states waiting, suspended, running and expired. A job in the expired state will be removed from the system once the scheduler gets activated again. Suspended jobs are not activated by the job scheduler. A suspended job can be resumed by changing its state to running. -time time The -time option returns the number of milliseconds until this job is activated the next time. This option is read-only. SEE ALSO
scotty(1), Tnm(n), Tcl(n) AUTHORS
Juergen Schoenwaelder <schoenw@cs.utwente.nl> Tnm job(n)