Tuesday, February 23, 2016

Autosys job alias

Here are some of the common alias that can save your time

Sunday, October 18, 2015

Autosys - Were is the best place to disable "ForceStart"


I have to disable "ForceStart" due to too many oops.

1)  Were is the best place to do it.
2) What to use to replace it. How easy or hard is to train people to use this new method.


Solution

- on start up of the EP.
- it makes more sense there rather than using EEM.

- eem for a whole different animal.
- but you do have to allow forcestarts of some sort, you can restrict whom with eem.




Source: - autosys forum

Monday, August 24, 2015

Autosys - scp failed

Problem
trying to setup SCP job type for testing purpose in autosys server (please note: source and destination server is same) but getting error as “Invalid AFM. Password is missing or invalid”, below are the JIL definition of job and error for reference.

Autosys version : R11.3
OS : RHEL 6
Source /destination machine : Autosys
Source location : /appctl2
Destination location : /appctl1
Source file Name : a1

/* ----------------- sftp_upload ----------------- */

insert_job: sftp_upload job_type: SCP
machine: Autosys
owner: autosys
alarm_if_fail: 1
scp_transfer_direction: UPLOAD
scp_server_name: Autosys
scp_server_port: 22
scp_remote_dir: "/appctl1/"
scp_remote_name: "a1"
scp_local_name: "/appctl2/a1"
scp_target_os: UNIX
scp_protocol: SFTP
scp_local_user: autosys



[autosys@Autosys ~]$ autorep -j sftp_upload -d

Job Name Last Start Last End ST Run/Ntry Pri/Xit
________________________________________________________________
sftp_upload 08/17/2015 19:12:05 08/17/2015 19:12:05 FA 31/1 1

Status/[Event] Time Ntry ES ProcessTime Machine
-------------- --------------------- -- -- ---------------------
STARTING 08/17/2015 19:12:05 1 PD 08/17/2015 19:12:05 Autosys
RUNNING 08/17/2015 19:12:05 1 PD 08/17/2015 19:12:06 Autosys
FAILURE 08/17/2015 19:12:05 1 PD 08/17/2015 19:12:06
  <Invalid AFM. Password is missing or invalid>
[*** ALARM ***]
  JOBFAILURE 08/17/2015 19:12:06 1 PD 08/17/2015 19:12:06 Autosys


Currently, i am running my setup in native security mode i.e. autosys_secure no EEM.



Solution
autosys_secure
 you need to put id / indicator  then password. e.g. id myname
indicator SCPID
passwd..
then on

owner field
id@indicator

e.g. myname@SCPID


Problem resolved

Wednesday, August 12, 2015

Autosys Workflow

Workflow





• Step1: The Event Processor scans the Event Server for the next event to processor.If no event is ready,the Event Processor scans again in 5 seconds.

• Step2: The Event Processor reads from the Event Server that an event is ready.The autosys-job definition and attributes are retrieved from the Event Server,including the command and the pointer to the profile file to be used for the schedule

• Step3: The Event Processor processes the event.The Event Processor attempts to establish a connection with the Remote Agent on the client machine and passes the autosys-job ttributes to the client machne.The Event Processor sends a CHANGE_STATUS event marking in the Event Server that the autosys-jobs in STARTING state

• Step4: The Remote Agent is invoked using the UserID and Password passed from the Event Processor.

• Step5: The Remote Agent receives the autosys-job parameters and sends an acknowledgement to the Event Processor

• Step6: The Remote Agent Starts a process and executes the command in the job definition.

• Step7: The Remote Agent issues a CHANGE_STATUS event marking in the Event Server that the job is in RUNNING state

• Step8: The client autosys-job process runs to completion,then returns an exit code to the Remote Agent and quits.

• Step9: The Remote Agent sends the Event Server a CHANGE_STATUS event corresponding to the completion status of the autosys-job.The Remote Agent quits

source: http://autosys-tutorials.blogspot.com/p/workflow.html

Autosys Alarms

Alarms

• Alarms are special events that send notifications during situations requiring attention

• Addresses incidents that require manual intervention

• For example,a set of jobs could be dependent on the arrival of a file and if the file is long overdue.It is important that someone investiage the situation,make a decision and resolve the problem.

• Aspects of alarms include but is not limited to:-
o Alarms are informational only.Any action to be taken due to a problem is intiated by a separate action event.
o Alarms are system messages about a detected problem
o Alarms are sent through the system as an event

source: http://autosys-tutorials.blogspot.com/p/alarms.html

Autosys - Events

Events

• Since Autosys in Event-driven,it requires an event to occur on which the job depends,for a job to be activated by the Event Processor.


• The sources of these events can be:-

o Jobs changing status such as starting,finishing
o Internal Autosys verification Agents such as detected errors.
o Events send with the SENDEVENT command


• While processing an event,the Event processor scans the database for jobs that are dependent on that event


• If the event satisfies another job’s starting condition,that job is run automatically and completion of that job can cause another job to be started,thereby making the jobs progress in a controlled sequence.

source: http://autosys-tutorials.blogspot.com/p/events.html

Autosys Components

Components

Autosys system components are:-
• Event Server
• Event Processor
• Remote Agent




• Event Server (or Autosys Database)
o Data Repository that stores Autosys system information,events and job definitions.
o The Autosys Db is termed ‘Data Server’ which describes a server instance

• Event Processor

o Interprets and processes all the events it reads from the Autosys Database

o A program that actually runs Autosys

o Scans the database for processing events. Checks if the events satisfy the starting conditions of the job and the determines the actions


• Remote Agent

o Temporary process started by the event processor to perform a specific task on a remote machine

o It starts the command specified for a given job, sends running and completion information about a task to the Event Server

o If it is unable to transfer the information, it waits and tries until it successfully communicates with the Db


Interaction Between System Components

• Step1: From the Autosys event server(that holds the Events and Job Definitions info),the Event Processor reads the new event,checks for the condition,reads the job definition and determines the actions.

• Step2: The Remote Agent receives the instructions from the Event Processor

• Step3: The Remote Agent performs resource checks,ensuring minimum specified number of processors are available and then initiates a child process that runs the specified command

• Step4: The command completes and exits,with the Remote Agent capturing the command’s exit code.

• Step5: The Remote Agent directly communicates the event(exit code,status) to the Event Server.