Autosys commands

Monday, January 13, 2014

Aotosys commands: autorep, sendevent

AUTOREP Command :

(autorep lists a variety of information about jobs, machines, and global variables currently defined in the AutoSys database.)


$autorep -J Nightly_Download

Job Name   Last Start   Last End   ST   RunPri/Xit
________________ _____________________________________ _________
Nightly_Download   11/10/1997   17:0011/10/1997   17:52SU     101/1
Watch_4_file 11/10/1997 17:0011/10/1997 17:13SU 101/1
filter_data 11/10/1997 17:13 11/10/1997 17:24SU 101/1
update_DBMS 11/10/1997 17:24 11/10/1997 17:52SU 101/1

autorep -J Nightly_Download -d

Job Name Last Start Last End ST Run Pri/Xit
________________ ____________________________________________________
Nightly_Download 11/10/1997 17:00 11/10/1997 17:52SU 101/1
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- -------------------------------------------------------
RUNNING 11/10/1997 17:00:12 1 PD 11/10/1997 17:00:17
SUCCESS 11/10/1997 17:52:31 1 PD 11/10/1997 17:52:32
Watch_4_file 11/10/1997 17:00 11/10/1997 17:13 SU 101/1
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- -------------------------------------------------------
STARTING 11/10/1997 17:00:13 1 PD 11/10/1997 17:00:19
RUNNING 11/10/1997 17:00:19 1 PD 11/10/1997 17:00:29 gateway
SUCCESS 11/10/1997 17:13:22 1 PD 11/10/1997 17:13:31
filter_data 11/10/1997 17:13 11/10/1997 17:24 SU 101/1
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- -------------------------------------------------------
STARTING 11/10/1997 17:13:32 1 PD 11/10/1997 17:13:34 gateway
RUNNING 11/10/1997 17:13:38 1 PD 11/10/1997 17:13:45 gateway
SUCCESS 11/10/1997 17:24:23 1 PD 11/10/1997 17:24:30
update_DBMS 11/10/1997 17:24 11/10/1997 17:52 SU 101/1
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- -------------------------------------------------------
STARTING 11/10/1997 17:24:16 1 PD 11/10/1997 17:24:22 gateway
RUNNING 11/10/1997 17:24:20 1 PD 11/10/1997 17:24:29 gateway
SUCCESS 11/10/1997 17:52:23 1 PD 11/10/1997 17:52:31

autorep -J RunData -d -r -1

(detailed report for one run back)


Job Name Last Start Last End ST Run Pri/Xit
_____________ ________________________________________________________
RunData 08/15/1997 12:14 08/15/1997 12:15 FA 2565/11
Status/[Event] Time Ntry ES ProcessTime Machine
-------------- -----------------------------------------------------
STARTING 08/15/1997 12:14:56 1 PD 08/15/1997 12:15:00 venice
RUNNING 08/15/1997 12:14:58 1 PD 08/15/1997 12:15:05 venice
FAILURE 08/15/1997 12:15:00 1 PD 08/15/1997 12:15:05
[*** ALARM ***]
JOBFAILURE 08/15/1997 12:15:04 1 PD 08/15/1997 12:15:10 venice
[STARTJOB] 08/15/1997 12:15:38 0 PD 08/15/1997 12:15:46

autorep -M ALL

(lists all machines defined on the data-server)

Machine Name Max Load Current LoadFactor O/S
_______________ ________ __________________ _____
london 100 0 1.00 Unix
berlin 90 0 0.90 NT
v_italy.rome 0 0 0.00 Unix
v_italy.venice 0 0 0.00 Unix
v_france.paris 100 0 1.00 NT
v_france.cannes 75 0 1.00 NT

autorep -J RunData -o 0

(override report, showing the current one-time job override in effect for the job)

/* -------------------- over -------------------- */
override_job: RunData
/* Over-Ride #2 Set by User: roger@venice on [07/28/1997 16:13:59] */
/* Over-Ride CURRENTLY IN EFFECT.*/
command: /bin/rundata2

autorep -J RunData -o 1


(showing the first one-time job override for the job)

/* -------------------- over -------------------- */
override_job: RunData
/* Over-Ride #1 Set by User: roger@venice on [07/25/1997 18:23:45] */
/* Was RUN on run_num=175, Started on: 07/25 18:24:01 */
command: /bin/rundata1

autorep -G DAY

Wednesday

autorep -G ALL

Global Name Value Last Changed
------------ ------------ -------------------
DAY Wednesday 11/12/1997 12:18:27
AUDIT_DIR /usr/audit11/12 /1997 12:41:00
DINNER_TIME 18:30 11/12/1997 12:40:00
MAX_VAL 2048 11/12/1997 12:30:24

autorep -J Box3 -s -L 2

(summary report on the top two levels of boxes in the job named “Box3”)

autorep -J MyJob -d -t

(include the time zone specification in a detailed report for the last run of the job named “MyJob”)

Job Name Last Start Last End ST Run Pri/Xit
_____________________________ _________________ _______ _____ _______
MyJob 12/10/1997 17:30 12/10/1997 17:30 SU 102/1
(Chicago)
Status/[Event] Time Ntry ES ProcessTime Machine
-----------------------------------------------------------------------------
STARTING 12/10/1997 17:30:05 1 PD 12/10/1997 16:30:13 localhost
RUNNING 12/10/1997 17:30:08 1 PD 12/10/1997 16:30:13 localhost
SUCCESS 12/10/1997 17:30:10 1 PD 12/10/1997 16:30:13
[STARTJOB] 12/10/1997 17:30:00 0 UP
<Event was Scheduled based on Job Definition.>

autorep -J ALL -q > dump_file

The output of this command is formatted exactly as a JIL job
definition script, like this:

insert_job: test_job
job_type: c
command: sleep 60
machine: juno
#owner: jerry@jupiter
permission: gx,ge,wx
alarm_if_fail: 1

You can save this file as a backup of job definitions, or you can use a
text editor to quickly edit the job definitions. To re-load the job
definitions into the AutoSys database, using the following jil
command:

jil < dump_file

SENDEVENT

(Sends events to AutoSys for a variety of purposes, including starting or stopping AutoSys jobs, stopping the Event Processor, and putting a job on hold. This command is also used to set AutoSys global variables or cancel a scheduled event.)


sendevent -J test_install -E STARTJOB

To start a job named “test_install” that has no starting conditions (and therefore must be started manually)


sendevent -J wait_job -E FORCE_STARTJOB -C "tired of waiting,forced it"

To force a job to start named “wait_job”, which is waiting on the completion of another job, and explain the reasons for your action.


sendevent -J ready_to_run -E JOB_ON_HOLD -P 1

To change the status of a job called “ready_to_run” to ON_HOLD to prevent its execution, and to assign the sendevent command a high priority so it will be sent immediately,


sendevent -J ready_to_run -E JOB_OFF_HOLD

When you want the above job to run, enter this


sendevent -J lock_out -E JOB_ON_HOLD -T "11/08/1997 11:00"
sendevent -J lock_out -E JOB_OFF_HOLD -T "11/08/1997 14:00"

To prevent a job called “lock_out” from running between the hours of 11:00 a.m. and 2:00 p.m., a pair of sendevent commands could be used to place it on hold during that time.


sendevent -E COMMENT -C "have not received EOD files - an hour late again"

write a comment into the Event Processor log file


sendevent -E STOP_DEMON -T "11/09/1997 02:30" -C "stopped for upgrade"

To stop the Event Processor at 2:30 a.m. on November 9, 1997 (it is always a good idea to attach a comment to this event)


sendevent -J resource_hog -E CHANGE_PRIORITY -q 10 -M 5

To change a job called “resource_hog” to a lower priority (it is currently at 1 and is not yet running), and to only issue the sendevent command 5 times, rather than letting it try indefinitely. command will change the job queue priority only for the next run of the job.


sendevent -J wrong_job -E KILLJOB -S PRD

To kill a job named “wrong_job” which is running on another AutoSys instance called “PRD”,


sendevent -E SET_GLOBAL -G "today=12/25/1997"

To set a global variable named “today” having a value of “12/25/1997”,


sendevent -E SET_GLOBAL -G "today=DELETE"

To delete the global variable named “today”,


sendevent -E SEND_SIGNAL -J RunData -k 1

To send the Unix signal number 1 to a job named “RunData”,


sendevent -E JOB_OFF_HOLD -J RunData -u

To cancel all unprocessed JOB_OFF_HOLD events for a job named “RunData”,


Sunday, January 05, 2014

Checking System Status(Autosys command Examples)

autoflags:

 Prints information about AutoSys and the system configuration.

options:-
 -a
Displays all autoflags information to standard output.
-i
Displays the AutoSys tape ID number to standard output.
-o
Displays the operating 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 AutoSys release number to standard output.
-h
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 3.4 0 c0a9e38d venice



autoping :

  • Verifies that the server and client machines are properly configured and are communicating successfully.
  • It also checks and verifies that the Remote Agent and the Remote Agent’s database connection are functioning correctly.
  • When autoping is executed, the server (the machine from which autoping
    is issued) establishes a connection with the client machine, which starts
    a Remote Agent on that machine, and the server waits for the Remote
    Agent to respond. If successful, the following message will be displayed
    on standard output at the server:
    AutoPinging Machine[machine]
    AutoPing WAS SUCCESSFUL! 
 


Saturday, January 04, 2014

Autosys commands (Brief description)

Task                                     Command 
                                      

Accessing Sybase                    xql 
Checking System Status          autoflags 
                                            autoping 
                                            autosyslog 
                                            chase 
                                               chk_auto_up 
Converting cron to JIL             cron2jil 
Defining AutoSys Jobs
or Machines                           jil 


Defining Calendars                 autocal_asc 
                                            autocal
Installing and
Managing License Keys           gatekeeper

Maintaining Databases           archive_events 
                                           clean_files 
                                              dbstatistics 
Managing Security                 autosys_secure 
Monitoring Jobs                     autocons 
Recording Sounds                  record_sounds 
Reporting Job
Dependencies and
Conditions                             job_depends 

Reporting Job Status              autorep 
                                              autostatus 
                                           monbro 
Starting AutoSys                    eventor 
Stopping AutoSys                  sendevent 



























 

Job Information Language (about jil script)

  • JIL is a specification language. 
  • It has its own syntax.
  • It is used to describe when, where and how job should run.
  • When you enter the jil command, you get the jil command prompt, at which you can enter the job definitions one line at a time using this special language.
  • In this case, When you exit the jil command-line interface, the job definition is loaded into the database.
  • Alternatively, you can enter the definition as a text file and redirect the file to the jil command.
  • In this case, the jil command activates the language processor, interprets the information in the text file, and loads this information in the database.