AutoSys Log Files Location Example

AutoSys Log Files Location Example

Any job you create in Autosys should specify values for std_out_file and std_err_file because it is important in case if something goes wrong with AutoSys jobs. If you don’t specify then AutoSys job sends anything to standard out or standard error, then the output will go to /opt/CA/r11/agent/out/univagent.out. As this is default location and not preferable because the /opt/CA file system on most of our servers has only 1 GB of space. When it fills up every Autosys job will fail and you will not see anything. These files are owned by root, so you will not be able to delete them without administrator assistance.

If you do not want to see any output and your job is running on a Unix server then you can use /dev/null to have the output discarded.
To have unique file generated each time when you run your job, you can use the following variables:

valueWindowsLinux
job name%AUTO_JOB_NAME%$AUTO_JOB_NAME
instance id%AUTORUN%$AUTORUN

Below are examples:

Linux:

  • std_out_file: /opt/apps/dev/myTeam/log/$AUTO_JOB_NAME.$AUTORUN.stdout
  • std_err_file: /opt/apps/dev/myTeam/log/$AUTO_JOB_NAME.$AUTORUN.stdout

Windows:

  • std_out_file: D\:\opt\apps\dev\myTeam\log\%AUTO_JOB_NAME%.%AUTORUN%.stdout
  • std_err_file: D\:\opt\apps\dev\myTeam\log\%AUTO_JOB_NAME%.%AUTORUN%.stdout

Sample JIL file with log files attached:

update_job: JavaHonk_c  job_type: c
owner: Javahonk@JavaHonk.com
machine: JavaHonk.test.com
command: /apps/JavaHonk/DividendNotifier/scripts/run-script.sh UAT start
permission: gx,ge,wx,we,mx,me
date_conditions: 1
days_of_week: mo,tu,we,th,fr
exclude_calendar: CORP_CHRISTMAS_NEWYRS_ONLY
description: "Load Swap Dividend data"
condition: s(JavaHonk_GenProcessDiv_c)
term_run_time: 540
alarm_if_fail: 1
std_out_file: /apps/JavaHonk/DividendNotifier/logs/$AUTO_JOB_NAME.$AUTORUN.stdout
std_err_file: /apps/JavaHonk/DividendNotifier/logs/$AUTO_JOB_NAME.$AUTORUN_err.stdout
application: JavaHonk
  • That’s it. For more details please refer CA documentation here

Leave a Reply

Your email address will not be published. Required fields are marked *