Autosys Job Statistics from 3 months

25.5k views Asked by At

I want to make a report of start and end times of a Autosys job from last three months. How can i get it. Do i need to check archived history or logs? If yes, please lemme know the details.

TIA

1

There are 1 answers

0
UserOp On

Autosys internally uses Oracle or Sybase database. As long as the data is available in the DB you can fetch it using autorep command. To get past run time use -r handle.

For example: autorep -J JobA -r -30

The above will give you last 30th run time for the job.

However, due to performance bottleneck that may arise due to historical data in the DBs the DBAs generally purge the data after a while. I have seen period of 1 day to 7 days based on the number of the jobs and database instance power.

Other approximate way would to be use the log files created by autosys if the option stdout is specified with unique filenames. For example: you can have the attribute as std_out: $JOB_NAME.out.date +%m.%s

In this case the log file will be created as soon as the job starts which you can get from the filename using text function on unix,etc. For the end-time, you can use the last modified time - this is where the approximate part comes in as the time would depend if your job had an echo to the log file or not. It can either be close or far based on the command of the script.

This method will not let you know the times for the box jobs as they never have a log attribute, for that you can depend on the first job in the box.