Autosys Job Notes v1

Embed Size (px)

Citation preview

$# = Stores the number of command-line arguments that were passed to the shell program.$? = Stores the exit value of the last command that was executed.$0 = Stores the first word of the entered command (the name of the shell program).$* = Stores all the arguments that were entered on the command line ($1 $2 ...)."$@" = Stores all the arguments that were entered on the command line, individually quoted ("$1" "$2" ...).-- ------------------------------------------------------------------------------------http://www.bestitdocuments.com/Samples/http://www.bestitdocuments.com/Samples/Autosys_R113_5x/http://www.bestitdocuments.com/Samples/Autosys_R113_5x/Workload%20Automantion%20AE%20Reference%20Guide.pdf-- ------------------------------------------------------------------------------------http://eco-tone.com/ops/content-software_vendors/platinum/autosys/manuals/atsugu.pdfhttp://www.krishnatraining.com/upload/Autosys-Job-Management-Unix-User-Guide%20%281%29.pdfhttp://unixautosys-refrence.blogspot.com/2008/04/unix-shell-scripting.htmlhttp://support.ca.com/phpdocs/0/common/impcd/r11/troubleshooting/doc/DSM_Adv_topics_r11.pdfhttp://www.authorstream.com/Presentation/vin_taurus-241754-autosys-job-scheduling-vinil-gopalkrishnan-scheduling1-science-technology-ppt-powerpoint/http://autosys-tutorials.blogspot.com/2011/04/autosys-quick-reference.htmlsite:wordpress.com autosys .pdfhttp://autosys-tutorials.blogspot.com/2011/04/autosys-quick-reference.htmlhttp://writetrends.files.wordpress.com/2009/09/autosys-edk2uaj45cie.pdfhttp://writetrends.files.wordpress.com/2009/09/autosys-edk2uaj45cie.pdfhttp://support.ca.com/phpdocs/0/common/impcd/r11/troubleshooting/doc/autsys_diag_tips_110607.pdfhttps://support.ca.com/phpdocs/0/7833/TEC510954.pdfhttp://www.oit.umn.edu/prod/groups/oit/@pub/@oit/@web/@peoplesoft/documents/content/oit_content_451314.pdfhttp://autosys-tutorials.blogspot.com/http://datastagetutorialsandtraining.blogspot.com/2012/05/autosys-guide.htmlhttp://supportconnectw.ca.com/public/autosys/infodocs/autosys_cheatsheet.aspAutoSys commands like "sendevent" and "autorep"?-- ---------------------------------------------------# Send Eventalias -x se='sendevent -E'# Start Jobalias -x fsj='sendevent -E FORCE_STARTJOB -J'alias -x sj='sendevent -E STARTJOB -J'# Job Reportar='autorep -w -J 'fsj='sendevent -E FORCE_STARTJOB -J'hold='sendevent -E JOB_ON_HOLD -J 'ice='sendevent -E JOB_ON_ICE -J 'jd='job_depends -c -w -J 'killjob='sendevent -E KILLJOB -J 'offhold='sendevent -E JOB_OFF_HOLD -J 'office='sendevent -E JOB_OFF_ICE -J 'se='sendevent -E'sj='sendevent -E STARTJOB -J'success='sendevent -E CHANGE_STATUS -s SUCCESS -J 'terminate='sendevent -E CHANGE_STATUS -s TERMINATED -J 'Display JIL (Job Instruction Language):autorep -w -J -qLoad JIL:jil < JIL_sourceFind unique commands currently being used:autorep -J PARTIALJOBNAME% -q | grep "command:" | awk -F: '{print $2}'|awk '{print $1}' | sort -u > /tmp/cmds.txtMeaning of AutoSys status:STATUS AUTOSTATUS MeaningRU RUNNING RunningST STARTING StartingSU SUCCESS SuccessFA FAILURE FailureTE TERMINATED TerminatedOI ON_ICE On IceIN INACTIVE InactiveAC ACTIVATED ActivatedRE RESTART RestartOH ON_HOLD On HoldQW QUE_WAIT Queue WaitRD Refresh DependenciesRF Refresh FilewatcherForecast report from date to infinity:Code: job_depends -t -J ALL -F "mm/dd/yyyy"Display all jobs scheduled to run between these two dates:Code: job_depends -t -J ALL -F:06/01/2008 -T:06/30/2008check if the event procesor is up and runningCode:chk_auto_upDisplay list of available timezones:Code:autotimezone -lGet version information:Code:autoflags -aView Remote Agent log:Code:autosyslog -J jobnameAutoSys Unix xwindows GUI control panelCode:autosc &Check Database connections:Code:autoping -m machinename -D-- ------------------------------------How to list the Autosys jobs thats in failure status using Shell Script-- --------------count=`autorep -J jobname | cut -c108-109|grep "FA" |wc -l`if [ $count -gt 0 ]thenmailx -s "job failed" [email protected] < sample.txtfi-- --------------Please check the batch file whether it is sending "exit 0" immediately after submitting the backup command.-- --------------module load 3rd/autosys/SSSJOBNAME=$1;for i in `autorep -j $JOBNAME | grep -v bx`doautorep -j $i awk '{ if ($6 = SU) sendevent -E FORCE_STARTJOB `$i | awk '{print $1}'` autorep -j `$i | awk '{print $1}'`; fi }' echo `$!`;done-- ----------------autorep -w -J $JOBNAME | awk 'NR>4{print $1}' | while read jobname; do sendevent -E FORCE_STARTJOB "$jobname"; done-- ----------------http://www.unix.com/shell-programming-and-scripting/195143-please-help-me-develop-script-autosys-job.html-- ----------------#!/bin/bash -pjava dothestuffrc=$?if [ $rc -eq 130 ]; then echo "Killed by SIGINT" exit 0fiexit $rc-- ------------------