Autosys is a CA Technologies product
Autosys is a Workload Automation Tool
CA Workload Automation AE is an automated job control system for scheduling , monitoring , and reporting.
JOB
A job is an single command ,executable , script, or batch file. The jobs can reside on any configured machine that is attached to a network.
Corresponding job definitions contain attributes that define the job properties , including the conditions specifying when and where.
Performance Indicator
Job latency
Vertical latency
Horizontal latency
What is AutoSys
Autosys is a automated job control system for monitoring ,reporting and scheduling.
A job is any single command , script , executable file.
Job can reside on any configured machine that is attached to network.
Instance
An AutoSys instance is one licensed version of AutoSys software running as an AutoSys server with one or more clients, on a single machine or on multiple machines.
AutoSys instance is defined by the instance ID - a capitalized three-letter identifier defined by the $AUTOSERV environment variable.
Componenets of Autosys
There are 3 major component of Autosys.
1) Event Server (database sybase and so on)
2) Scheduler
3) Remote agent
An instance uses its own event server and event processor and operates independently of other AutoSys instance
Events
Autosys is a event driven
Manually events are generated using the sendevent command.
Why Autosys
- To Automate any process to make bussiness easy
- To Reduce manual Intervation
- To Deliver required results in time
What is an Event ?
Event is nothing but an action taken on a Job
The action on the job is being performed using sendevent.
AutoSys is completedly event-driven, that is , for a job to be activated by the Event Processor.
Send Event
You can send events for a variety of purposes ,including starting or stopping jobs, Stop the Event processor , Putting a job on hold and etc.
This command is also used to set global variables or cancel a schedule event.
The event that is sent,is written to the database, which the event processor(Scheduler) is continually polling . The event processor (Scheduler) reads and processes the event.
To issue a sendevent on a job, you must have execute permission on that job, Only comments and set global can be sent without regard to permissions
Sendevent can be performed via two ways GUI COMMANDS
Event - find job dependent on this event -> check Conditions --> Starting --> Running -- > Insepects Exit Code of the process(Sucess or failer)
SENDEVENT via Commands
sendevent -E START_JOB -J <Job name>
sendevent -E FORCE_STARTJOB -J <Job name>
sendevent -E KILLJOB -J <Job name>
sendevent -E DELETEJOB -J <Job name>
sendevent -E JOB_ON_HOLD -J <Job name>
sendevent -E JOB_OFF_HOLD -J <Job name>
sendevent -E JOB_ON_ICE -J <Job name>
sendevent -E JOB_OFF_ICE -J <Job name>
sendevent -E CHANGE_STATUS -s STATUS -J <Job name>
sendevent -E <any event> -C "comment to be displayed"
sendevent -E SET_GLOBAL -G "Global variable = value"
Objectives
Types of machines
- Server Machine
An Autosys server machine is a machine on which the scheduler , the event server, and/or both reside.
- Client Machine
An Autosys client machine is one on which the remote agent is installed . This is the machine where the job actually runs.
Types of Jobs
- Command Jobs
Usually executes a command script or run a program
Run under a user id on remote machine
A single action performed on a validated machine.
Can comprise of only one command to be executed in one job.
- File Watcher Jobs
Is a remote process that monitors the existence and size of a file.
If it detects file - success.
It can search only for one file when the job is been defined.
- Box Jobs
Is a container of jobs which comprise of Command , File watcher and even box jobs
It itself performs no action but it can trigger other jobs to run.
Objectives
Autosys Job Status
Autosys keeps track of the current state, or status , of every job.
Here, are the different status of the job:
- INACTIVE(IN)
- ACTIVATED(AC)
- STARTING(ST)
- RUNNING(RU)
- FAILURE(FA)
- TERMINITED(TE)
- RESTART(RE)
- RESOURCE WAIT(RW)
- ON_HOLD(OH)
- ON_ICE(OI)
BOX Logic
Default Box Job Behavior
Jobs run only once per box execution
Jobs in a box will start only if the box itself is running.
Boxes should be used primarly for jobs whith the same starting conditions.
As long as any job in a box is running , the box remains in running state; the box cannot completed until all jobs have run.
By default , a box will return a status of Success only when all the jobs in the box have run and the status of all the jobs is success.
By default, a box will return a status of FAILURE only when all jobs in the box have run and the status of one or more of the jobs is failure.
Unless otherwise specified , a box will run indefinitedly until it reachs a status of SUCCESS or FAILURE.
Changing the state of a box to INACTIVE (throught the sendevent command) changes the stats of all the jobs in the box to INACTIVE.
What Happens when BOX Runs
As a box starts running , all the jobs in the box (including sub-boxes) change to status ACTIVATED , meaning they are eligible to run.
Then each job is analyzed for additional starting conditions. All jobs with no additional starting conditions are started , without any implied ordering or prioritizing.
Jobs with additional starting conditions remain in the ACTIVATED state until those additional dependencies have been met.
HOW TO SET FUTURE SEND EVENT
This is used to schedule an event in the future Date or Time.
Syntax :
sendevent -E JOB_ON_HOLD -J <JOB_NAME> -T "MM/DD/YY YYHH:MM"
Put the job on hold 9:00 a.m.,today
sendevent -E JOB_ON_HOLD -J TESTJOB -T "12/11/2016 09:00"
To take the job off hold at 2:00 pm
sendevent -E JOB_OFF_HOLD -J TESTJOB -T "12/11/2016 14:00"
HOW TO CANCEL FUTURE SEND EVENT
This is used to schedule an event in the future Date or Time
Syntax:
sendevent -E JOB_ON_HOLD -J <JOB_NAME> -U -T "MM/DD/YYYY HH:MM"
What is an Autosys job?
A single action performed on a validated machine which can be a command or executable script or NT batch file.
Autosys jobs can be defined using GUI or JIL which contains a set of qualifying attributes , conditions specifying when and where a job should be run.
Two method to define Autosys job?
Using Autosys GUI
Using Job Information Language(JIL)
JIL(Job information Language)
JIL is a language that has its own syntax to describe when and where and how a job should be run.
Example:
/*******************MY_JOB_1**************************/
insert_job:MY_JOB_1 job_type:c
command://full-path-of-/clean.sh <dirname>
machine: machabcwind
owner:sugnan
start_times:00:10
permission:wx,mx,we,me
description:"Job to clean the <dirname>"
job_terminator:1
alarm_if_fail:0
Essential Attributes
- insert_job(job_name)
- job_type
- owner
- Machine
insert_job : The job name is used to identify the job, and must be unique . It can be from 1 to 30 alphanumeric characters. Command, file watcher, and box jobs cannot use the same name.
insert_job: PC_JOB1
job_type: The job type specifies the type of job : command (c), file watcher(f) or box (b)
job_type c or f or b
owner: The job owner specifies whose user ID the command will be run under on the client machine.
owner: root
machine: This attribute specifies the client machine on which the command should be run.
Machine : server1
General Attributes
- Description
- max_run_alarm
- min_run_alarm
- alarm_if_fail
- std_out_file
- std_err_file
- watch_file
- watch_interval
- watch_file_min_size
- command
- box_name
- job_terminator
- box_terminator
Optional Attributes
- date_conditions
- Start_times/start_mins
- days_of_week
- Condition
- run_calendar
- exclude_calendar
- term_run_time
- n_retrys
- run_window
- job_load
- Prority
CA Workload Automation AE Components
- Event server(database)
- Application server
- Web server
- Scheduler
- Agent
- Client
Event Server
Dual Event Server
Checking Autosys System Confuguration
autoflags
Prints information about AutoSys and the system configuration
-a
Display all autoflags information to standard output
-i
Display the AutoSys tape ID number to standard output
-o
Display the operation system to standard output
-d
Displays the database type to standard output , either SYB for Sybase or ORA for oracle
-v
Displays the AutoSys version number to standard output.
-r
Displays the host-id to standard output to standard output.
-n
Displays the host-name to standard output to standard output.
Example
autoflags -a 3 AIX SYB 11.3.6 1 coae38 prodserver
How to check whether the Autosys is up or down
- chk_auto_up
This command Verifies status of the Unicenter AutoSys JM Scheduler and database.
It determines if the Event Server(database) and the scheduler are running . This is the untility you can use for debugging of Autosys.
- chk_auto_up -r 111
Command gives Event server, Scheduler and Application server status as well.
autoping Command - Verify Server, Agent , and Client Communication
Usage : autoping [-m Machine| ALL][-A][-D][-x][-?]
WHERE:
-m Machine|ALL Machine name to ping , or ALL for ALL machines
-D checks the Database connections from Application Server.
-A Sends an ALARM if there are problems
-x Returns version information
-? Help
# Verify that both client and server are correctly configured.
autoping -m ALL -A -D
autostatus Command - Report Job Status or Global Variable Value.
The autostatus command is a client component utility that reports the current status of the specified job or that current value of a global variable to standard output.
Autosys Command - autostatus
autostatus -J test_job
autostatus -G today
autosyslog Command - Display the scheduler,Application Server, and log File for a Job
Autosys Command - autosyslog
autosyslog -s
as_server Command --Run the Application Server
as_server - Runs the Unicenter AutoSys Job Management(JM) Application Server.
as_server -A autoserv
as_server -A ACE
Application Server Log File
- Path
autorep Command - Report Job ,Machine , and Variable Information.
autorep -M ALL
autorep -G %AUT%
Backup Global Variables
autorep -G ALL > DUMP_GLOBAL_ALL
Backup ALL JILs
autorep -J ALL -q > DUMP_JOBDEFINITION_ALL
First Level reporting
autorep -w -J ALL -L0
autorep -w -J %UT% -L0 | sort
Second Level reporting
autorep -J ALL -L1
Detail info about the job execution
autorep -w -J box_AUT_daily_batch -d
What is currently running
autorep -d -m ALL
Job Status
autorep -J <box/job>
Job Definition
autorep -J <box/job> -q
autotrack Command --Tracks Changes to the Database
autotrack can track changes made to job definitions from JIL or the GUI
It cannot track changes made directly to the database through SQL command.
IN MS Excel:
Find
VLOOPUP
vlookup
File management
pwd
date
who
who am i
ls
man [options] command_name
info command_name
help