Thursday, January 15, 2009

AutoSys Admin Commands

A collection of autosys admin commands that I use to manage my company's Autosys Infrastructure.

First setup aliases to make your life easier!

Below is how you setup aliases in C shell. If you're using a different shell, then, RTFM!

Add the aliases in your profile

# Send Event
alias se sendevent -E

# Start Job
alias fsj sendevent -E FORCE_STARTJOB -J
alias sj sendevent -E STARTJOB -J

# Job Report
alias jr autorep -J

# Machine Report
alias mr autorep -M

Then, just do the ff commands:

To view job details,
# jr jobname -q

To view job full name and box job
# jr jobname -w

To view job per page
# jr nbu.tok.prd% | pg

To force start a job
# fsj jobname

To ICE a job
# sendevent -E JOB_ON_ICE -J jobname

To un-ICE a job
# sendevent -E JOB_OFF_ICE -J jobname

To kill a job
# sendevent -E KILLJOB -J jobname

To mark job as success
# sendevent -E CHANGE_STATUS -s SUCCESS -j

To mark job as terminated
# sendevent -E CHANGE_STATUS -s TERMINATED -j

To check the job details
# jr jobname -d

To delete a job
# cat job.jil
delete_job: jobname
# jil < job.jil

To update a job
# cat job.jil
update_job: jobname
description: "New Description"
# jil < job.jil

To setup a backup job
# jr existing_job -q > newjob.jil (copy existing job)
# vi newjob.jil (edit entries appropriately)
# jil < newjob.jil (load the job)
# sendevent -E JOB_ON_ICE -J jobname (ice the job)
# fsj jobname (force start the job)

To rename a job
# jr old_job_name -q new_job_name.jil
# vi new_job_name.jil (rename old name with the new one)
# save the file
# jil < new_job_name.jil
# delete old_job_name, by doing
# jil
delete_job: old_job_name (enter)
press ctrl-d

That's it!!!

No comments:

Post a Comment