Autosys User Guide
Autosys User Guide
AutoSys
User Guide for UNIX
Version 3.4
Table of Contents
Preface
Philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Contacting Technical Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
About This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Whats New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Year 2000 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
PLATINUM ProVision Common Services Integration . . . . . . . . . . . . . . . xxii
Reporting using InfoReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
ServerVision Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
AutoSys/Connect Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Bundled Sybase System 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Security Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Event Processor Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Configuration File Enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Time Zone Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Set Append or Overwrite Behavior for Standard Files . . . . . . . . . . . . . . xxvi
Hewlett-Packard IT/Operations Support . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
User-configurable Title Bar and Icon Text . . . . . . . . . . . . . . . . . . . . . . . xxvii
Expanded Number of Entries in config.EXTERNAL File . . . . . . . . . . . . xxvii
AutoSys Command Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
1 Introduction to AutoSys
AutoSys Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
Defining Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-3
System Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-4
Event Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-5
Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6
iii
Table of Contents
2 AutoSys Security
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Security on Events Sent by Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Security on Events Sent by the Event Processor . . . . . . . . . . . . . . . . . . . 2-5
System-Level Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
AutoSys Database Field Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Job Definition Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Remote Agent Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
AutoSys User and Database Administrator Passwords . . . . . . . . . . . . . 2-10
AutoSys Job-Level Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
AutoSys Job Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
AutoSys User Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
AutoSys Permission Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
Job Permissions and Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
AutoSys Superuser Privileges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Edit Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15
Exec Superuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Restricting Access to AutoSys Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-17
Remote Agent Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
iv
Table of Contents
3 AutoSys Jobs
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
Job Types and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-3
Basic Job Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4
Command Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5
Box Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
File Watcher Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-7
Basic Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8
Command Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8
File Watcher Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
Box Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9
Job States and Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Example State Diagram - Simple Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Example State Diagram - Box Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Starting Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Starting Parameters and Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
Date/Time Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Job Dependencies Related to Job Status . . . . . . . . . . . . . . . . . . . . . . . . 3-18
Event Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Event Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Job Dependencies Based on Exit Codes . . . . . . . . . . . . . . . . . . . . . . . . 3-25
Job Dependencies Based on Global Variables . . . . . . . . . . . . . . . . . . . 3-28
Job Run Numbers and Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
Defining Jobs in AutoSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-30
AutoSys Graphical User Interface Components . . . . . . . . . . . . . . . . . . 3-31
4 Job Attributes
Job Attributes and Job Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3
Using JIL to Create a Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-3
Using the GUI to Create a Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Chapter Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-4
Essential Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5
Attributes Common to All Job Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-5
Command Jobs Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4-6
Table of Contents
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
10-4
10-4
10-5
10-7
10-7
ix
Table of Contents
Table of Contents
10-45
10-45
10-46
10-46
10-49
12 Maintaining AutoSys
Maintaining the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Starting the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Monitoring the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
xi
Table of Contents
13 Configuring AutoSys
AutoSys Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Sample Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
Configuration File Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9
Database Time-out Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-10
Cross-Instance Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
xii
Table of Contents
Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event Processor Cascading Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Machines to Check for Running Event Processors . . . . . . . . . . . . . . .
Third Machine for Event Processor Contention . . . . . . . . . . . . . . . . .
Event Processor Log Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Internal Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Event Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Heartbeats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Remote Agent Log Files Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
File Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SNMP Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HP OpenView IT/Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Number of Restart Attempts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Calculating the Wait Time Between Restarts . . . . . . . . . . . . . . . . . . . .
Method of Load Balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
KILLJOB Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port Number for Remote Agent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Z/Team Job Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Instance Wide Append Parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling PLATINUM Event Management and Data Exchange . . . . .
Inetd Job Starting Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The auto.profile File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Sample Default auto.profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Remote Agent Database Connection Settings . . . . . . . . . . . . . . . . . .
Modifying Remote Agent Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Remote Agent Socket Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Running Two AutoSys Versions of Remote Agents . . . . . . . . . . . . . .
Configuring Remote Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring Event Processor Authentication . . . . . . . . . . . . . . . . . . . .
Client-Side Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Configuring ServerVision Monitoring and Reporting . . . . . . . . . . . . . . . .
Library Path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
svload Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ServerVision Environment Variables . . . . . . . . . . . . . . . . . . . . . . . . . .
13-11
13-12
13-13
13-14
13-15
13-15
13-16
13-17
13-18
13-18
13-21
13-27
13-27
13-28
13-29
13-30
13-31
13-31
13-32
13-33
13-34
13-35
13-36
13-37
13-38
13-38
13-39
13-40
13-41
13-42
13-43
13-43
13-43
13-44
xiii
Table of Contents
14 Troubleshooting
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Event Server Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Event Server is Down (Sybase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Sybase Deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6
Not Enough User Connections (Bundled Sybase) . . . . . . . . . . . . . . . . . 14-7
archive_events Fails (Bundled Sybase) . . . . . . . . . . . . . . . . . . . . . . . . . . 14-9
Event Server Will Not Start (Bundled Sybase) . . . . . . . . . . . . . . . . . . . . 14-11
Event Processor Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-11
Event Processor is Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
Event Processor Will Not Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
Remote Agent Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13
Remote Agent Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13
Remote Agent Will Not Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14
Remote Agent Will Start - Command Will Not Run . . . . . . . . . . . . . . . 14-17
Remote Agent Starts, Command RunsNo RUNNING Event is Sent . 14-20
xql Will Not Start (Sybase Only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-23
Remote Agent Not Found . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-24
Jobs Run Twice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-25
Job Failure Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-26
Jobs Run Only From the Command Line . . . . . . . . . . . . . . . . . . . . . . . 14-26
xiv
Table of Contents
A-13
A-14
A-15
A-15
A-16
A-17
A-18
A-19
A-20
A-21
A-22
A-23
A-23
A-23
A-24
A-24
A-26
Index
xv
Table of Contents
xvi
Preface
Welcome to the world of AutoSys, the scheduling and operations
automation software for distributed computing environments. This
guide describes how to use AutoSys to define and run jobs.
This guide is intended for users who will be responsible for defining jobs
to AutoSys, and monitoring and managing these jobs. It assumes
familiarity with the UNIX operating system, as well as the operating
system on which the jobs will run. It assumes that you have already
installed AutoSys using the AutoSys Installation and Getting Started Guide
for UNIX.
Philosophy
xvii
Preface
Contacting Technical Support
You can contact us with any questions or problems you have. You will be
directed to an experienced software engineer familiar with PLATINUM
AutoSys.
To send Email to PLATINUM Technical Support, use:
Internet
[email protected]
IBM MAIL Exchange
USRWNPSN
To contact PLATINU M Technical Support, use:
USA or Canada, toll free 800-833-PLAT (7528)
IBM Software Mall
PLATSM4
CompuServe
GO PLATINUM
For product assistance or information, contact:
USA or Canada, toll free 800-442-6861
Illinois
630-620-5000
FAX
630-691-0708 or 630-691-0406
Internet
[email protected]
World Wide Web
http://www.platinum.com
Our Mailing Address is:
PLATINUM technology, inc.
1815 South Meyers Road
Oakbrook Terrace, IL 60181-5235
The PLATINUM AutoSys User Guide for UNIX explains how to define, run,
monitor, manage, and control AutoSys. It has been designed to present
information in a natural order so that basic concepts are discussed prior
to more advanced topics.
xviii
Preface
About This Guide
Content Description
Introduction to AutoSys
AutoSys Security
AutoSys Jobs
Job Attributes
xix
Preface
About This Guide
Ch.
No. Chapter Name
xx
Content Description
Preface
About This Guide
Ch.
No. Chapter Name
Content Description
10
11
12
Maintaining AutoSys
13
Configuring AutoSys
14
Troubleshooting
Index
xxi
Preface
Whats New
Whats New
The AutoSys 3.4.2 GUIs and command-line interfaces now support the
specification and display of four-digit years. If you enter a two-digit year,
AutoSys saves the setting to the database as a four-digit year using a date
window rule. If you enter 79 or less, AutoSys prepends 20, and if you
enter 80 or greater, AutoSys prepends 19. That is, if you enter 79, it
becomes 2079, and if you enter 80, it becomes 1980.
You can enable AutoSys to send events to the PLATINUM Event Manager
and Data Exchange. If enabled, AutoSys will send events for every
AutoSys job to the Event Manger. If you have installed the PLATINUM
ProVision common services, you can view these events with the
PLATINUM Director. Enabling Data Exchange instructs AutoSys to write
job definition and job history information to the POEMS common
services repository.
xxii
Preface
Whats New
Job Find
This report allows you to enter a pattern for the job name and report
on all jobs that match the pattern.
Last Run
This report allows you to enter the job name and get information
regarding the last run of the specified job.
Last n Run
This report allows you to enter the job name and get information on
the nth to last run of the job.
You can also configure the InfoReports Viewer to print the reports.
ServerVision Integration
You can use the ServerVision GUIs to monitor the real-time resource
usage of AutoSys jobs. This integration allows you to view AutoSys jobs
by their job name in the ServerVision GUIs. In addition, AutoSys will
archive job resource usage (CPU utilization, I/O reads and writes, and
average memory usage) to generate reports for capacity planning and
UNIX processes auditing (charge back).
A new load balancing command, svload, can be specified in the machine
attribute of an AutoSys job definition. This enables AutoSys to apply
machine performance metrics monitored by ServerVision to select, at
runtime, the best machine on which to run a job.
AutoSys/Connect Integration
xxiii
Preface
Whats New
Security Enhancements
You can now enter NT user IDs and passwords from either a UNIX or
an NT machine, using autosys_secure.
xxiv
Preface
Whats New
AutoInstWideAppend
This parameter specifies whether to overwrite or append to standard error
and standard output files.
FileSystemThreshold
This parameter specifies the minimum amount of disk space that must be
available, or the Event Processor will issue a warning. If the disk space
drops below 8 kilobytes, the Event Processor will shut down.
AutoPems
This parameter enables AutoSys to communicate with PLATINUM Event
Management and Data Exchange.
Jobs with time-based starting conditions that do not specify a time zone
are scheduled to start based on the time zone under which the Event
Processor runs. This time zone is also used to report event times with the
autorep command.
Before you start the Event Processor, ensure that the TZ environment
variable is set. The Event Processor references this setting to determine
the default time zone.
xxv
Preface
Whats New
xxvi
Preface
Whats New
By modifying X resources, you can customize the icon text and title bar
text of the following AutoSys and AutoSys/Xpert GUIs:
AutoSys GUI
Calendar Definition
Autocal
Autocons
Autosc
AutoSys/Xpert: HostScape,
JobScape, and TimeScape
Xpert
The config.EXTERNAL file can contain up to 249 entries. You use this file
to implement cross-instance job dependencies within AutoSys, and to
implement cross-platform dependencies for AutoSys Zeke and Team
Agent integration.
xxvii
Preface
Whats New
archive_events
The archive_events command has the following new argument:
-s num_of_days
autobcp
The autobcp command has two new options which allow you to specify
the source database and the target database. These both default to
autosys. This is the new command syntax:
autobcp source_server target_server dump_file\
autosys_password [source_db_name target_db_name]
autosyslog
The autolog command has been renamed to autosyslog.
autosys_secure
The autosecure command has been renamed to autosys_secure. In
addition, security enhancements (discussed above) were added to
facilitate security administration from both UNIX and Windows NT
platforms.
xxviii
Preface
Conventions
Conventions
Represents
Example
Bold
a new term
alternate
color
Italic
COPY filename
&HIGHLVL.SRCLIB
directories, file names,
command names, computer
code
<>
Press <Enter>.
xxix
Preface
Related Publications
Related Publications
As you use this PLATINUM AutoSys User Guide for UNIX, you might find
it helpful to have these additional books available for reference:
xxx
Release Notes: AutoSys version 3.4 for UNIX, which provides important
information about this release. Please read this before proceeding.
AutoSys Installation and Getting Started Guide for UNIX, which describes
the basic AutoSys configurations, how to install AutoSys, including
how to configure AutoSys components, databases, and high
availability features. In addition, this guide describes how to enter
license keys.
AutoSys Reference Guide for UNIX, which lists the AutoSys commands
and job, machine, monitor, and report definition parameters. It also
describes system states, database tables and views, and the API.
1
Introduction to AutoSys
AutoSys is an automated job control system for scheduling, monitoring,
and reporting. These jobs can reside on any AutoSys-configured machine
that is attached to a network.
An AutoSys job is any single command, executable, script, or NT batch
file. Each AutoSys job definition contains a variety of qualifying
attributes, including the conditions specifying when and where a job
should be run.
As with most control systems, there are many ways to correctly define and
implement jobs. It is likely that the way you utilize AutoSys to address
your distributed computing needs will evolve over time. As you become
more familiar with both the features of AutoSys and the characteristics of
your own jobs, you will also refine your use of AutoSys.
However, before you install and use AutoSys, it is important to
understand the basic AutoSys system, its components, and how these
components work together.
This chapter provides a brief overview of AutoSys, its system architecture,
and features.
AutoSys Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Defining Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
1-1
Introduction to AutoSys
1-2
Introduction to AutoSys
AutoSys Jobs
AutoSys Jobs
Defining Jobs
Using AutoSys utilities, you can define a job by assigning it a name and
specifying the attributes that describe its associated behavior. These
specifications make up the AutoSys job definition. These are the two
methods you can use to create job definitions:
1-3
Introduction to AutoSys
System Components
you exit JIL, the job definition is loaded into the AutoSys database.
Alternatively, you can enter the definition as a text file and re-direct 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 AutoSys database.
System Components
Event Processor
Remote Agent
1-4
Introduction to AutoSys
System Components
AutoSys Server
(UNIX or NT)
UNIX Client
Remote Agent
Event Processor
UNIX Job
NT Client
Remote Agent
Event Server
(database)
NT Job
Event Server
The Event Server or AutoSys database (the RDBMS) is the data repository
for all system information and events as well as all job, monitor, and
report definitions. Event Server refers to the database where all the
AutoSys information, events, and job definitions are stored.
Occasionally, the database is called a dataserver, which actually describes
a server instance. That is, it is either a UNIX or Windows NT process, and
it is associated data space (or raw disk storage), which can include
multiple databases or tablespaces.
Note The AutoSys database refers to the specific server instance and
the autosys database for that instance. Some utilities, such as isql
(Sybase), allow you to specify a particular server and database.
1-5
Introduction to AutoSys
System Components
Event Processor
1-6
Introduction to AutoSys
System Components
Remote Agent
The example scenario in Figure 1-2 and the numbered explanations that
follow it illustrate the interactions between the Event Server, the Event
Processor, and Remote Agents.
In the example, the following UNIX command line is to be run on
WorkStation_2, at the start date and time specified in the AutoSys job
definition:
rm /tmp/mystuff/*
1-7
Introduction to AutoSys
System Components
PROCESS
Remote Agent
Event Processor
Determines Actions
Initiates Action: Start
job on machine command:rm
/tmp/mystuff/*
PROCESS
Event Server
PROCESS
WorkStation_2
UNIX Command
Events
Job Definitions
Local Area
Network
rm /tmp/mystuff/*
Completes execution and
exits with status
Figure 1-2 Interaction of the Event Server, Event Processor, and Remote Agent
Explanation
The following numbered steps explain the interactions in the example
scenario:
1 From the AutoSys Event Server, the Event Processor reads a new event,
which is a start job event with a start time condition that has been
met. Then the Event Processor reads the appropriate job definition
1-8
Introduction to AutoSys
System Components
1-9
Introduction to AutoSys
AutoSys Machines
Interface Components
To define, monitor, and report on jobs, you can use either the AutoSys
GUI or AutoSys JIL. In addition, the Operator Console and its dialogs
provide a sophisticated method of monitoring AutoSys jobs in real time.
This feature lets you view all jobs that are defined to AutoSys, whether or
not they are currently active. If you purchased AutoSys/Xpert, you can use
the Xpert product to monitor, analyze and forecast (simulate) AutoSys
jobs. For information, see the AutoSys/Xpert User Guide for UNIX.
For information on interface components and defining and monitoring
AutoSys jobs, see the chapters in this guide.
AutoSys Machines
1-10
Introduction to AutoSys
AutoSys Instance
AutoSys Instance
Events
Events sent with the sendevent command, sent from the Send Event
dialog, the command line, or user applications.
As each event is processed, the Event Processor scans the database for jobs
that are dependent on that event in some way. If the event satisfies
another jobs starting condition, that job is either started immediately, or
if necessary, queued for the next qualified and available machine. The
completion of one job can cause another job to be started, and in this
way, jobs progress in a controlled sequence.
1-11
Introduction to AutoSys
Alarms
Alarms
Utilities
To help you define, control, and report on jobs, AutoSys has its own
specification language called Job Information Language, or JIL, for
defining jobs, machines, monitors, and reports. This language is
processed by the jil command, which reads and interprets the JIL
statements that you enter and then performs the appropriate actions,
such as adding a new job definition to the database.
AutoSys also provides a set of commands that run essential utility
programs for defining, controlling, and reporting on jobs. For example,
the autorep command allows you to generate a variety of reports about
job execution, and the sendevent command allows you to manually
control job processing.
1-12
Introduction to AutoSys
Basic AutoSys Functionality
The diagram in Figure 1-3 and the numbered explanations that follow it
illustrate how AutoSys performs its most basic functionstarting a job
(i.e., executing a command) on a client machine.
Working through this example will be very helpful for understanding
how AutoSys processes jobs.
Note In Figure 1-3, the major AutoSys components are shown as
separate entities. Typically, the Event Processor and the AutoSys Event
Server are installed on the same server machine (along with a required
Remote Agent), and other Remote Agents are installed on separate
client machines.
1-13
Introduction to AutoSys
Basic AutoSys Functionality
Event Processor
AutoSys Client
Event Server
(Database)
agent
connect
4
7
Remote Agent
6
Client Job
Explanation
1 The Event Processor scans the Event Server for the next event to
If the event is a STARTJOB event, the job definition and attributes are
retrieved from the Event Server, including the command and the
pointer (full path name on the client machine) to the profile file to be
used for the job. In addition, for jobs running on Windows NT
machines, the Event Processor retrieves from the database the user
ID(s) and password(s) required to run the job on the client machine.
1-14
Introduction to AutoSys
Basic AutoSys Functionality
Processor indicating that it has received the job parameters. The socket
connection is terminated. At this point, the Event Processor resumes
scanning the Event Server database, looking for events to process.
6 The Remote Agent starts a process and executes the command in the
job definition.
7 The Remote Agent issues a CHANGE_STATUS event marking in the
1-15
Introduction to AutoSys
Extending AutoSys Functionality
The Event Processor, which is scanning the Event Server, sees the process
completion status, determines if there are dependent jobs, and evaluates
the rest of the dependent jobs starting conditions. For each job found
whose remaining conditions are satisfied, the Event Processor sends a
STARTJOB command to the Event Server, which it will then process in the
next cycle.
You can extend AutoSys with the AutoSys Zeke/Team Agent Integration
components in order to integrate AutoSys jobs with Zeke and the
AutoSys/Team Agent product from PLATINUMs Altai Development Lab.
Using cross-platform job dependency notation, you can define AutoSys
jobs to conditionally start based on the status of a Zeke job running on a
mainframe, and you can define Zeke jobs to conditionally start based on
the status of an AutoSys job. You can also define AutoSys jobs that will
run on a Team Agent machine, if the Team Agent machine is defined to
AutoSys.
In addition, you can install various AutoSys/Adapters. The applicationspecific Adapters allow you to initiate, control, and report on the status
of jobs related to an application using the sophisticated job scheduling
capabilities of AutoSys. Contact your PLATINUM sales representative for
information on supported Adapters.
Figure 1-4 illustrates an extended AutoSys configuration that includes the
AutoSys Zeke/Team Agent Integration components and an
AutoSys/Adapter installation on a UNIX client.
1-16
Introduction to AutoSys
Extending AutoSys Functionality
UNIX Client
AutoSys Server
(UNIX or NT)
UNIX Job
Remote Agent
NT Client
Remote Agent
Event Server
(database)
NT Job
AutoSys/Adapter
Event Processor
Mainframe
(MVS)
Application
oasis-broker
Other OS
(e.g., AS/400)
OASIS
Zeke/Team Agent
Communicator
Zeke
Team Agent
MVS Job
Job
1-17
Introduction to AutoSys
Extending AutoSys Functionality
1-18
2
AutoSys Security
This chapter describes AutoSys security. To set up AutoSys correctly, you
should understand the security features that control where and by whom
a job can be edited or executed. If you are installing AutoSys on both
UNIX and NT, you must understand how security is implemented on
both systems.
For information about AutoSys security on NT, see the AutoSys Security
chapter in the AutoSys User Guide for Windows NT.
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Security on Events Sent by Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Security on Events Sent by the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . 2-5
System-Level Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
AutoSys Database Field Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Job Definition Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Remote Agent Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
AutoSys User and Database Administrator Passwords . . . . . . . . . . . . . . . . . . 2-10
AutoSys Job-Level Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
AutoSys Job Ownership . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11
AutoSys User Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
2-1
AutoSys Security
2-2
AutoSys Security
Overview
Overview
AutoSys security is initiated when either a user sends events that affect the
running of a job or the Event Processor sends events that affect a job.
By using the sendevent command or the Send Event dialog, you can send
execute events that affect the running of a job. These are the execute
events that you can send, if you have the appropriate permissions:
STARTJOB
FORCE_STARTJOB
KILLJOB
DELETEJOB
CHANGE_STATUS
CHANGE_PRIORITY
JOB_ON_HOLD
JOB_OFF_HOLD
JOB_ON_ICE
JOB_OFF_ICE
SEND_SIGNAL
If you start a job by sending an event, the job permissions are checked as
shown in Figure 2-1.
2-3
AutoSys Security
Overview
2-4
AutoSys Security
Overview
Figure 2-1 shows how AutoSys checks for the following when a user starts
a job by sending an event:
1 Checks the database to determine if the job definition was tampered
with. If so, the job definition is invalid, and the job is not run.
2 Does the user match the owner as indicated in the job definition?
3 Is the user the Exec Superuser as defined with autosys_secure?
4 Does the user have job execute permissions as indicated in the job
definition?
5 Is there a machine name in the owner value of the job definition? The
machine portion?
7 Does the job have machine permissions as indicated by the job
definition?
2-5
AutoSys Security
Overview
Figure 2-2 Security when an Event Processor starts a job on a UNIX client machine
2-6
AutoSys Security
System-Level Security
Note In the figure, an asterisk indicates checks that are made only if
the specific method of remote authentication is enabled (see Remote
Agent Authentication on page 2-9).
Figure 2-2 shows how AutoSys checks for the following when the Event
Processor sends a STARTJOB event to a Remote Agent machine:
1 Checks the database to determine if the job definition was tampered
with. If so, the job definition is invalid, and the job is not run.
2 Checks the DES encrypted job definition to determine if the Event
System-Level Security
2-7
AutoSys Security
System-Level Security
To secure the database, AutoSys not only encrypts some fields specified
in a job definition, but also generates a checksum from fields in the job
definition, and stores the checksum in the AutoSys database. Whenever a
job is accessed, its checksum is regenerated and compared to the one in
the database. If the checksums are different, this indicates that someone
tampered with the job definition in the database, probably by using an
SQL command. In this case, the job is disabled and cannot be executed.
To re-enable a disabled job, the owner or the Edit Superuser must access
the definition and re-save it, by using either the JIL update_job
sub-command or the Job Definition dialog.
2-8
AutoSys Security
System-Level Security
User authentication
User Authentication
This remote authentication method uses UNIX ruserok() authentication
to verify that a user has permission to start a job on an AutoSys client
machine. It accomplishes this by telling the clients Remote Agent to
make the ruserok() UNIX system call to check the client machines
/etc/hosts.equiv and the users .rhosts file to validate that the
requesting user is registered in that environment. This function call
performs a local verification, and it is not related in any way to rshd or
rlogind. To activate this type of remote authentication, use the
autosys_secure command.
The hosts.equiv and/or .rhosts file entries must match the job owner
and machine name field exactly. For example, if the owner is
tarzan@jungle, the hosts.equiv and/or .rhosts file must contain
jungle. Similarly, if the owner is [email protected], the
hosts.equiv and/or .rhosts file must contain jungle.vine.com. If they
do not match, jobs will fail to run on that machine when ruserok()
remote authentication is in use.
For information on enabling this type of remote authentication, see
autosys_secure in Chapter 1, AutoSys Commands, of the AutoSys Reference
Guide for UNIX.
2-9
AutoSys Security
System-Level Security
When you install AutoSys and configure your database, an autosys user
is added to the database with a password set to autosys. The autosys
user is the owner of the AutoSys database and can make changes to
AutoSys-specific information in the database. To enhance system
security, we recommend that you change the autosys user password
with the autosys_secure command.
When you install AutoSys with bundled Sybase, the database system
administrator ID is sa, and the password is sysadmin. To enhance
security, we recommend that you change the system administrator
password by using the xql utility.
You must supply the autosys and sa user IDs and passwords when
you use several AutoSys utilities. For example, when using the xql utility
to query the database, you must know both the autosys user password
and the sa system administrator password.
2-10
AutoSys Security
AutoSys Job-Level Security
By default, the owner of an AutoSys job is the user who defines that job
on a particular machine. When a user defines a job on UNIX, the user ID
is retrieved from the UNIX environment and attached to the job in the
form of user@machine. The owner is defined by the owner job attribute.
By default, only the owner can edit and execute the job.
The user@machine combination must have execute permission for any
command specified in a job on the machine where the job command is
to run. The job owner must also have permission to access any device,
resource, etc. that the command needs to access. For this process to work,
the job owner must have the appropriate system permissions.
The owners umask write permission is used as the default edit
permission of the job, and the umask execute permission is used as the
default execute permission of the job.
2-11
AutoSys Security
AutoSys Job-Level Security
Like UNIX, AutoSys uses the notion of these three types of users for any
job:
Owner.
Group.
World.
Every user.
AutoSys uses the UNIX user ID (uid) and group ID (gid) of a jobs owner
to control the following:
The owner of a job can allow other users to edit and execute the job by
setting the permissions in the job definition (discussed in the next
section).
By default, only the owner has edit and execute permissions on a job, and
all edit and execute permissions are valid only on the machine on which
the job was defined. However, the owner can grant different types of
permissions when defining a job.
Similar to UNIX, AutoSys associates different types of permissions with
each job. Every job has the following permission types:
Edit.
2-12
AutoSys Security
AutoSys Job-Level Security
Execute.
Machine.
Note In order for a job to run on a machine other than the one
on which the job was defined, the owner of that job must have an
account on that machine.
Granting Permissions
The owner of a job cannot override his or her ownership designation;
only the Edit Superuser has the authority to change the owner job
attribute. However, the owner can grant other users edit and execute
permissions for a job by using the GUI or JIL to set the permission job
attribute in the job definition.
The following table shows the permissions that you can set by using JIL
or the Permission toggle buttons on the Job Definitions Advanced
Features dialog.
GUI
JIL
Meaning
Group Execute
gx
Group Edit
ge
2-13
AutoSys Security
AutoSys Job-Level Security
GUI
JIL
Meaning
mx
me
World Execute
wx
World Edit
we
Users can edit the job if logged onto the machine where
the job was created (the machine specified in the owner
attribute, i.e., user@machine).
Note A job and the command it executes will always run as the user
specified in the owner attribute of the job definition. Execute
permissions determine who can execute events against the job, but
not who the job runs as. Even if World Execute permissions are
granted, the job will still run as the user.
If you are defining jobs and running them on different operating systems,
keep the following in mind:
2-14
AutoSys Security
AutoSys Superuser Privileges
Edit Superuser
2-15
AutoSys Security
AutoSys Superuser Privileges
Exec Superuser
Issue commands that affect the running or the state of any AutoSys
job, either using the sendevent command or the Send Event dialog.
operator.
2-16
AutoSys Security
Restricting Access to AutoSys Jobs
Using the UNIX chmod command, you can change permissions on many
AutoSys files to control which users can view jobs, execute jobs, edit jobs,
and change calendars.
First, you must ensure that only authorized users can change permissions
on the files and directories in the AutoSys directory structure.
Then, you should determine what level of security you want, for example:
Any user can view jobs and reports about jobs, such as using autorep
to see the status of a job, but only authorized users can create jobs and
calendars or make changes to them.
If you want only authorized users to access AutoSys, ensure that only
those users have execute permissions on the files in the AutoSys bin
directory.
If you want all users to view reports about jobs, but only authorized users
to create and edit jobs and calendars, ensure that the following AutoSys
files in the $AUTOSYS/bin directory are executable only by the authorized
users. This will also prevent unauthorized users from making changes to
the AutoSys configuration.
DBMaint
clean_files
jobscape*
archive_events
dbspace
sendevent
autocal
dbstatistics
timescape*
autocal_asc
gatekeeper
xql
autocons*
hostscape*
zappls
autotimezone
jil
zql
2-17
AutoSys Security
Restricting Access to AutoSys Jobs
You should also protect the files in the $AUTOUSER directory from
modification by ensuring that only users authorized to change the
AutoSys configuration have write permission on the files. Read
permission is necessary to source the AutoSys environment files.
In the auto.profile file for the Remote Agent machine, you can specify
a list of users whose jobs are prohibited from running on that machine.
For information on this, see Client-Side Security in Chapter 13, Configuring
AutoSys.
2-18
3
AutoSys Jobs
This chapter describes AutoSys jobs and provides information about
their different states and starting parameters.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Job Types and Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Basic Job Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Command Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Box Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6
File Watcher Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
Basic Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Command Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
File Watcher Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Box Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Job States and Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-10
Example State Diagram - Simple Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-12
Example State Diagram - Box Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-14
Starting Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Starting Parameters and Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-16
Date/Time Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
3-1
AutoSys Jobs
3-2
AutoSys Jobs
Introduction
Introduction
Figure 3-1 illustrates the structure of a job. There are three types of jobs:
Command, File Watcher, and Box. These job types have a majority of job
attributes in common, and AutoSys treats them all similarly. The primary
differences between them are the actions that are taken when the job is
run.
3-3
AutoSys Jobs
Job Types and Structure
Job
Basic Job
Information
Definition
Current State
Job
Types
Action
Name
Starting Conditions
Alarms
Restart Conditions
Depends On
Current status
Start time
End time
Exit code
Command
Command to execute
File to source
Machine to run on
Standard output files
Standard input file
Run Command
on Machine
File Watcher
Box
Container
File Name
Minimum File size
Watch Interval
As their names imply, Command Jobs execute commands, Box Jobs are
containers which hold other jobs (including other boxes), and File
Watcher Jobs watch for the arrival of a specified file.
In Figure 3-1, the attributes listed inside the Job region comprise what is
called the Basic Job Information, and are common to all jobs regardless
of type. These attributes include the identifier name, the starting
conditions, any specified alarms, the restart conditions, and a variety of
other settings not shown (such as the box, if any, the job is in).
Notice in Figure 3-1 that a jobs starting conditions can be contingent on
the date, time, and the status of any other job.
3-4
AutoSys Jobs
Job Types and Structure
Command Jobs
3-5
AutoSys Jobs
Job Types and Structure
Box Jobs
In the AutoSys environment, the Box Job (or box) is a container of other
jobs. A Box Job can be used to organize and control process flow. The box
itself performs no actions, although it can trigger other jobs to run. An
important feature of this type of job is that boxes can be put inside of
other boxes. When this is done, jobs related by like starting conditions
(not by similar application types) can be grouped and operated on in a
logical way.
Note Box Jobs are very powerful tools for organizing, managing,
and administering large numbers of jobs that have similar starting
conditions and/or have complex logic flows. Knowing how and when
to use boxes is often the result of some experimentation
For more information on Box Jobs, see Chapter 5, Box Job Logic.
3-6
AutoSys Jobs
Job Types and Structure
AutoSys starts a job if the current time matches, or is later than, the start
time. In addition to explicit starting conditions, jobs inside of boxes have
the following implicit condition: the Box Job itself is running. This
means that jobs inside of a box will start only if the Box Job itself is
running. However, if a job inside a box starts and the Box Job is stopped,
the started job runs to completion.
Note Some caution must be exercised when placing a job with more
than one time-related starting condition in a box. For example, a job
that runs at 15 and 45 minutes past the hour is placed in a box that
runs every hour. The first time the box starts, the job runs at 15
minutes past the hour. A future start is then issued for 45 minutes past
the hour, by which time the box has completed. As a result, the job
will not run until the box is running again at the top of the next hour.
At that time, the job runs as soon as the box starts because it is past
the start time. The job runs, another future start job is issued for 15
minutes past the hour, the box completes, and the cycle repeats itself.
3-7
AutoSys Jobs
Basic Job Attributes
For each of the three AutoSys job types, some job attributes are required.
There are additional optional attributes that you can use for more
advanced job definitions.
Note The owner attribute is required for all job types, but is
The basic Command Job definition has the following required attributes:
Job Name
The unique job identifier by which a job is referenced.
Command
The UNIX shell script, command, or application program to be
executed.
Machine Name
The name of the machine on which the command is to be run.
Starting Conditions
The date/time and/or job dependency conditions necessary for the job
to be run. (Strictly speaking, this is not required, such as in cases
where a job will always be started manually.)
3-8
AutoSys Jobs
Basic Job Attributes
The basic File Watcher Job definition has the following required
attributes:
Job Name
The unique job identifier by which a job is referenced.
File Name to Watch For
The name of the file for which to watch.
Machine Name
The name of the machine on which the command is to be run.
Starting Conditions
The date/time and/or job status conditions necessary for the job to be
run. (Strictly speaking, this is not required, such as in cases where a
job will always be started manually.)
The basic Box Job definition has the following required attributes:
Box Name
The unique job identifier by which the box is referenced. This name is
used by other jobs as the name of their parent box.
Starting Conditions
The date/time and/or job status conditions necessary for the job to be
run. (Strictly speaking, this is not required, such as in cases where a
job will always be started manually.)
3-9
AutoSys Jobs
Job States and Status
AutoSys keeps track of the current state, or status, of every job. The value
of a jobs status is used to determine when to start other jobs that are
dependent on the job. The job status is displayed in the job report
generated by the autorep command, and in the job report you can view
in the Job Activity Console.
A job can have one of the following statuses:
INACTIVE
The job has not yet been processed. Either the job has never been run,
or its status was intentionally altered to turn off its previous
completion status.
ACTIVATED
The top-level box that this job is in is now in the RUNNING state, but
the job itself has not started yet.
STARTING
The Event Processor has initiated the start job procedure with the
Remote Agent.
RUNNING
The job is running. If the job is a Box Job, this value simply means that
the jobs within the box might be started (other conditions
permitting). If it is a Command or File Watcher Job, the value means
that the process is actually running on the remote machine.
3-10
AutoSys Jobs
Job States and Status
SUCCESS
The job exited with an exit code equal to or less than the maximum
exit code for success. By default, only the exit code 0 is interpreted
as success. However, a range of values up to the maximum exit
code for success can be reserved for each job to be interpreted as
success. If the job is a Box Job, this value means that all the jobs within
the box have finished with the status SUCCESS (the default), or the
Exit Condition for Box Success evaluated to true. (These exit
conditions are discussed further in later sections.)
FAILURE
The job exited with an exit code greater than the maximum exit code
for success. By default, any number greater than zero is interpreted as
failure. If the job is a Box Job, a FAILURE status means either that at
least one job within the box exited with the status FAILURE (the
default), or that the Exit Condition for Box Failure evaluated to true.
AutoSys issues an alarm if a job fails.
TERMINATED
The job terminated while in the RUNNING state. A job can be
terminated if a user sends a KILLJOB event or if it was defined to
terminate if the box it is in failed. If the job itself fails, it has a FAILURE
status, not a TERMINATED status. A job might also be terminated if it
has exceeded the maximum run time (term_run_time attribute, if one
was specified for the job), or if it was killed from the command line
via a UNIX kill command. AutoSys issues an alarm if a job is
terminated.
RESTART
The job was unable to start due to hardware or application problems,
and has been scheduled to restart.
QUE_WAIT
The job can logically run (i.e., all the starting conditions have been
met), but there are not enough machine resources available.
3-11
AutoSys Jobs
Job States and Status
ON_HOLD
This job is on hold and will not be run until it receives the
JOB_OFF_HOLD event.
ON_ICE
This job is removed from all conditions and logic, but is still defined
to AutoSys. Operationally, this condition is like deactivating the job.
It will remain on ice until it receives the JOB_OFF_ICE event.
The difference between on hold and on ice is that when an on
hold job is taken off hold, if its starting conditions are already
satisfied, it will be scheduled to run, and it will run. On the other
hand, if an on ice job is taken off ice, it will not start, even if its
starting conditions are already satisfied. This job will not run until its
starting conditions re-occur.
The other major distinction is that jobs downstream from the job that
is on ice will run as though the job succeeded. Whereas, all
dependent jobs do not run when a job is on on holdnothing
downstream from this job will run.
For details on how on ice affects boxes, see Chapter 5, Box Job Logic.
Figure 3-2 (on page 3-13) depicts the states that simple jobs go through.
In the diagrams, a status is depicted using the following box drawing:
STATE
3-12
AutoSys Jobs
Job States and Status
Figure 3-2 depicts the simplest state transition for a job, in which an
event satisfies the starting conditions for the job.
The job starts, processes, and completes with either a failure or success
exit code.
Event Processor
Event is read by Event Processor
EVENT
STARTING
RUNNING
Remote Agent
Event generated by
Remote Agent
SUCCESS - OR - FAILURE
3-13
AutoSys Jobs
Job States and Status
For a job in a box, the job first goes into the ACTIVATED state when the
top-level box it is in goes into the RUNNING state, as shown in
Figure 3-3. After the job starts, the remainder of the scenario is the same
as for simple jobs.
Event Processor
EVENT
Check Conditions
Event sent by Event Processor indicating that the box is Running. Nothing
actually RUNS. However, this EVENT
may trigger Jobs within the box to run.
RUNNING
SUCCESS - OR - FAILURE
In the case of a box, the box always goes into the RUNNING state as soon
as all its starting conditions are met. This RUNNING event usually
triggers jobs within the box to also start.
3-14
AutoSys Jobs
Starting Parameters
If the job has a priority associated with it, all its starting conditions have
been met, and there are not enough machine resources available, it goes
into the QUE_WAIT state. Once the resources become available, it goes
into the STARTING state, then runs.
The value of status reflects the AutoSys event processing. Therefore, a job
might have actually completed on a machine and if the Event Processor
has not processed that event yet, AutoSys will still show the jobs status
as RUNNING. By displaying the detail of the job (either in the Job
Activity Console, or in the output of the autorep command), you can see
all the events for a job, including those that have not processed yet.
In addition, the status always reflects the most recent event that was
processed. Therefore, after a job has completed, the status will remain as
it is on completion. If it ended successfully, the status will remain as
SUCCESS until the job is run again.
Note When a Box Job starts, all jobs within the box change state to
ACTIVATED before they run. Jobs will then run immediately, unless
other conditions apply. If a box completes before a job is run, the job
is set to INACTIVE at the time of box completion. As a result, jobs do
not retain their statuses from previous box processing cycles once a
new box cycle has begun.
Starting Parameters
Date and time scheduling parameters are met (it is or has passed the
specified date and time).
3-15
AutoSys Jobs
Starting Parameters
Every time an event changes any of the above conditions, AutoSys finds
all the jobs that might be affected by this change, and determines
whether or not to start them.
Note It is very important to keep in mind the above four conditions.
In order for a job to start, all defined starting conditions must be true.
Be aware that for a job in a box to start, the Box Job must be running.
Placing a job in a box means that the job inherits all the starting
conditions of the Box Job. It also means that if there are no additional
conditions on the job, it will be started as soon as the box is started. Also,
a job runs only once per box execution.
By default, there is no concept of sequential job processing in a box. For
example, if there are three jobs inside a box, and none of them has any
additional conditions, then when the box is started, all three jobs will be
started.
To implement a sequence within a box, you must specify additional
starting conditions for each job. For example, Job1 may have no
starting conditions, while Job2 is dependent on the completion of
Job1, and Job3 is dependent on the completion of Job2.
Be aware that if this scenario were implemented and Job2 were placed
ON_ICE, then Job1 and Job3 would start simultaneously as soon as
the box they are in started running. (Jobs that are dependent on a job that
is ON_ICE run as if that starting condition has been satisfied).
3-16
AutoSys Jobs
Starting Parameters
Date/Time Dependencies
Custom Calendars
Using the Graphical Calendar Facility or the autocal_asc utility, you can
define any number of custom calendars, each with a unique name and
containing any number of dates or date/time combinations. You can use
these calendars in one of two ways: as days on which to run the jobs with
which they are associated, or as days on which to not run the jobs with
which they are associated. Calendars exist independently of any jobs that
may be associated with them; they are referenced by jobs through job
definitions.
3-17
AutoSys Jobs
Starting Parameters
You can start jobs based on the current status of one or more jobs. These
jobs must exist in the AutoSys database. These starting conditions enable
you to program simple or complex prerequisites that must be met in
order to initiate a job.
Starting conditions can be as simple as specifying JobB to start when
JobA achieves a SUCCESS status, and JobC to start when JobB
achieves a SUCCESS status. In this way, you can implement a singlethreaded, batch queue-like logic.
Note If a condition is specified for an undefined job, the condition
will be evaluated as FALSE, and any jobs dependent on this condition
will not run. To check for this type of invalid condition statement, you
can use the chk_cond stored procedure.
The syntax for defining job dependencies is the same whether the job is
being defined using JIL or the GUI. The only difference is the JIL
statement will begin with the JIL condition keyword, while the GUI field
will only contain the language for the dependency itself. The dependency
specification can take one of the following three forms:
where:
status is one of the following:
success
3-18
AutoSys Jobs
Starting Parameters
failure
3-19
AutoSys Jobs
Starting Parameters
The job_name argument is a job defined for the instance indicated by the
autoserv argument, which is the instances unique, capitalized
three-character identifier.
In addition, jobs can be associated with more than one instance of
AutoSys. For example, a job defined to run on one instance of AutoSys
could have as a starting condition the successful completion of a job
running on a different instance of AutoSys.
The specification for such a job dependency might look like this:
condition: success(jobA) AND success(jobB^PRD)
3-20
AutoSys Jobs
Starting Parameters
config .ACE
config.EXTERNAL
Event
Server
Event
Processor
condition: success(jobB^PRD)
jobE
Event
Server
config.PRD
config.EXTERNAL
Event
Processor
jobB
condition: success(jobE^ACE)
Different instances of AutoSys can run from the same executables and can
have the same values for $AUTOSYS and $AUTOUSER, both on the Event
Processor machine and on machines running Remote Agents. However,
they must have a different value for $AUTOSERV.
For information on configuring AutoSys for cross-instance job
dependencies, see the Running Cross-Instance Job Dependencies section in
Chapter 1, Introduction to AutoSys of the AutoSys Installation and Getting
Started Guide for UNIX.
3-21
AutoSys Jobs
Starting Parameters
Event Processors
Event Servers
An entry to the ext_job table of the issuing instance. The entries in this
table specify the status of jobs in other instances in which this instance
has an interest.
In both tables above, jobs are entered using the job name, a caret symbol
(^), and the instance name, as shown below.
jobB^PRD
3-22
AutoSys Jobs
Starting Parameters
3-23
AutoSys Jobs
Starting Parameters
As indicated in this example, you can use any job status as part of the
specification for a specific jobs starting conditions. With this latitude,
you can program branching paths that must be taken and that will
provide alternate actions for error conditions.
For example, if JobB fails after processing only partially, you might
want to call a routine titled Backout that backs out of the changes that
were made. You would specify the following job dependency in the job
definition for Backout:
failure(JobB)
Or
f(JobB)
You use the notrunning operator to keep multiple jobs from running
simultaneously (i.e., running one job is exclusive of any others). For
example, it might be best not to run a database dump (DB_DUMP) and
a file backup (BACKUP) at the same time. This would cause the hard
disk to be accessed very frequently. However, you might have a smaller
job that can run as long as both of these resource-intensive jobs arent
running. You would specify the smaller jobs dependency like this:
notrunning(DB_DUMP) AND notrunning(BACKUP)
Note If you have jobs that you want to run exclusively, use the
virtual machine and job queueing feature described in Chapter 9, Load
Balancing and Queuing Jobs.
3-24
AutoSys Jobs
Starting Parameters
When a Box Job is started, all the jobs within the box have their status
changed to ACTIVATED. Therefore, downstream jobs in the box that
depend on the completion of jobs upstream in the same box will use
only the completion statuses from this run of the box. Placing the jobs in
one processing cycle inside a top-level box and setting the box to start at
the beginning of the processing cycle will prevent time-critical jobs from
being affected by invalid information.
When a job is first entered into the database, and prior to its being run
for the first time, its status is set to INACTIVE. By changing to INACTIVE
the status of jobs that have completed, but whose completion status
should no longer be used in dependent job conditions, the completion
status from the last run will no longer be the current status, and it will not
be used.
To change a job status to INACTIVE, use the GUI (Send Event dialog), or
use the sendevent command. Of course, you can create an AutoSys job to
accomplish this as well. If you change the status of a top-level box to
INACTIVE, all the jobs in the box are recursively set to INACTIVE.
Deleting and reinserting the job using JIL will accomplish the same thing.
However, the past reporting history on the job will no longer be
available. (Updating a job using JIL does not change the status of the job.)
In addition to job status, you can base job dependencies on exit codes
that indicate completed tasks. In this way, you can implement even more
specific branching logic for recovering from job failures. For example, if
a broken communication line results in JobA failing with an exit code
of 4, when this code is encountered, you want the system to execute a
shell script (JobB) which redials the line. This is the syntax you would
use to specify this type of job dependency:
exitcode (job_name) operator value
3-25
AutoSys Jobs
Starting Parameters
where:
job_name
Is the name of the job upon which the new job is dependent.
operator
You can use any job status or exit codes as part of the specification for
starting conditions. With this latitude, you can program branching paths
that will provide alternative actions for all types of error conditions.
3-26
AutoSys Jobs
Starting Parameters
This example batch file will return a 0 exit code as long as test.tmp exists.
If test.tmp does not exist, the return code is from the del line and not
from the line that executes test. Therefore, this batch file will return a 0
(successful) exit code to Autosys, even if test failed to execute as
intended.
3-27
AutoSys Jobs
Starting Parameters
When test fails with errorlevel 1, this batch file will return an exit code
of 1 from false, whether the test.tmp file exists or not.
Job dependencies can also be based on global variables you set using the
Send Event dialog or the sendevent command. When using global
variables in this way, the value of the expression must evaluate to TRUE
for the job dependency to be satisfied. For example, you have a set of jobs
in a box that are only supposed to run on special occasions, such as only
on your managers approval. In this case, you would set the global
variable named manager-ok to OK, and make the top-level Box Job
dependent on this global variable.
Global variables are referenced using the following expression:
VALUE(global_name) operator value
where:
VALUE
Is the name of the global variable upon which the job is dependent.
3-28
AutoSys Jobs
Job Run Numbers and Names
operator
AutoSys employs the notion of run numbers for jobs. The run number is
a unique integer associated with every run of a job. Consecutive run
numbers are assigned every time a top-level job starts.
A top-level job is a job that is not contained in a box, and these run
numbers are inherited by every job that is in a box. This means that all
jobs within a top-level box have the same run number as the number
used for the run of the box. This design permits runs of nested jobs to be
associated together within the same run.
3-29
AutoSys Jobs
Defining Jobs in AutoSys
If there are restarts of a job, the run number remains the same, and the
ntrys field is incremented. In the standard reports (see the autorep
command in Chapter 1, AutoSys Commands, in the AutoSys Reference Guide
for UNIX), these two values are displayed in the Run column as
run_num/ntry.
The value of run_num/ntry is defined in the runtime environment for the
job, and it is accessible to those shell scripts or executables executed as
the jobs command. This value is contained in the variable $AUTORUN.
AutoSys also maintains a value for each jobs name, which is defined in
the runtime environment for the job. As with $AUTORUN, this value is
accessible to those shell scripts or executables executed as the jobs UNIX
command. The value is contained in the variable $AUTO_JOB_NAME.
You can define jobs in AutoSys using one of two methods: JIL statements
or the GUI (in the Job Definition dialog). When you use JIL statements,
you can input them interactively to the jil command, or you can store
them in text files, which you can redirect into the jil command.
Alternatively, you can open the GUI by using the autosc command, and
you can enter the job definition by filling in the appropriate fields of the
Job Definition dialog and its associated dialogs.
You should back up your job definitions periodically, so you can have a
file to restore from in case of system failure. This process is explained in
the Backing up AutoSys Definitions section in Chapter 12, Maintaining
AutoSys.
3-30
AutoSys Jobs
Defining Jobs in AutoSys
You can use the AutoSys GUI to interactively define, run, manage,
monitor, and report on jobs. AutoSys provides the following top-level
windows and dialogs, which you can launch from the AutoSys GUI
Control Panel:
Job Definition dialog
Used to define jobs. The Job Definition dialog and its related dialogs
allow you to create, view, edit, and delete job definitions for
Command Jobs, Box Jobs, and File Watcher Jobs.
Graphical Calendar Facility
Used to define calendar definitions. The Graphical Calendar Facility
and its related dialogs allow you to create calendars in order to
simplify job scheduling. It allows you to create custom rules, block
certain dates, setup conflict resolution, build calendars based on
combinations of other calendars, and preview calendar definitions
before assigning them to jobs. Then, you can assign them to certain
job, using the Job Definition dialog.
Operator Console
Used to monitor and manage AutoSys jobs. The Operator Console
consists of the following components: Job Activity Console, Job
Selection dialog, Alarm Manager dialog, and Alarm Selection dialog.
The Job Activity Console allows you to monitor AutoSys jobs, and to
filter the jobs that it displays, you can use the Job Selection dialog. The
Alarm Manager allows you to browse and handle alarms, and to filter
the alarms that it displays, you can use the Alarm Selection dialog.
Monitor/Browser Used to define monitors and reports. The
Monitor/Browser allows you to define filters by which you can screen
AutoSys system information. Monitors provide real-time views of the
system. Browsers (reports) provide historical views of system
information.
3-31
AutoSys Jobs
Defining Jobs in AutoSys
Note You can also access AutoSys/Xpert from the GUI Control
Panel. For information on using AutoSys/Xpert, see the AutoSys/Xpert
User Guide for UNIX.
3-32
4
Job Attributes
This chapter describes the essential and optional job attributes used to
define jobs in AutoSys. These attributes determine what a job does, as
well as when and where it will run.
Job Attributes and Job Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Using JIL to Create a Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
Using the GUI to Create a Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Chapter Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-4
Essential Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Attributes Common to All Job Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
Command Jobs Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6
File Watcher Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Box Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-9
Optional Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Common Job Starting Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Common General Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-13
Command Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-19
File Watcher Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-25
Box Job Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-26
4-1
Job Attributes
4-2
Job Attributes
Job Attributes and Job Definitions
You define a new job by assigning it a name and specifying any number
of attributes that describe its intended behavior. This specification of a
jobs behavior is called a job definition. There are two methods of
creating a job definition: using JIL and using the AutoSys GUI. Regardless
of method, the specified set of attributes is the same, and the job
definition is always stored in the database.
Before modifying or deleting an existing job, make sure the job is not
running.
You should back up your job definitions periodically so you can have a
file to restore from in case of system failure. This process is explained in
the Backing up AutoSys Definitions section of Chapter 12, Maintaining
AutoSys.
When using JIL to create a job definition, you enter the jil command to
display the jil prompt. At this prompt, you define a job using the
insert_job sub-command followed by any desired attribute:value
statements which specify an action to be performed. You can also use JIL
sub-commands to modify or delete an existing job definition.
Your JIL commands will look like this:
insert_job: job_name
attribute:value
...
where:
job_name
4-3
Job Attributes
Job Attributes and Job Definitions
value
When using the AutoSys GUI to create a job definition, issue the autosc
command select the Job Definition button, and set the various attributes
and their values using the text fields and push-buttons in the Job
Definition dialog.
Chapter Organization
In this chapter, job attributes are organized into two categories: Essential
and Optional. Essential attributes are those that must be specified in
order for the job definition to be accepted. As the name implies, optional
attributes are not necessarily required for a job definition to be accepted.
For each attribute described in this chapter, we indicate its name, its JIL
attribute keyword, its corresponding GUI object, or GUI Field Name, and
a description of its use, as shown below:
Job Type
job_type
Job Type
Attribute description...
JIL Keyword
In the example above, the Job Type attribute, which specifies whether
a job is a command, file watcher, or box, is specified with the JIL keyword
job_type and is identified in the GUI as the field with the name Job
Type.
4-4
Job Attributes
Essential Job Attributes
Because Chapter 2, JIL/GUI Job Definitions, of the AutoSys Reference Guide for
UNIX is organized alphabetically by JIL keywords, the keywords in this
chapter can act as pointers to more detailed descriptions about a
particular attribute in the reference chapter. The heading on each
reference page contains the same JIL keyword on the left and GUI field
name on the right as in the example above.
The following attributes are common to all job types: Command, File
Watcher, and Box. Although defaults may be available, the attributes in
this section are still essential due to the fact that every job definition must
include them, whether by default or by explicit specification.
Job Name
insert_job
Job Name
The job name is used to identify the job to AutoSys, and must be unique
within AutoSys. It can be from 1 to 30 alphanumeric characters, and is
terminated with white space. Embedded blanks and tabs are illegal.
Commands, File Watchers, and Box Jobs cannot use the same name.
Job Type
job_type
Job Type
The job type specifies the type of job: Command (c), File Watcher (f), or
Box (b).
4-5
Job Attributes
Essential Job Attributes
Job Owner
owner
Owner
The job owner specifies whose user ID the command will be run under
on the client machine. This attribute is automatically set to the user who
invoked jil or the GUI to define the job, and cannot be changed except
by the Edit Superuser.
Command
command
Command to Execute
4-6
Job Attributes
Essential Job Attributes
You cannot use the background character (&) in the command attribute.
A shell script can be called to provide that functionality.
All commands are run under the Bourne shell (/bin/sh). Therefore, all
statements in the profile must use /bin/sh syntax. For example:
Variable=value; export Variable
If you are running a C-Shell (csh) script, the system will attempt to
source a .cshrc file when it begins interpreting the file. Although this
might be desired, the system will also overwrite any variables defined
in the profile script (the default profile is /etc/auto.profile). If you
do not wish to have the .cshrc file sourced, you must invoke the csh
script with the -f option. For example, this should be the first line of
the script:
#!/bin/csh -f
4-7
Job Attributes
Essential Job Attributes
Machine to Run On
machine
Execute on Machine
You can also specify the svload program or your own, custom load
balancing program in lieu of a machine name. In this case, the Event
Processor will run the program at runtime to select the machine that is
best suited to run the job.
For more information about virtual machines, and how AutoSys chooses
a machine to run on when you specify multiple machines or a load
balancing program, see Chapter 9, Load Balancing and Queuing Jobs.
4-8
Job Attributes
Essential Job Attributes
Machine to Run On
machine
Execute on Machine
This attribute specifies the client machine on which the File Watcher
should run. For a File Watcher, this attribute must specify a single real
machine, defined in the /etc/hosts file on the AutoSys server machine.
The name of the file to watch for must be a legal file name and must
include the full path to the file. All directories in the path must exist, but
the file itself does not have to exist at the time the job is defined.
Environment variables defined and exported in the profile file (the
specified or default), as well as global variables, can be used in the path.
Wildcards cannot be used in the file name.
When using the GUI, this field only appears when the File Watcher type
has been selected. This attribute is used in combination with the Watch
File Minimum File Size and Watch Interval attributes, to determine when
a file is considered to have arrived.
There are no essential attributes for Box jobs other than those listed in
Attributes Common to All Job Types on page 4-5.
4-9
Job Attributes
Optional Job Attributes
The days of the week attribute specifies the days on which the job should
be run. You can specify one or more days, or all for every day.
4-10
Job Attributes
Optional Job Attributes
The days on which a job should not be run can be specified by way of a
custom calendar. Custom calendars, specified through the AutoSys
Graphical Calendar Facility, or the autocal_asc command, can include
any number of dates on which the job should not be run. Each calendar
is stored in the database as a separate object with a unique name, and a
calendar can be associated with one or more jobs, using this attribute or
the run_calendar attribute.
Times of Day
This attribute specifies one or more specific times of day when the job
should be started. The job will be started at each specified time of day, on
every day specified in the associated date attributes. This attribute and the
Specific Times Every Hour to Run (start_mins) attribute are mutually
exclusive.
Run Window
This attribute specifies a time range (or time window) during which a job
can be started. When the starting conditions for a job have been met,
AutoSys checks if the current time is within the specified run window.
The job will not start outside of the specified window. This attribute
controls only when the job will start, not when it will stop running. This
attribute is particularly useful when, for example, it is not known when a
watched-for file will arrive, and there are certain times when jobs
dependent on that file should not run. This setting can prevent a latearriving file from causing a job to run at an inopportune time. The run
4-11
Job Attributes
Optional Job Attributes
window range cannot span more than 24 hours. jobs that are not in a box
must have starting conditions in addition to the run_window attribute in
order for the job to be automatically started.
Note You can also block out times of day when you do not want a
job to start by putting the job on hold, then taking it off hold later.
The sendevent command can be used to accomplish this, executed
either from the command line, through the Send Event dialog, or
from within a shell script or batch file in another job.
Every Hour at
One or more specific times per hour when the job should be started can
be specified. Each time is specified in minutes past the hour. The job will
be started at each specified time every hour of the day, on every day
specified in the associated date attributes. This attribute and the Specific
Times of Day to Run (start_times) attribute are mutually exclusive.
Starting Condition
4-12
Job Attributes
Optional Job Attributes
Description
description
Description
Box Name
box_name
4-13
Job Attributes
Optional Job Attributes
A minimum run time (in minutes) can be specified for a job; the job
should not end in less than the specified time. This may prevent an
inadvertent truncation of the file being processed before it is complete.
If the job does end prior to this time, an alarm is generated to alert
someone to investigate the situation and take corrective action. Alarms
are informational, and they do nothing on their own. A monitor or the
Operator Console must be running and tracking alarms in order for them
to be seen and acted upon in real-time.
A maximum runtime can be specified for a job; the job should not take
longer than the specified time to finish. This reasonability test may
catch an error, such as the application being stuck in a loop, or the
application waiting for additional data which may never arrive. If the job
runs longer than this time, an alarm is generated to alert someone to
investigate the situation and take corrective action. Alarms are
informational, and they do nothing on their own. A monitor or the
Operator Console must be running and tracking alarms in order for them
to be seen and acted upon in real-time.
The attribute Terminate this job Mins after starting (term_run_time)
can be used to automatically terminate a job that has been running for
too long. If term_run_time is not set, the job will continue running until
manually interrupted, or it completes by itself.
A maximum run time (in minutes) can be specified for a job; the job
should not take longer than the specified time to finish. This feature
allows the job to be automatically terminated if it runs longer than the
allotted time.
4-14
Job Attributes
Optional Job Attributes
This attribute specifies whether or not the box containing this job should
be terminated if the job fails or terminates. By using this attribute in
combination with the Terminate the Job if the Box Fails attribute, you
can control how nested jobs react when a job fails. This attribute only
applies if the job is being placed in a box.
This attribute specifies whether or not the job should be terminated if the
box it is in fails or terminates. By using this attribute in combination with
the Terminate the Box if the Job Fails attribute, you can control how
nested jobs react when a job fails. This attribute only applies if the job is
being placed in a box.
4-15
Job Attributes
Optional Job Attributes
This attribute specifies how many times, if any, the job should be
restarted after exiting with a FAILURE status. The default is 0, which
means the job will not be automatically restarted after an application
failure. This attribute applies to application failures (e.g., AutoSys is
unable to find a file or a command, or permissions are not properly set);
it does not apply to system or network failures (e.g., machine
unavailability, the socket connect timed out, the fork in the Remote
Agent failed, or the file system space resource check failed).
The number of restarts after system or network failures is specified using
the MaxRestartTrys parameter in the configuration file.
Time Zone
This attribute allows you to schedule a job based on a chosen time zone.
When this attribute is used, the time settings in the job are based on the
specified time zone. For example, if you define a start time of 01:00 for a
job running on a machine in Denver, and enter SanFrancisco in the Time
Zone field, the job will start at 1:00 a.m. Pacific time, which is 2:00 a.m.
in Denver.
If you specify a time zone that includes a colon, you must quote the time
zone name if you are using JIL. For example:
timezone: "IST-5:30"
If you do not quote a time zone specification that contains a colon, JIL
will interpret the colon as a delimiter, producing unexpected results.
Jobs with time-based starting conditions that do not specify a time zone
will have their start event scheduled based on the time zone under which
the Event Processor is running.
4-16
Job Attributes
Optional Job Attributes
Autohold
auto_hold
Autohold On?
This feature is only for jobs in a box. When a job is in a box, it inherits the
boxs starting conditions. This means that when a box goes into the
RUNNING state, the Box job will start all the jobs within it (unless other
conditions are not satisfied). This is typically the desired behavior;
however, there are occasions when it is not.
For example, you might want to place a job in a box, but not start the job
until a non-job (i.e., operating system level) event arrives. By specifying
yes to Autohold On, AutoSys automatically changes the job state to
ON_HOLD when the box it is in begins RUNNING. At this point, the job
is in exactly the same state as if it were manually placed on hold. To start
the job, take the job off hold by sending the JOB_OFF_HOLD event via
the Send Event dialog or the sendevent command.
Permissions
permission
Permissions
In UNIX, there are three levels of permission by user ID (uid), and within
AutoSys, two levels of job permission.
4-17
Job Attributes
Optional Job Attributes
For more information about setting permissions, see the Overview section
of Chapter 2, AutoSys Security.
4-18
Job Attributes
Optional Job Attributes
Profile
profile
The profile attribute specifies the file to be sourced by the Bourne shell
before the specified command is executed. The AutoSys Remote Agent
always spawns a process and starts the Bourne shell in that process,
passing it the name of the profile to be sourced. This profile typically
includes definitions and exports of environment variables, which can be
referenced in the jobs command. The primary environment variable in
the profile is the $PATH. If a profile is not specified, the default AutoSys
profile, /etc/auto.profile, is used. If the profile attribute is specified,
that profile is searched for on the machine on which the command is to run.
If a command that normally executes when entered at the command line
fails when run as an AutoSys job, it is usually due to the incomplete
specification of the required environment for the command in the
AutoSys profile file.
Note It is essential that no Korn shell and C-shell statements appear
in profile file, because the Bourne shell that AutoSys runs will not be
able to process them. If you include these types of statements,
unexpected results will occur, often interfering with the proper
redirection of the stdin, stdout, and stderr files.
4-19
Job Attributes
Optional Job Attributes
The standard input file can be redirected to any file to which the job
owner has read permission on the client machine. The full pathname
must be specified, although variables exported from the default
/etc/auto.profile or jobs profile file, as well as global variables, can be
used in the pathname specification.
The default is /dev/null.
The standard output file can be redirected to any file on the client
machine to which the job owner has write permission. The full pathname
must be specified, although variables exported from the default
/etc/auto.profile or jobs profile file, as well as global variables, can be
used in the pathname specification. The default is /dev/null.
By default, new information is appended to the file. By placing the
following notation as the first character(s) in the std_out_file
specification, you can specify if the error file should be appended to or
overwritten:
>
Overwrite file
4-20
Job Attributes
Optional Job Attributes
The standard error file can be redirected to any file on the client machine
to which the job owner has write permission. The full pathname must be
specified, although variables exported from the default
/etc/auto.profile or jobs profile file, as well as global variables, can be
used in the pathname specification. The default is /dev/null.
By default, new information is appended to the file. By placing the
following notation as the first character(s) in the std_err_file
specification, you can specify if the error file should be appended to or
overwritten:
>
Overwrite file
Job Load
job_load
Job Load
4-21
Job Attributes
Optional Job Attributes
Queue Priority
priority
Que Priority
The queue priority establishes the relative priority of all jobs queued for
a given machine, with the lower number indicating higher priority. If a
job is ready to run on a designated machine, but the current load on that
machine is too large to accept the new jobs load, the job will be
queued for that machine.
priority only influences the starting of jobs that are queued, unless the
jobs are in a box. If jobs in a box have a priority attribute setting, they
Job Overrides
override_job
You can specify a one-time job override for the next run of a particular job.
An override lets you change the behavior of a job the next time the job
runs.
4-22
Job Attributes
Optional Job Attributes
min_run_alarm
std_in_file
command
n_retrys
std_out_file
condition
profile
term_run_time
date_conditions
run_calendar
watch_file
days_of_week
run_window
watch_file_min_size
exclude_calendar
start_mins
watch_interval
machine
start_times
max_run_alarm
std_err_file
For a description of how to use the GUI to specify job overrides, see
Specifying One-Time Job Overrides in Chapter 6, Defining AutoSys Jobs Using
the GUI.
The maximum exit code for success attribute indicates what exit codes
will be considered by AutoSys as a success. It is used when a command
can exit with more than just a single exit code, indicating either degrees
of success, or other conditions that may not indicate a failure. This
attribute lets you define complex branching logic based on specific exit
code values. AutoSys reserves exit codes greater than 120 for internal use,
so do not use exit codes of 120 or greater.
Average Runtimes
avg_runtime
(JIL only)
4-23
Job Attributes
Optional Job Attributes
times. This attribute is used solely to establish an average runtime for the
new job in the avg_job_runs table, which in turn can be used for
projections and simulations in AutoSys/Xpert.
Heartbeat-Interval
heartbeat_interval
To send a heartbeat from a Bourne shell script, execute the code found in
the following file:
$AUTOSYS/code/heartbeat.sh
For more information about the AutoSys configuration file, see Sample
Configuration File in Chapter 13, Configuring AutoSys. For information on
sending heartbeats, see Sending Heartbeats in Chapter 7, AutoSys API, of
the AutoSys Reference Guide for UNIX.
4-24
Job Attributes
Optional Job Attributes
The watch file minimum size determines when enough data has been
written to the file to consider it complete. This attribute is specified in
bytes. You should specify a reasonable file size to ensure that a nearly
empty file isnt assumed to be complete. Use caution with this attribute.
If you specify a large file size AutoSys will wait for the file to reach that
size, even if the file has reached a steady state and is no longer growing.
Watch Interval
watch_interval
The watch interval specifies (in seconds) how often the File Watcher
should check the current file size to ascertain whether data is still being
written to the file. The default is every 60 seconds.
4-25
Job Attributes
Optional Job Attributes
SUCCESS Conditions
4-26
Job Attributes
Date and Time Attributes and Time Changes
Box Failure
box_failure
FAILURE Condition
Date and Time attributes can be affected by the Spring and Fall time
adjustments. The following sections describe the job run behavior you
should expect, and thus can plan for.
During the changes to and from daylight saving time, your operating
system automatically changes the system clock to reflect the switch to
either Standard Time (ST) or Daylight Time (DT).
In the spring, at 2 a.m., the clocks spring forward to 3 a.m. In most of the
United States, this happens on the first Sunday in April. Figure 4-1
illustrates the time change.
4-27
Job Attributes
Date and Time Attributes and Time Changes
Daylight-saving Time
3:00
1:00
4:00
5:00
1:59
Standard Time
When this change occurs, time runs 1:58 ST, 1:59 ST, 3:00 DT, 3:01 DT,
and the 2:00 to 2:59 hour is lost.
In the fall, at 2 a.m., the clocks fall back to 1 a.m. In most of the United
States, this happens on the fourth Sunday in October. Figure 4-2
illustrates the time change.
Standard Time
1:00
0:00
1:00
2:00
3:00
4:00
1:59
Daylight-saving Time
When this change occurs, time runs 1:58 DT, 1:59 DT, 1:00 ST, 1:01 ST,...,
2:00 ST, 2:01 ST, and the 1:00 to 1:59 hour is repeated.
4-28
Job Attributes
Date and Time Attributes and Time Changes
Jobs that are time dependent may have their scheduling shifted to adjust
for the time change. Jobs that are not time dependent, but have other
starting conditions, will run as normal.
There are two types of time dependencies within AutoSys: absolute, and
relative. Absolute times are defined to occur at a particular time of day,
for example 9:30 on Thursday, or 12:00 on December 25. Absolute time
dependent job attributes include:
days_of_week
exclude_calendar
run_calendar
run_window
start_times
Relative times are specified with respect to either the current time, or
relative to the start of the hour. For example, start a job at 10 and 20
minutes after the hour, or terminate a job after it has run for 90 minutes.
Relative time dependent job attributes include:
auto_delete
max_run_alarm
min_run_alarm
start_mins
term_run_time
watch_interval
During the time change, absolute time attributes will behave differently
than relative time attributes, as described below.
4-29
Job Attributes
Date and Time Attributes and Time Changes
4-30
Job Attributes
Date and Time Attributes and Time Changes
window remains the same. For example, a run window of 1:00 - 2:30 will
have the closing time move to 3:30, so that the run window still remains
open for an hour and a half.
If the specified opening of the run window falls within the missing hour,
its opening time is moved to 3:00. The closing time does not get altered,
therefore the run window is foreshortened. For example, a run window
of 2:45 - 3:45 will become 3:00 - 3:45, and the actual run window elapsed
time will be 15 minutes shorter.
If both the specified opening and closing of the run window is within the
missing hour, its opening time is moved to the first minute after 3:00,
and its closing time is pushed forward one hour. Therefore, the resultant
run window may be lengthened. For example, a run window of
2:15 - 2:45 will become 3:00 - 3:45, or 15 minutes longer.
1:00
2:00
3:00
start_time attribute
runs in second hour
start_mins attribute runs in both hours
0:00
1:00
1:59
Daylight-saving Time
4-31
Job Attributes
Date and Time Attributes and Time Changes
Jobs that are not time-based, but have other dependencies, will still run
during the first hour.
Relative interval calculations, such as max_run_alarm, min_run_alarm,
term_run_time, and watch_interval are still calculated in minutes out
from when the job started. For example, if a job is scheduled to run on
Sunday at 0:30, and has a term_run_time of 120 minutes, the job would
normally be terminated at 2:30. On the day of the fall time change, it will
terminate at 1:30 Standard Time, which is 120 minutes after the job
started.
Run Windows
Run windows are treated a bit differently. If the specified opening of a
run window is before the time change, and its specified closing falls
within the repeated hour, it will close during the daylight saving, or first
hour. For example, a run window of 11:30 - 1:30 will have the closing
time of 1:30 DT, not 1:30 ST, which means that the run window remains
open for its specified two hours. This may be a problem if there are also
associated start times on the job which occur during the repeated hour.
In the example above, if the job also had a start time of 1:15, the start
time would be calculated for 1:15 ST, and the job would not run on the
day of the time change.
If the specified opening of the run window falls within the repeated hour,
its opening time is moved to the second, Standard Time hour. The closing
time does not get altered, therefore the length of the run window will
remain the same. For example, a run window of 1:45 - 2:45 will become
1:45 ST to 2:45, or the same hour in length.
If both the specified opening and closing of the run window is within the
repeated hour, the run window will be open during the second, Standard
Time hour.
4-32
5
Box Job Logic
This chapter explains how Box Jobs work, including default box behavior
and how to override the default behavior. It also explains what types of
jobs should and should not be placed in a box. To illustrate box logic,
several examples of Box Job definitions and job streams are provided in
Examples on page 5-10.
Basic Box Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Default Box Job Behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
When you Should Not Use a Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
What Happens when a Box Runs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-4
Box Job Attributes and Terminators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Attributes in a Box Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Attributes in a Job Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Time Conditions in a Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-7
Force Starting Jobs in a Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8
How Job Status Changes Affect Box Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
Advanced Conditions in Box Jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Default Box Success and Box Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
Explicit Box Success and Box Failure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
5-1
5-2
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.
Default SUCCESS is described in Default Box Success and Box Failure on
page 5-13.
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.
Default FAILURE is described in Default Box Success and Box Failure on
page 5-13.
5-3
The fact that all jobs in a box change status when a box starts running has
lead some to use boxes to implement job cycle behavior. Be aware that
placing jobs in a box to achieve this end may bring with it undesired
behavior due to the nature of boxes.
Avoid the temptation to put jobs in a box as a short cut for performing
events (such as ON_ICE or ON_HOLD) on a large number of jobs at
once. You will most likely find that the default behavior of boxes inhibits
the expected execution of the jobs you placed in the box.
Likewise, you should not place jobs in a box solely because you want to
run reports on all of them. When you run autorep on a box, you will get
a report on the box and all the jobs in the box (unless you use the -L0
option). In addition, if you use wildcarding when specifying a job name,
you could get duplicate entries in your report. For example, suppose you
have a box named acnt_box containing three jobs named acnt_job1,
acnt_job2, and daily_rep. If you specify acnt% as the job name for the
autorep report, the report will have an entry for the box acnt_box and
an entry for each job in the box. Then autorep will continue searching for
all job names matching the wildcard characters and, thus, will list
acnt_job1 and acnt_job2 a second time.
As soon as a box starts running, all the jobs in the box (including
sub-boxes) change to status ACTIVATED, meaning they are eligible to
run. (Because of this, jobs in boxes do not retain their statuses from
previous box cycles.) 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. The box remains in the RUNNING state as
long as there are activated or running jobs in the box.
If a box is terminated before a job in it was able to start, the status of that
job will change directly from ACTIVATED to INACTIVE.
5-4
Note Jobs in a box cannot start unless the box is running. However,
once the job starts running, it will continue to run even if the box is
later stopped for some reason.
Once all the jobs in a box have completed successfully, the box completes
with a status of SUCCESS. The status of the box and the jobs in the box
remain unchanged until the next time the box runs. (Some exceptions to
this are explained in How Job Status Changes Affect Box Status on page 5-9.)
If a box changes to TERMINATED state, for example, if a user sends a
KILLJOB event, it will stay in TERMINATED state until the next time it is
started, regardless of any later state changes of jobs within the box.
simple_box
job_b
SUCCESS job_b
job_c
5-5
If job_b fails, job_c will not start; it will remain in ACTIVATED state.
Because no contingency conditions have been defined, simple_box
will continue running indefinitely, waiting for the default completion
criteria to be met, namely that all jobs in the box ran.
Two Box Job attributes override the default success or failure of a box.
They are box_success and box_failure. If included in a Box Job
definition, they determine what conditions must be met to put the box
in a state of SUCCESS or FAILURE. If you specify conditions for success
of a box you should also specify failure conditions; otherwise the default
failure conditions are applied.
5-6
There are two attributes you can add to the definition of a job within a
box to force either the job or the box to stop running. They are
box_terminator and job_terminator.
The box_terminator: y attribute specifies that if the job fails, the box the
job is in should terminate. If you use this attribute, be sure you have
defined conditions for the other jobs in the box in the event that the box
is terminated. For more information, see Figure 5-7 on page 5-16.
The job_terminator: y attribute specifies that if the box the job is in fails,
this job will terminate. If you want every job in a box to terminate upon
box failure, you must add this attribute to every job definition. For more
information, see Figure 5-8 on page 5-17.
Each job in a box will run only once per box execution. Therefore, you
should not define more than one time attribute for any job in a box
because the job will only run the first time. If you want to put a job in a
box, but you also want it to run more than once, you must assign
multiple start time conditions to the box itself, and define no time
conditions for the job.
Remember also that the box must be running before the job can start. Do
not assign a start time for a job in a box if the box will not be running at
that time. If you do, the next time the box starts, the job will start
immediately.
The following example illustrates a scenario that would not work
properly if placed in a box.
job_a is defined to run repeatedly until it succeeds. job_report has
one starting conditionthe success of job_a.
5-7
bx_stat
3:00 a.m. Daily
job_a
run until succeed
job_report
success(job_a)
Report success of job_a
You can also execute this by selecting the Force Start Job button in the Job
Activity Console.
5-8
If you force start a job in a box, the state of the box influences whether or
not other jobs in the box will run as expected, as shown in the following
example.
bx_report
3:00 a.m. Daily
job_Fwatch
run_stats
success(job_Fwatch)
box_terminator: y
Run Statistics
report_stats
success(run_stats)
Report Statistics
In Figure 5-3, if the job run_stats fails, the bx_report Box job will
terminate because run_stats has a box_terminator attribute. If you force
start run_stats, and it completes successfully, report_stats would still
not start because the box it is in is not running.
The next section discusses how job status changes influence the status of
the container box.
If a box that is not running contains a job that changes status, as a result
of a FORCE_STARTJOB or CHANGE_STATUS event, the new job status
could change the status of its container box. A change of status of the box
could trigger the start of downstream jobs that are dependent on the box.
If a box contained only one job, and the job changed status, the box
status would change as shown in Table 5-1.
5-9
SUCCESS
TERMINATED or FAILURE
FAILURE
SUCCESS
SUCCESS
FAILURE
SUCCESS
SUCCESS
FAILURE
FAILURE
INACTIVE
SUCCESS
SUCCESS
INACTIVE
TERMINATED or FAILURE
FAILURE
TERMINATED
any change
If another AutoSys job is dependent on the status of the box, the status
change could trigger the job to start. If the box status does not change,
dependent jobs are not affected.
If the box contains other jobs in addition to the job that changed status,
the status of the box will be re-evaluated according to the success or
failure conditions assigned to the box (either the default or userassigned). Any jobs in the box with a status of INACTIVE are ignored
when the status of the box is being re-evaluated. For example, consider
an INACTIVE box that contains four jobs, all with a status of INACTIVE
(this is typical of a newly created box). If one of the jobs is force started
and completes successfully, the status of the box will change to SUCCESS
even though none of the other jobs ran.
Examples
Spend some time studying the examples in this section. They will help
explain the logic of job flow in a box and reduce your chances of creating
unexpected box behavior.
5-10
The Box Job named bx_daily_update has date and time conditions
specified for its starting conditions; it runs every day of the week at
3:00 a.m. This box contains three Command Jobs whose overall
purpose is to update files and generate a report.
5-11
bx_daily_update
3:00 a.m. daily
job_update
box_terminator: y
Update files
SUCCESS job_update
FAILURE job_update
job_run_stats
success(job_update)
box_terminator: y
Run statistics
job_report_stats
success(job_run_stats)
Report statistics
FAILURE bx_daily_update
job_trigger_msg
failure(bx_daily_update)
Page operator
SUCCESS job_trigger_msg
5-12
The Box Job do_statistics runs every day at 3:00 a.m. It contains three
jobs. update_accounts updates files; it has no other starting conditions
so it starts as soon as the box starts running. run_stats runs statistics; its
only starting condition is the success of update_accounts.
report_stats reports statistics; its only starting condition is the success
of run_stats. No conditions for success or failure of the box have been
defined, therefore the default conditions are applied. That is, box success
is when all jobs in the box have run and successfully completed; box
failure is when all jobs in the box have run and at least one has failed. The
box will remain in the RUNNING state until all jobs in the box have run.
Figure 5-5 illustrates this job stream logic.
5-13
Job Stream
Job Status
update_accounts
FAILURE
SUCCESS
run_stats
FAILURE
success(update_accounts)
ACTIVATED
SUCCESS
report_stats
success(run_stats)
SUCCESS
Box SUCCESS
5-14
Job Definitions
do_statistics
3:00 a.m. Daily
box_success: success(update_accounts) AND success(run_stats) AND
success(report_stats)
box_failure: failure(update_accounts) OR failure(run_stats) OR
failure(report_stats)
update_accounts
Update Files
run_stats
success(update_accounts)
report_stats
success(run_stats)
Run Statistics
Report Statistics
Job Stream
Job Status
do_statistics
FAILURE
update_accounts
SUCCESS
run_stats
FAILURE INACTIVE
SUCCESS
report_stats
FAILURE INACTIVE INACTIVE
SUCCESS
Box
SUCCESS
5-15
Job Definitions
daily_accounts
3:00 a.m. Daily
daily_receipts
box_terminator: y
daily_payables
box_terminator: y
Process Receipts
Process Payables
daily_balance
success(daily_reciepts)
AND success(daily_payables)
Calculate Balance
Job Stream
daily_accounts
daily_payables
daily_receipts
SUCCESS
SUCCESS
FAILURE
Box
TERMINATED
FAILURE
SUCCESS
TERMINATED
daily_balance
5-16
Job Definitions
daily_accounts
3:00 a.m. Daily
daily_receipts
daily_payables
job_terminator: y
Process Receipts
Process Payables
daily_balance
success(daily_reciepts)
AND success(daily_payables)
Calculate Balance
Job Stream
daily_accounts
daily_receipts
SUCCESS
Box
daily_payables
TERMINATE
SUCCESS
FAILURE
FAILURE
FAILURE
FAILURE
daily_balance
5-17
Job Definitions
job_Fwatch
job_monthly
job_daily
Job Stream
Date/Time
Conditions Met
Start
Job Dependency
Condition Met
Date/Time
Conditions Met
File from
Mainframe
job_Fwatch
SUCCESS
Start
job_monthly
Event Status in
AutoSys Database =
SUCCESS
SUCCESS
Job Dependency
Condition Met
Start
job_daily
Date/Time
Conditions Met
SUCCESS
5-18
Job Definitions
job_Fwatch
job_monthly
job_daily
Generate Report
Job Stream
Date/Time
NOT RUN
job_Fwatch
NOT RUN
Date/Time
NOT Conditions Met
job_monthly
File from
Mainframe
Job Dependency
Condition NOT Met
Event Status in
AutoSys Database =
SUCCESS (from Jan 1)
Job Dependency
Condition Met
Start
job_daily
Date/Time
Conditions Met
SUCCESS
5-19
Job Definitions
job_Fwatch
job_monthly
job_daily
Generate Report
Job Stream
Date/Time
Conditions Met
Start
File from
Mainframe
job_Fwatch
term_run_time: 90
TERMINATED
Job Dependency
Condition NOT Met
NOT RUN
Event Status in
AutoSys Database =
SUCCESS (from Jan 1)
job_monthly
Date/Time
Conditions Met
Job Dependency
Condition Met
Start
job_daily
Date/Time
Conditions Met
Undesirable Result
SUCCESS
5-20
Job Definitions
job_Fwatch
job_monthly
job_daily
Generate Report
Job Stream
Start
Date/Time
Conditions Met
job_Fwatch
File from
term_run_time: 90
TERMINATED
Mainframe
NOT RUN
job_monthly
Event Status in
AutoSys Database =
INACTIVE
Job Dependency
Condition NOT Met
NOT RUN
job_daily
Date/Time
Conditions Met
Desirable Result
Figure 5-12 Changing Job Status
5-21
job_Fwatch
1:00 a.m.First Day
of Month
box_terminator: y
success(job_Fwatch)
job_terminator: y
job_daily
3:00 a.m. Daily
success(box_monthly)
Generate Report
box_monthly
Date/Time
Conditions Met
Start
job_Fwatch
File from
Mainframe
SUCCESS
FAILURE
job_monthly
SUCCESS
TERMINATED
Job Dependency
Condition NOT Met
job_daily
NOT RUN
Date/Time
Conditions Met
Job Dependency
Condition Met
Start
job_daily
Date/Time
Conditions Met
SUCCESS
5-22
6
Defining AutoSys Jobs Using
the GUI
This chapter describes how to define jobs using the AutoSys graphical
user interface or GUI. It also provides information about creating various
types of AutoSys jobs. It discusses changing and deleting a job, and how
to set time dependencies.
Starting the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
GUI Control Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Job Definition Dialogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
The Job Definition Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
Date/Time Options Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Job Definition Advanced Features Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
Creating a Simple Command Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
Creating a File Watcher Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
Creating a Dependent Command Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
Creating a Box Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
Changing a Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
6-1
6-2
These are the Control Panel buttons and the actions they perform:
6-3
Note The three AutoSys/Xpert buttons are disabled if you have not
AutoSys provides several dialogs that you can use for defining jobs. You
might use up to three, or as few as one dialog, depending on the
complexity of the job. At the top of each dialog box is its title, such as
Job Definition. This chapter is organized around these dialogs.
6-4
The Job Definition dialog contains fields representing all the basic
information you need to define a job. When you single-click on the Job
Definition button in the Control Panel, the Job Definition dialog shown
in Figure 6-2 appears.
6-5
The buttons at the top of the dialog perform the following actions:
The fields in the Job Definition dialog are context sensitive based on the
type of job being defined. When you select a Job Type, only the fields
appropriate to that type of job are displayed and activated, and the other
fields are disabled.
In this dialog, there is a special field named Edit One-Time Overrides?
which is used to specify that certain job attributes be applied for the very
next run of the job. When the Yes radio button in this field is selected,
only those fields that can be used for overrides are active, and the
remaining fields are disabled.
6-6
The buttons at the bottom of the dialog perform the following actions:
6-7
All entries made in the dialog are maintained in memory after you close
the dialog. They are saved only when you select Save at the Job Definition
dialog.
When you single-click on the Adv Features control button in the Job
Definition dialog, it displays the Job Definition Advanced Features
dialog, as shown in Figure 6-4.
6-8
The Job Definition Advanced Features dialog has fields for all the
additional features that can be specified for a job. Many of these fields are
organized by job type, and they only pertain to the type of job on which
you are working.
Note The External Application field is disabled. It is a placeholder
6-9
The most basic Command Job requires only a few fields to be entered in
the Job Definition dialog. To demonstrate this, well walk you through
the process of defining a simple job named test_run which has no
starting parameters. When manually started, this job will only echo a
message to standard output.
To create the example job
In the GUI Control Panel, single-click on the Job Definition button.
This action opens the Job Definition dialog.
which the command will be executed. You should enter your own
valid, licensed client machine name.
4 In the Command to Execute field, enter the command to be executed:
/bin/echo "AUTOSYS install test run"
Your entries in the Job Definition dialog should look like those shown in
Figure 6-5.
6-10
Note The Owner field for the job defaults to the currently logged on
6-11
Leave the Job Definition dialog on your screen to use for the next
example.
Next, you will create a File Watcher Job. This job will watch for an endof-day transaction file called EOD_trans_file. File Watcher jobs do not
actually execute commands themselves; they are used to signal the arrival
of files, and typically set off the execution of a Command Job.
Using the Job Definition dialog, follow these steps:
1 In the Job Name field, enter this job name: EOD_watch
2 In the Job Type field, single-click on the File Watcher radio button.
3 In the Execute on Machine field, enter the name of the machine on
which the command will be executed. You should enter your own
valid, licensed client machine name.
4 In the File To Watch For field, enter this file name:
/usr/common/EOD_trans_file
Your entries in the Job Definition dialog should look like those shown in
Figure 6-6.
6-12
Figure 6-6 Job Definition Dialog for File Watcher Job EOD_watch
6-13
1 In the Time Interval (secs) to Determine Steady State field, enter the
time interval: 60
AutoSys will check for the files existence every 60 seconds, and it will
check if the file has grown between checksif it has not changed in
size, this is called a steady state.
2 In the Minimum File Size (in BYTES) field, enter the minimum file
6-14
Figure 6-7 Job Definition Advanced Features Dialog - File Watcher Job
Now, you will create a Command Job that is dependent on the successful
completion of the File Watcher Job you just created. The only difference
between this Command Job and the simple Command Job you created
earlier, is that this one will be dependent on another job.
6-15
which the file watcher will run. You should enter your own valid,
licensed client machine name.
5 In the Command to Execute field, enter the command that is to run
For information on the profile job attribute, see Chapter 2, JIL/GUI Job
Definitions in the AutoSys Reference Guide for UNIX.
6-16
6-17
Assume that you want to schedule a group of jobs to all start running
once the File Watcher completes successfully. Rather than make each job
dependent on the File Watcher, you can create a box that is dependent on
the File Watcher, and place all of the jobs in the box. (For detailed
information on Box Jobs, see Chapter 5, Box Job Logic.)
Now you will create a box, then change the job you just created to put it
in the box, and then make it no longer individually dependent on the File
Watcher.
In the Job Definition dialog, enter the following information:
1 In the Job Name field, enter the job name: EOD_box
2 In the Job Type field, single-click on the Box button.
When you select the Box Job type, the lowest section of the Job
Definition dialog changes from Command & File Watch
Information to Box Completion Conditions.
3 In the Starting Condition field, enter the only starting condition, in
The filled-in dialog should look like the one shown in Figure 6-9.
6-18
6-19
Changing a Job
This exercise will change an existing job. You should make sure a job is
not running before you modify or delete it.
In this exercise, you will place the EOD_post job, created previously, in
the newly-created box. To load an existing job into the Job Definition
dialog, you can either enter its name explicitly in the Job Name field and
click the Search button, or you can use the Search Facility. For this
exercise, you will use the search facility. You can enter some portion of
the job name, followed by the % wildcard character. The % character
will match any string of one or more characters in the job name. For
instance, %box% will match any job name with the string box
anywhere in the name.
To use the search facility
1 In the Job Name field, enter this: EOD%
2 Single-click on the Search button below the Job Name field.
A Selection List Box similar to the one shown in Figure 6-10 appears
containing all the jobs currently defined in the database that start with
the string EOD. (The list box shown below may not match yours
exactly, since you can have other jobs defined.)
3 Typing just the % wildcard character will display all the jobs defined
in the database.
6-20
This will automatically dismiss the Selection List Box and display the
requested job in the Job Definition dialog. If the job you wanted was
not in the list, you could click on the Cancel button to dismiss the
Selection List Box without making a selection.
To place the EOD_post job in the box
1 In the Name of Box this Job is IN field, enter the box name: EOD_Box
This field also has a search facility, which works the same as the Job
Name search facility, complete with wildcarding using the %
character.
2 In the Starting Condition field, delete the string success
(EOD_watch). This starting condition has been assigned to
EOD_Box. Now that this job is in a box, it will inherit the starting
condition of the box.
3 Click on the Save button at the top of the dialog to save the changes.
6-21
The test_run job you created at the beginning of the chapter will only
be executed if it is started manually.
To set the job to run on certain days at certain times, such as 10:00
a.m. and 2:00 p.m. on Mondays, Wednesdays, and Fridays
1 In the Job Name field, enter the job name to be modified: test_run
2 Single-click the Search button to display the specified job.
3 In the Starting Parameters region of the Job Definition dialog, locate
the Is the Start Date/Time Dependent? field and single-click on the Yes
button.
4 Single-click on the Date/Time Options button.
5 The Date/Time Options dialog appears, as shown in Figure 6-11.
6-22
6 In the Date region of the dialog, select the days on which the job is to
be run, in this case, click on the Time(s) of day field, then enter:
10:00, 14:00
6-23
button.
The information is retained in memory until the job is either saved to
the database or cleared.
To save the new start date/time information for this job in the
database
Single-click the Save button in the Job Definition dialog.
You can base the time settings for a job on a specific time zone. To do
this, you enter a valid time zone in the Time Zone field in the Job
Definition Advanced Features dialog. For details on specifying a time
zone in a job definition, see timezone in Chapter 2, JIL/GUI Job Definitions
in the AutoSys Reference Guide for UNIX.
To have a job run at specific minutes past every hour, as opposed to
specific times of day, specify the minutes past every hour in the Every
Hour at field.
If you want to run a job every day, rather than only on specific days, you
single-click on the Every Day button instead of the individual buttons for
each day.
If you want to schedule a job for specific dates, rather than specific days
of the week, you can specify a custom calendar name in the Run on Days
in Calendar field. If the custom calendar does not already exist, create it
by single-clicking the Calendars button, which displays the Graphical
Calendar Facility.
Alternatively, you can specify a custom calendar defining days on which
the job must not run. You specify this calendar in the Do NOT Run on
Days in Calendar (Exclude) field.
6-24
To view the calendars defined in AutoSys, use the Search buttons beneath
each of these fields. These buttons display a list box from which you can
select a pre-defined calendar. To define a calendar on the fly, singleclick the Calendars button, which displays the Graphical Calendar
Facility.
Deleting a Job
Now you will delete the test_run job, which you just modified. You
delete all jobs, regardless of type, in exactly the same way. To delete a job,
you can either enter its name explicitly in the Job Name field, or use the
search facility. In this final exercise, you will use the search facility. You
can enter some portion of the job name, followed by the % character,
or just enter the % character alone, for a global search.
To delete a job
1 In the Job Name field, enter: %
2 Single-click on the Search button to initiate the search.
A Selection List Box appears, allowing you to select the desired job.
3 Double-click on the desired jobs name, in this case, test_run. This
will automatically dismiss the Selection List Box and display the
requested job in the Job Definition dialog.
4 Verify that the test_job job is displayed in the Job Definition dialog.
Note No confirmation dialog appears when you delete a job
using the GUI, so ensure that you are deleting the right job.
5 To delete the job from the database, at the top of the Job Definition
6-25
When using the GUI to delete a Box job, AutoSys will delete the box, and
will recursively delete all jobs within that box.
Using the GUI, there currently is no way to delete just the box itself and
not its contents.
However, with JIL, you can use the delete_job sub-command to delete
the box while leaving its contents intact (see Deleting a Job in Chapter 7,
Defining Jobs Using JIL).
The GUI includes more fields than are discussed in this chapter. All fields
are discussed in detail in Chapter 2, JIL/GUI Job Definitions in the AutoSys
Reference Guide for UNIX.
Using the GUI, you can specify a job override for the next run of a
particular job; that is, the next time a job runs, you can change its
behavior. When using the GUI to specify job overrides, you enter new
values into the GUI fields, or enter NULL in a GUI field to turn off a
value.
Job overrides are applied for the next run of the job only. If an AutoSys
RESTART event is generated because of system problems, AutoSys will reissue a job override until the job actually runs once, or until the
maximum number of retries limit is met. After this, the override is
discarded.
6-26
Region
Field
Job Definition
Job Definition
Starting Parameters
Starting Condition
Is Start Date/Time
Dependent?
Execute on Machine
Command to Execute
6-27
Table 6-1 Dialogs, Regions, and Fields for Job Overrides (Continued)
Dialog
Region
Field
Advanced
Features
Alarms
Terminators
Command Information
Job Environment
Profile
File to Redirect to
Standard Input
File to Redirect to
Standard Output
File to Redirect
Standard Error
External Application
Number of Times to
Restart this Job after a
FAILURE
AutoHold On?
File Watching
Criteria
Misc. Features
6-28
Table 6-1 Dialogs, Regions, and Fields for Job Overrides (Continued)
Dialog
Region
Field
Date/Time
Options
DATE
Run on Days in
Calendar
Run Window
TIME
Now, the dialog is in job override mode, and only the available fields
for specifying job overrides are active.
3 At the appropriate dialogs and fields, specify the overrides you want.
6-29
overrides.
There is a set of X resources you can use to customize the appearance and
behavior of the Job Definition GUI. In particular, these resources allow
you to control:
The time interval after which the Monitor/Browser GUI will drop the
connection to the database.
The Monitor/Browse GUI icon text and the Monitor/Browse title bar
text.
6-30
The following resource controls the time interval after which the Job
Definition GUI will drop the connection to the database.
! TimeOut to drop DB connections (in minutes)
*DBDropTime: 400
The following resources specify the title bar text and the icon text. By
default the title bar text is Job Definition and the icon text is JobDef.
Autosc.shellTitleJobDef:
Autosc.iconTitleJobDef:
Note When changing icon text, be sure the length of the new text
string does not exceed the recommended maximum length for icon
title text for your windowing system. Some window managers can
display long icon text strings, while others will truncate them. Ensure
the text string you specify for your icons displays appropriately. Also,
some window managers allow you to change the size of icons and
icon text font.
6-31
6-32
7
Defining Jobs Using JIL
This chapter describes how to define jobs using the AutoSys Job
Information Language or JIL. It also provides information about creating
various types of AutoSys jobs. It discusses changing and deleting a job,
and how to set time dependencies. An example JIL script is provided.
Job Information Language (JIL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
JIL Syntax Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
JIL Sub-commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Submitting Job Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Running JIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Creating a Simple Command Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-7
Creating a File Watcher Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-8
Creating a Dependent Command Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-9
Creating a Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
Changing a Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-10
Setting Time Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
Additional Time Setting Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
7-1
7-2
you specify.
When writing a JIL script, you must follow the syntax rules listed below.
Rule 1
Each sub-command uses the following form:
sub_command: job_name
where:
sub_command
Rule 2
Each sub-command may be followed by one or more attribute
statements. These statements may occur in any order, and are applied to
the job specified in the preceding sub-command. A subsequent
sub-command begins a new set of attributes for a different job. The
attribute statements have the following form:
attribute_keyword: value
7-3
where:
attribute_keyword
Rule 3
Multiple attribute statements can be entered on the same line, but the
lines must be separated by at least one space.
Rule 4
A box must be defined before the jobs can be placed in it.
Rule 5
Legal value settings can include any of the following characters: upperand lowercase letters, hyphens, underscores, numbers, colons (if the
colon is escaped with quotes or a preceding backslash), and the special
character @.
Rule 6
Any colons used in an attribute statements value setting must be
escaped, because JIL parses on the combination of keyword followed by
a colon. For example, to specify the time to start a job, specify 10:00. The
colon may also be escaped with a preceding backslash \, as in 10\:00.
7-4
Rule 7
Comments are indicated using one of the following two methods:
JIL Sub-commands
Action
insert_job
update_job
delete_job
delete_box
override_job
7-5
As stated earlier, a completed JIL script is called a job definition. This job
definition must be submitted to the AutoSys database before the job it
defines can be run. You can submit a job to the AutoSys database using
one of the following methods:
Running JIL
After a job definition has been submitted to the AutoSys database, it will
be started according to the starting parameters specified in its JIL script.
That is, the Event Processor will continually poll the database and when
it determines that the starting parameters have been met, it will run the
job.
7-6
If a JIL script does not specify any starting parameters for a job, the job
will not be started automatically by the Event Processor; it will start only
if you issue the sendevent command. For example, assume a job named
test_install has no starting parameters specified in its JIL script. The
only way to start it would be to issue the following command:
sendevent -E STARTJOB -J test_install
This command tells the Event Processor to start the job named
test_install.
For more information about the sendevent command, see its definition
in Chapter 1, AutoSys Commands in the AutoSys Reference Guide for UNIX.
To create the most basic Command Job, you only need to specify a few
attributes. For example, the JIL script required to define a simple
Command Job named test_run is given below:
insert_job: test_run
job_type: c /*(optional, it is the default) */
machine: tibet
command: /bin/touch /tmp/test_run.out
7-7
File Watcher Jobs do not execute commands themselves; they are used to
signal the arrival of files, and typically set off the execution of a
Command Job. For example, the JIL script required to define a File
Watcher Job named EOD_watch is given below:
insert_job: EOD_watch
job_type: f
machine: tibet
watch_file: /tmp/EOD_trans_file
watch_interval: 60
watch_file_min_size: 50000
Determine if the file has reached the minimum file size of 50,000
bytes.
Until the minimum file size of 50,000 bytes has been reached, the file
wont be considered by AutoSys as complete. When the file reaches this
minimum size and does not change between check intervals (60 seconds
in this example) it is considered compslete (also known as steady
state). When this occurs, the File Watcher Job will end with a SUCCESS
condition.
7-8
To run the job only if the File Watcher Job named EOD_watch
completes with a SUCCESS status.
7-9
For information on the profile job attribute, see its entry in Chapter 2,
JIL/GUI Job Definitions in the AutoSys Reference Guide for UNIX.
Creating a Box
Box Jobs are a convenient way to start multiple jobs. When you put jobs
in a box, you only have to start a single job (the box) in order for all the
jobs in the box to start running.
Assume you want to schedule a group of jobs to all start running once the
File Watcher completes successfully. Rather than make each job
dependent on the File Watcher, you can create a box that is dependent on
the File Watcher, and place all of the jobs in the box.
Now you will create a box, then change the job you just created to put it
in the box, and then make it no longer individually dependent on the File
Watcher. The JIL script required to define a Box Job named EOD_box
is given below:
insert_job: EOD_box
job_type: b
condition: success(EOD_watch)
To run the job only if the File Watcher Job named EOD_watch
completes with a SUCCESS status.
Changing a Job
7-10
You should make sure a job is not running before you modify or delete it.
To change a job, you can either use the update_job sub-command, or you
can delete the job definition, using the delete_job sub-command, then
redefine the job using the insert_job sub-command. The latter scenario
is particularly useful when many non-default attributes have been
specified, and you want to unset them rather than reset them; in
other words, you want to de-activate them. However, youll have to respecify any of the attributes that need to remain the same. So, in the
example below, youll use the update method. The JIL script required to
change the EOD-post job and to put it in the EOD_box is given
below:
update_job: EOD_post
condition: NULL
box_name: EOD_box
Remove the starting condition from the job definition, because the
job will inherit the starting condition of the box in which it is placed.
The EOD_post Command Job is now in the EOD_box Box Job, and
has inherited the boxs starting parameters.
7-11
The test_run job you specified at the beginning of the chapter has no
starting conditions. Therefore, it will only run if it is started using the
sendevent command. To set the job to run automatically on certain days
at a certain time, such as 10:00 a.m. and 2:00 p.m. on Mondays,
Wednesdays, and Fridays, you would modify the job using this JIL script:
update_job: test_run
date_conditions: y
days_of_week: mo, we, fr
start_times: "10:00, 14:00"
On each of these three days, start the job at 10:00 a.m. and 2:00 p.m.
The times shown in the script above are quoted, since they contain a
colon. They could also have been escaped by using backslashes, as shown
below:
start_times: 10\:00, 14\:00
If you wanted the time settings for the job to be based on a specific time
zone, you would use the timezone attribute. If you specify a time zone
that includes a colon, you must quote the time zone name like this:
timezone: "IST-5:30"
If you do not quote a time zone that contains a colon, the colon will be
interpreted as a delimiter, producing unexpected results.
7-12
If you had wanted to run the job every day, rather than only on specific
days, you could have specified the all value, instead of listing the
individual day values. Or, if you had wanted to schedule the job for
specific dates, rather than specific days of the week, you could have
specified a custom calendar. First, you would have had to define the
calendar, using the Graphical Calendar Facility, or the autocal_asc
command. Then, you would specify the calendar name, weekday_cal,
using the following JIL statement:
run_calendar: weekday_cal
If you wanted the job to run at specific times every hour, as opposed to
specific times of day, the minutes past every hour could have been
specified. For example, to run a job at a quarter after and a quarter before
each hour, use the following JIL statement:
start_mins: 15, 45
Deleting a Job
Now you will delete the test_run job, which you specified at the
beginning of this chapter. To delete the test_run job, enter the
following JIL sub-command:
delete_job: test_run
7-13
Using JIL, there are a number of other attributes which you can configure.
These attributes are described in detail in Chapter 2, JIL/GUI Job
Definitions in the AutoSys Reference Guide for UNIX. This reference chapter
provides complete information on all job attributes specified using JIL.
Using JIL, you can specify a job override for the next run of a particular
job. In other words, the next time a job runs, you can change its behavior.
Job overrides are applied only once. If an AutoSys RESTART event is
generated because of system problems, AutoSys will re-issue a job
override until the job actually runs once, or until the maximum number
of retries limit is met. After this, the override is discarded.
Note The maximum number of job restarts after system or network
failures is specified in the MaxRestartTrys parameter in the AutoSys
configuration file.
7-14
min_run_alarm
std_in_file
command
n_retrys
std_out_file
condition
profile
term_run_time
date_conditions
run_calendar
watch_file
days_of_week
run_window
watch_file_min_size
exclude_calendar
start_mins
watch_interval
machine
start_times
max_run_alarm
std_err_file
JIL will not accept an override if it results in an invalid job definition. For
example, if a job definition has only one starting condition, start_times,
JIL will not allow you to set the start_times attribute to NULL because
removing the start condition makes the job definition invalid (no start
time could be calculated).
To set job overrides, you use the override_job sub-command; you only
need to specify those attributes that you want to override. Using this
command, you can also temporarily delete a job attribute. For example,
7-15
To cancel the job overrides specified in the script above, you would enter
the following JIL script:
override_job: RunData delete
Note Once you have submitted a JIL script to the AutoSys database,
you cannot view the JIL script and edit a job override. If you want to
change the override values, you must submit another JIL script with
new values, or use the GUI. However, the original override (i.e., the
first over_num) remains stored in the overjob table in the AutoSys
database.
7-16
# Example of Jobs
insert_job: Nightly_Download
job_type: b
date_conditions: yes
days_of_week: all
start_times: "02:00"
insert_job: Watch_4_file
job_type: f
box_name: Nightly_Download
watch_file: /download/mainframe/sales.raw
machine: gateway
insert_job: filter_data
job_type: c
box_name: Nightly_Download
condition: success(Watch_4_file)
command: filter_mainframe_info
machine: gateway
std_in_file: /download/mainframe/sales.raw
std_out_file: /download/mainframe/sales.sql
std_err_file: /log/filter_mainframe_info.err
insert_job: update_DBMS
job_type: c
box_name: Nightly_Download
condition: success(filter_data)
machine: gateway
command: isql -U mutt -P jeff
std_in_file: /download/mainframe/sales.sql
7-17
7-18
8
The Graphical Calendar
Facility
This chapter describes the AutoSys Graphical Calendar Facility and how
to use it to create, view, and maintain AutoSys calendars. It also describes
how to preview a calendar before applying its dates and how to apply
custom rules to a calendar.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-3
Scheduling Jobs with Calendars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Starting the Calendar Facility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Calendar Facility Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-5
Calendar Definition Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-6
Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Calendar Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Navigation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-12
Creating a Simple Calendar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-14
Dates Prior to Todays Date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-15
Calendar Selection Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
8-1
8-2
Introduction
Define calendars.
8-3
For example, you could create a calendar called holidays containing the
dates of all corporate holidays. For jobs that you want to start on
holidays, you would define this using the attribute:
run_calendar: holidays
For jobs that you do not want to start on holidays, you would define this
using the attribute:
exclude_calendar: holidays
Jobs scheduled with the run_calendar attribute are scheduled on the next
available date from that calendar. Dates previous to the current date are
ignored.
8-4
Term Calendar Rule This dialog is used to specify a rule to apply to the
dialog
calendar currently being created or modified.
8-5
Term Calendar
Viewer window
Import/Export File
Name dialog
The first screen that displays when the Calendar Facility starts up is the
Calendar Definition window (shown in Figure 8-1).
8-6
Calendar Display
Menu Bar
File Menu
The File menu contains the following options:
New
Open
Save
Save As
Delete
Rename
8-7
Import
Export
Exit
Edit Menu
The Edit menu contains the following options:
8-8
Apply Rule
Revert
Clear
Tools Menu
The Tools menu contains the following options:
Term Calendar
Viewer
Job Definition
Reference List
8-9
Options Menu
The Options menu contains the following options:
Date Range
The Date Range option limits how far into the future
you can set dates in the current calendar. You can
increase the date range of a calendar, and you can
decrease it through the previous year.
When you open an existing calendar, either the date
range of the calendar or the current date range,
whichever is greater, becomes the new date range for
the current Calendar Facility session.
Set Print
Command
8-10
Calendar Display
The Calendar Display region of the window displays six months of the
calendar currently being edited. By default at startup, two quarters of the
current year display, one of which contains the current day (indicated by
a box). Using the navigation controls at the right side of the window, you
can advance or move backward through the calendar, one quarter at a
time.
The Calendar Name field at the top left of the Calendar Display region
displays the name of the calendar currently being edited. You can change
this name using the Rename option from the File menu. You cannot edit
the Calendar Name field.
Date States
Each date in the calendar is a selectable button. By using the mouse and
single-clicking, you can set each date to one of the following states:
Unset
Set
Blocked
You can cycle through these three states by single-clicking on the mouse
button additional times. The current state of each date is indicated by its
color, as listed in the Color Key area of the Navigation Controls region.
Note Calendars are stored in the AutoSys database. Only the Set
dates are stored. Dates designated as Blocked are only in effect while
editing a calendar. The Blocked state is only useful while applying
rules. Blocked dates are not saved in the AutoSys database, nor are the
rules.
8-11
A date that qualifies for setting by the rule has been previously set to
the Blocked state and rescheduling has not occurred. (Rescheduling
may not have occurred if either a reschedule rule has not been
applied, or an applied reschedule rule cannot find a non-conflicting
date to move to.)
For example, you may have marked all holidays as Blocked, one of which
was January 1. Now you want to apply a rule to the first day of each
month, which would conflict with the January 1 Blocked date. If there is
no reschedule rule in effect, such as move to the next weekday, or if the
reschedule rule specifies to move backwards, which would end up on a
date in the previous year, a Conflict state would result. In this case, you
must manually correct the situation before attempting to save the
calendar to the database.
For more information about Rescheduling Rules, see Rescheduling Rule on
page 8-22.
Navigation Controls
8-12
Let you specify which six months (or two quarters) are to be displayed
in the window.
Next Entry
Next Conflict
Last Entry
Note The date with the focus is designated with a black box around
the date.
8-13
When you use the skip buttons, if the focus is changed to a date that is
not currently displayed, the calendar display will shift to bring that date
into view.
Set dates
Green
Conflict dates
Red
Blocked dates
Black
8-14
clicking the left mouse button on each date. If the desired dates are not
displayed, use the Shift Months arrows to bring them into view.
5 Choose File Save. Your calendar will resemble the one shown in
Figure 8-3.
8-15
The Calendar Selection dialog lets you specify which calendar you want
to open for editing, or which one to use for a rule specification (see Term
Calendar Rule Dialog on page 8-17).
To access the Calendar Selection dialog
Choose File Open.
When this dialog appears, it contains a scroll list of all the calendars
currently in the AutoSys database. In the Filter field of this dialog, you
may specify any string, including the * wildcard character, to show
only those calendars whose names include the string. The default filter,
*, matches all calendar names. For example, to display only those
calendar names starting with the string us_hol, such as us_hol_97
and us_hol_98, you would specify the filter us_hol*, then click the
Filter button. The list will display only the matching calendar names.
8-16
You can select any calendar in the list by single-clicking with the mouse.
Click OK to open the calendar and dismiss the dialog. Click the Cancel
button to dismiss the dialog without selecting a calendar.
The Term Calendar Rule dialog lets you set a state for multiple dates
simultaneously, rather than selecting each date individually.
To access the Term Calendar Rule dialog
Choose Edit Apply Rule.
8-17
The Term Calendar Rule dialog is divided into the following three
regions:
Rule Specification
Rescheduling Rule
Control
Rule Specification
Action Area
Date Range
Action Area
The Action Area lets you apply one of the following states on the selected
dates:
Set Dates
Unset Dates
Block Dates
Note These actions are mutually exclusive; only one of these actions
can be selected.
8-18
Day
8-19
Period
Note The rules used to set a calendar are not saved after the calendar
The following examples illustrate the use of the use of the Date Selection
Rule options. We recommend you experiment with these rules. You can
always revert to the last saved version of a calendar by using the Revert
option from the Edit menu, or you can clear everything using the Clear
option from the Edit menu.
Setting Dates
To set the 3rd Tuesday of every month throughout the entire currently
selected calendar
1 In the Action area, select Set Dates.
2 Keep the default date range, which is the currently selected calendar's
entire range.
8-20
in the th option.
4 In the Day sub-area, select Tuesday (which automatically selects the
editing.
Blocking Dates
To block every holiday date and prevent those days from being
scheduled
Follow these steps (assuming the holiday dates already exist in a calendar
named us_hol_98).
1 In the Action area, select Block Dates.
2 Keep the default date range, which is the currently selected calendar's
entire range.
3 In the Occurrences sub-area, select Every.
4 In the Day sub-area, select Day (Any).
5 In the Period sub-area, press the Calendar button. When the Calendar
Following on with the above example, assume that you want to change
the state of the first day of every month to Set.
8-21
entire range.
3 In the Occurrences sub-area, select First.
4 In the Day sub-area, select Day (Any).
5 In the Period sub-area, select Monthly.
6 Click Apply to apply the rule to whatever calendar you are currently
editing.
When you apply this rule, a Conflict state will be assigned to January 1,
since this date is defined in us_hol_98, and was marked as Blocked in
the previous example. To address this you must either unset it
manually and, if desired, set another date in its place, or you could
specify a Rescheduling Rule to accommodate this type of conflict.
Rescheduling Rules are described in the next section.
Rescheduling Rule
The Rescheduling Rule region lets you control how date conflicts should
be resolved when applying a rule. To specify a rescheduling rule, you
must indicate a move direction and the day to which the newly
scheduled Set state should be moved when a conflict occurs. You do this
in the Move Direction and To Day areas.
Note Conflicts can also occur if a date is Set, then Blocked.
8-22
Move Direction
You can select one of the following Move Direction options:
To Previous
To Following
To Day
In addition to specifying the Move Direction, you must specify one of the
following To Day options:
Any Day
Weekday
Calendar-based
Example
To remedy the conflict situation in the last example from the previous
section (on page 8-22), assume that you want to apply a Rescheduling
Rule that specifies any day following the date in conflict that is not also
a holiday.
To apply a Rescheduling Rule that specifies any day following the
date in conflict that is not also a holiday
1 In the Action area, select Set Dates.
2 Keep the default date range, which is the currently selected calendar's
entire range.
3 In the Occurrences sub-area, select First.
8-23
dialog appears, select the calendar named us_hol_98, and click OK.
The calendar name will appear in the Calendar field.
6 In the Move Direction area, select To Following.
7 In the To Day area, select the Not in Calendar option and enter the
editing.
Note Multiple conflict dates can be rescheduled to the same new
date. For example, if you block all weekend dates, then apply a rule to
set every day, with rescheduling to the previous weekday, both the
Saturday and Sunday conflicts will be resolved to the preceding
Friday. If you want separate runs for Saturday and Sunday, turn off the
Rescheduling Rule and resolve the conflicts manually.
Control
At the bottom of the Term Calendar Rule dialog, there are three buttons:
OK, Apply, and Cancel. The OK button applies the current rule and
dismisses the dialog. The Apply button applies the rule but does not
dismiss the dialog. The Cancel button dismisses the dialog without
applying the rule.
8-24
The Term Calendar Viewer allows you to preview a calendar before using
it in a rule you are about to apply. You can easily browse any existing
calendars to see which dates they contain.
To access the Term Calendar Viewer
Choose Tools Term Calendar Viewer.
8-25
When the Term Calendar Viewer first appears, it displays six months of
the current year. You must then select a calendar by single-clicking on its
name in the Calendar Selection list in the lower-right corner of the
window. Navigation is exactly the same as in the Calendar Definition
window.
As each calendar is selected, it completely replaces the previously viewed
calendar, and its name is displayed in the Calendar Name field at the top
of the window.
When you are finished viewing calendars, click the Dismiss button to
close the window.
8-26
Combining Calendars
8-27
Note When combining calendars, any dates prior to the current date
Printing Calendars
You can print calendars to obtain a hard copy for your files. Before you
attempt to print a calendar, be sure the print command is correctly
specified, either through your X resources file, or by way of the Set Print
Command option from the Options menu. The print command must
include the full path to the print facility to be used, plus all appropriate
arguments. Once this is set, you can open an existing calendar, or create
a new calendar, then select the Print option from the File menu.
You can import calendar text files and you can export calendars to text
files. This is particularly useful for copying calendars from one AutoSys
instance to another. You perform calendar imports and exports using the
Import (and Export) File Name dialog.
Calendars contained in ASCII text files can be imported into the AutoSys
database. These text files may contain multiple calendars, each of which
must be delimited with the calendar:calendar_name attribute. A
sample calendar text file is shown below:
calendar: Q1paydays
01/01/1998
01/15/1998
02/01/1998
02/15/1998
03/01/1998
03/15/1998
calendar: Q1holidays
01/01/1998
8-28
At this dialog, you can either enter the full path to the calendar in the
Selection field, or use the Filter field, Directories list, and Files list to
select the file.
When using a filter, the Filter field must contain a directory pathname,
which is everything up to the last slash (/) followed by the file pattern
containing an asterisk (*). For example, to search the directory
/home/my_dir for all file names with the string cal, you would specify:
8-29
/home/my_dir/*cal*. Then, click the Filter button, and the Files list will
display all the files containing that string. Then, click on the file you wish
to import, and the full pathname will appear in the Selection field.
Finally, click OK to import the file.
Note If the text file being imported contains calendars with the same
names as calendars already existing in the database, these calendars
will not be imported. A warning dialog will notify you that a calendar
name is duplicated, and that the import of this calendar will not
occur. Also, after the import has completed, an information dialog
will tell you how many calendars were imported.
Exporting Calendars
You can export all the calendars from the AutoSys database to an ASCII
text file. To export, select File Export. The Export File Name dialog will
display, allowing you to specify a filename for the calendar text file.
Note When you use the export facility, all the calendars in the
AutoSys database are exported to a single ASCII text file. After the
export has completed, an information dialog will tell you how many
calendars were exported. You cannot export just a single calendar;
however, you can edit the ASCII file after you export all the calendars.
The Export File Name dialog uses the same filtering as described in
Importing Calendar Text Files on page 8-28.
There is a set of X resources that you can use to customize the appearance
and behavior of the Calendar Facility. In particular, these resources allow
you to control:
8-30
The fonts that are used in the Calendar Definition window as well as
the Calendar Facility dialogs. The choice of fonts will affect the size of
the various windows and dialogs.
The colors used to indicate whether dates are Set, Unset, or Blocked.
The Calendar GUI icon text and the Calendar title bar text.
8-31
8-32
Object Color
The following resources affect the colors of the various objects within the
Calendar Facility.
Note Several of the following colors come in pairs, such as setColor
and setLabelColor. The LabelColor is the color of the numbers that
appear on the date buttons and should be chosen so that they are
easily readable with the color of the button on which they display. For
example, don't specify setColor as blue and setLabelColor also as
bluethe numbers will not be visible on the dates. Select another
color, such as black or white for the label.
! general application background color
Autocal*background:
! color to represent "set" dates
Autocal*setColor:
! color for label (foreground numbers) to represent
! "set" dates
Autocal*setLabelColor:
! color to represent "blocked" dates
Autocal*blockedColor:
! color for label (foreground) to represent
! "blocked" dates
Autocal*blockedLabelColor:
! color to represent "conflict" dates
Autocal*conflictColor:
! color for label (foreground) to represent
! "conflict" dates
Autocal*conflictLabelColor:
8-33
The following resource sets the color for a grid that appears between the
dates in the Calendar Viewer window, to help differentiate it from the
Calendar Definition window. If you do not want the grid to appear, select
the same color as the background.
Autocal*viewerColor:
Date Range
The following resource sets the number of years in the date range of the
calendar, as a default at start up. This can be overridden manually by way
of the Date Range option from the Options menu, or by loading a
calendar that has a larger date range than the default. These are the legal
settings:
!
!
!
!
Autocal.dateRange:
Window Size
The following resources help keep the size of the window small, and it is
recommend that you do not change their settings.
Autocal*calViewForm*month_form*marginHeight: 0
Autocal*calViewForm*month_form*marginWidth: 0
Autocal*calViewForm*month_form.marginWidth: 2
8-34
Print Command
The following resource specifies the print command, and its arguments,
which will be executed when you request that a calendar be printed. Be
sure to specify the full pathname of the executable, or it may not be
located and the print will fail.
Autocal.printCommand:
The following resources specify the title bar text and the icon text. By
default the title bar text is Calendar Definition and the icon text is
CalDef.
Autocal.shellTitle:
Autocal.iconTitle:
Note When changing icon text, be sure the length of the new text
string does not exceed the recommended maximum length for icon
title text for your windowing system. Some window managers can
display long icon text strings, while others will truncate them. Ensure
the text string you specify for your icons displays appropriately. Also,
some window managers allow you to change the size of icons and
icon text font.
8-35
8-36
9
Load Balancing and
Queuing Jobs
This chapter describes the use of real and virtual machines in the AutoSys
environment to provide load balancing and queueing functionality. It
provides information about load balancing jobs across multiple
machines, as well as queueing jobs to real and virtual machines.
Real Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Defining Machines to AutoSys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
Specifying Machine Load (max_load) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
Specifying Relative Processing Power (factor) . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Using max_load and factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-6
Machine Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
Defining a Real Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
Deleting Real Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Defining a Virtual Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
Deleting Virtual Machines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
9-1
9-2
Real Machines
In the AutoSys environment, a real machine is any physical CPU that has:
The above two conditions are required for a real machine to run AutoSys
jobs. However, for AutoSys to perform intelligent load balancing and
queuing while executing jobs, it needs to know the relative processing
power of the various real machines. AutoSys provides both load
balancing and queuing by way of the logical construct called virtual
machines.
Virtual Machines
9-3
The following JIL machine attributes are used when defining machines:
type
9-4
The max_load attribute can be defined only for real machines. It describes
how much of a load can be placed on a real machine, and it is specified
with an arbitrary unit called a load unit. Any weighting scheme desired
by the user can be used. For example, a load unit with a range of 10-100
would specify that machines with limited processing power are expected
to carry a load of only 10, while machines with ample processing power
can carry a load of 100. There is no direct relationship between the load
unit value and any of the machines physical resources. Therefore, you
should develop conventions that are meaningful to you. Zero and
negative numbers cannot be used.
9-5
The factor machine attribute can be defined only for real machines. It is
another arbitrary value that describes the relative processing power of a
machine. This attributes value is a real number that can contain a
decimal. It is used to weigh available cycles on one machine against that
of another machine. When AutoSys checks the available cycles on each
machine, it multiplies the percent of free CPU cycles by the factor in
order to determine which machine has more relative processing power
available. Therefore, the factor value is typically a number between 0.0
and 1.0.
9-6
Machine Definitions
Real NT
insert_machine: toad
insert_machine: tiger
max_load: 100
type: n
factor: .8
max_load: 100
factor: .8
Virtual UNIX
Virtual NT
insert_machine: pond
insert_machine: jungle
machine: toad
type: n
machine: frog
machine: tiger
machine: monkey
9-7
Figure 9-1 defines a real UNIX machine named jaguar with a max_load
of 100 and a factor of 1.0.
insert_machine: jaguar
type: r
max_load: 100
factor: 1.0
jaguar
100
1.0
max_load
factor
Figure 9-1 Real UNIX Machine with max_load 100 and factor 1.0
9-8
The following JIL statement deletes the real machine definition for the
machine named jaguar:
delete_machine: jaguar
modena
ferrari
lambo
The following JIL statements define two real machines named fiat and
lotus, and a virtual machine named capri, which is composed of the
two real machines. The virtual machine is a superset of the two previously
defined real machines. (Because the real machines are defined first to
AutoSys, the virtual machine will use the max_load and factor attributes
specified for them.)
9-9
insert_machine: fiat
type: r
max_load: 100
factor: 1
insert_machine: lotus
type: r
max_load: 80
factor: .9
insert_machine: capri
type: v
machine: fiat
machine: lotus
fiat
lotus
10
9-10
Because the real machines fiat and lotus had been individually
defined outside of the virtual machine, their individual definitions
remain in effect.
Load Balancing
9-11
If the max_load attribute was not defined for either real machine (as in
our example), or both machines had ample load units available, AutoSys
would choose the machine to run on based solely on available
processing power. To accomplish this, AutoSys does the following:
1 Determines the percentage of CPU cycles available on each real
machines.
3 Multiplies it by the machines factor value.
4 Chooses the machine with the largest result (i.e., the machine with the
9-12
alfa_romeo
0.8
lambo
0.3
factors
9-13
Note that even though the ferrari usage was less than alfa_romeo,
ferrari was picked because of the factors (78 * 1.0 > 80 * 0.8). Thus, the
factors weigh each machine to account for variations in processing
power.
If you force start a job, AutoSys will start the job right away on the
machine specified in the job definition, regardless of the current load on
the machine or the job_load specified for the job. If the job was defined
to run on a virtual machine, or a list of real machines, AutoSys will
determine which machine has the most processing power available and
will run the job on that machine, even if the job_load of the job exceeds
the max_load defined for the machine.
9-14
Before using this feature, ensure the configuration has been completed as
described in Configuring ServerVision Monitoring and Reporting section of
Chapter 13, Configuring AutoSys. For information on ServerVision, see the
SeverVision documentation on the PLATINUM documentation CD.
To apply ServerVision load balancing to an AutoSys job, specify the
following string in the machine job attribute, or to the Machine to Execute
field in the Job Definition screen:
'svload -a alg [-v virt | -l list] -p profile 2> filename'
Note This string cannot exceed 80 characters.
where:
svload
9-15
The profile file for ServerVision load balancing might look like this
example svload.prf file:
[ServervisionConfiguration]
Timeout=12
InstanceType=unix
honda=honda
toyota=toyota
jeep=jeep
[CPU]
cpu_tl,idle,maximum,1
[Memory]
memory,used,minimum,1
[CPUMemory]
cpu_tl,idle,maximum,2
memory,used,minimum,1
where:
[ServervisionConfiguration]
9-16
[CPU]...[Memory]...[CPUMemory]
You can run the following command to test the algorithms you enter in
the svload.prf file:
svload -a alg [-v virt | -l list] -p profile -y
This command prints to the screen the result metrics. You can use this
information when you are creating the profile file and want to test your
algorithm definitions.
9-17
WARNING The -y argument is for testing only. Do not use it when using
this command as the value for the machine job attribute. When testing the
algorithm, do not include the 2> filename argument.
You can also use ServerVision to monitor AutoSys job resource usage in
real time. AutoSys jobs will appear in the ServerVision GUI by job name.
AutoSys can also archive a jobs resource usage use ServerVision to
generate reports for capacity planning and UNIX process auditing (charge
back). This functionality requires that ServerVision integration has been
enabled as described in the Configuring ServerVision Monitoring and
Reporting section in Chapter 13, Configuring AutoSys. For details on
monitoring job resource usage using ServerVision, see Monitoring Job
Resource Usage in Chapter 13.
Queuing Jobs
9-18
If a job has been assigned a job_load value (the load limiting feature),
and a max_load attribute is assigned to every real machine comprising a
virtual machine, AutoSys will first determine whether each machine has
sufficient available load units before running the job. If each real
machine has sufficient load units, AutoSys employs the load balancing
and factor algorithms to determine on which machine it should start.
However, if only one of the machines has sufficient load units, the job
will be run on that machine. If no machines have sufficient load units,
the job will be placed on queue for both (or all) machines. When one
machine becomes available, the job is run on that machine, and removed
from all other queues.
The words in the queue refer to an actual AutoSys QUE_WAIT job
status, and the job will stay in this state until the necessary load units
become available.
When the necessary load units become available, AutoSys again checks
all the jobs starting conditions to ensure it is still okay to run the job. If
any of the starting conditions are no longer true, the following message
is generated:
Job: job_name Starting Conditions are no longer TRUE.
De-Queuing this Job and setting to ACTIVATED.
Note In order for any queuing to take place, all jobs must have their
priority attribute set. By default, the priority attribute is set to 0
indicating that the job should not be queued, but be run immediately.
When this is the case, even jobs whose job load would push the
machine over its load limit will be run. However, it is important to
note that even when jobs have a priority of 0, job loads will still be
tracked on each machine. This is done so that jobs that do have
non-zero priorities will still be queued.
9-19
When more than one job is queued, the priority value is considered first
when deciding which job to run next. If there are insufficient load units
(job_load value) available to run the highest priority job, it will remain
in the queue, and lower priority jobs will be considered subsequently.
When there is no priority value assigned to a job (default is 0), there is
no queuing and AutoSys starts the job immediately. Therefore, the job
will never go into the QUE_WAIT state. If the jobs priority was set to run
immediately, the job would run regardless of the current load on the
machine. Obviously, this interferes with the load limiting feature, so
when load limiting is in use, the priority attribute should always be set.
In the case where a job has its job_load attribute set, the load value will
be reflected in the total load running on a machine. It is important to
note that if there is no job_load value set for a job, it will not be figured
into the total load units running on a machine.
9-20
Note The constructs of job loads and machine loads are merely
conventions that you set up, and that are enforced by AutoSys. If you
do not indicate for AutoSys what the load of a job is, it will not figure
it into its queuing calculations. This is different from the load
balancing feature, which does inspect the CPU to determine its usage.
Figure 9-5 illustrates a situation where a machine has 80 load units, and
multiple jobs are waiting to start. In this example, JobB and JobC are
executing while JobA and JobD are queued (in the QUE_WAIT
state), waiting for available load units. The numbers in the figure indicate
the job_load assigned to each job, and the max_load of the machine. The
JIL statements provided below define the machine and the jobs.
QUE_WAIT
EXECUTE
JobA
JobB
50
50
JobD
JobC
30
30
80
ferrari
max_load
9-21
insert_machine: ferrari
max_load: 80
insert_job: JobA
machine: ferrari
job_load: 50
priority: 60
insert_job: JobB
machine: ferrari
job_load: 50
priority: 50
insert_job: JobC
machine: ferrari
job_load: 30
priority: 80
insert_job: JobD
machine: ferrari
job_load: 30
priority: 70
In the above scenario, JobB and JobC are already running because
their starting conditions were satisfied first. After JobB or JobC are
completed, JobA or JobD will start. Which job will start, JobA or
JobD, is determined by a combination of the priority and job_load
attributes of each job, and the max_load machine attribute. The resulting
scenario will differ, based on which job finishes first.
If JobB finishes first, 50 load units become available, so either JobA
or JobD could be run. Since JobA has a higher priority (lower value
= higher priority), it will run first. However, if JobC finishes first, only
30 load units become available, so only JobD could be run.
SubsetsIndividual Queues
9-22
machine at any given time. For example, you have created three different
print jobs, but you want only one job to run on a machine at a time. You
can accomplish this by using a combination of the max_load attribute for
the virtual machine and the job_load attribute for the jobs themselves.
Figure 9-6 depicts a virtual machine functioning as a queue. The JIL
statements to define the queue, called ferrari_printQ follow the
graphic. Note that ferrari is a real machine.
ferrari_printQ
ferrari
15
80
To implement the schema in Figure 9-6, you would first create the virtual
machine named ferrari_printQ, like this:
insert_machine: ferrari_printQ
machine: ferrari max_load: 15
Next, you would define the three print jobs, like this:
insert_job: Print1
machine: ferrari_printQ
job_load: 15
priority: 1
insert_job: Print2
machine: ferrari_printQ
job_load: 15
priority: 1
insert_job: Print3
machine: ferrari_printQ
job_load: 15
priority: 2
9-23
Using this definition, only one of the jobs would run on ferrari at one
time, since each job requires all of the load units available on the
specified machine.
15
80
lambo
15
120
9-24
To implement the above schema, you would first create the virtual
machine named printQ, then you would specify two real machines,
ferrari and lambo as shown in the following example:
insert_machine: printQ
type: v
machine: ferrari
max_load: 15
machine: lambo
max_load: 15
9-25
attributes.
9-26
10
The Operator Console
This chapter describes how to use the AutoSys Operator Console to
monitor and control job activity in real-time. It also describes the job
selection and reporting features of the console, as well as the Alarm
Manager. Customizing the Operator Console is also covered.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Alarm Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
InfoReports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-5
Operator Console Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7
Starting the Operator Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-7
Job Activity Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-8
Menu Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-9
Job List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-10
Currently Selected Job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-11
Starting Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-13
Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Control Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Resizing Regions of the Job Activity Console . . . . . . . . . . . . . . . . . . . . . . . . 10-23
10-1
10-2
10-3
Introduction
10
Alarm Manager
10
Alarms and their responses are stored in the AutoSys database, from
which they can be retrieved for viewing, or for adding additional
responses. You can dynamically select which alarms you want to view
based on such criteria as alarm type, alarm state, and the date and time
range in which the alarm was generated.
10-4
InfoReports
10
Job Find
Last Run
This report allows you to enter the job name and get
information regarding the last run of the specified
job.
Last n Run
This report allows you to enter the job name and get
information on the nth to last run of the job.
In the Source Type drop-down menu, specify which database you are
using, either Sybase or Oracle.
In the Password field, enter the password for the AutoSys database
user.
10-5
In the Connection field, enter the Sybase database name (for Sybase)
or the TNS name (for Oracle).
Where 50 is any integer greater than zero. It is the limit on the number of
panels to buffer. The default value is 3.
Refer to the InfoReports documentation on the PLATINUM
documentation CD for information on using InfoReports.
10-6
10
Job Selection
dialog
Alarm Manager
dialog
Alarm Selection
dialog
10
If you are reading this chapter for the first time, you should start the
Operator Console before continuing. This way you can follow along with
the descriptions in the following sections using your own system.
To start the Operator Console, use one of the following two methods
At the UNIX prompt, enter the following command:
autocons &
Or
10-7
10
The first screen that displays when the Operator Console starts up is the
Job Activity Console, shown in Figure 10-1.
10-8
The Job Activity Console has a menu bar and the following three regions:
Menu Bar
10
At the top of the Job Activity Console is the menu bar, containing three
menus: File, View, and Options.
File menu
View menu
10-9
Options menu
Job List
10
The Job List region displays a list of all the jobs that are defined to
AutoSys, subject to the job selection criteria currently in effect.
Each entry in the Job List contains the following information about a
single job:
Job name.
Description.
Current status.
The entries in the Job List provide a snapshot of the entire system, across
multiple machines.
When you select a job from the list, the highlighted job becomes the
currently selected job, and more detailed information about the job
appears in the Currently Selected Job region.
To select a job
Single-click on the job in the Job List display.
When you select multiple jobs, you can perform actions on all those jobs
at the same time.
10-10
10
The Currently Selected Job region displays information about the most
recent run (or the current run) of the currently selected job. If you have
selected multiple jobs, the first job you selected will be the currently
selected job. (Freeze Frame must be deselected in order for the
information in this region to update in real time.) In this region, you will
find the following fields:
Currently
Selected Job
Console Clock
10-11
10-12
Description
Command
Start Time
End Time
The end time of the most recent run of the job. If the
job is currently running, this field will be blank.
Run Time
Status
Exit Code
The exit code from the most recent run of the job.
Next Start
Machine
Queue Name
Priority
Num. of Tries
Starting Conditions
10
The Starting Conditions area displays the jobs entire starting condition,
as specified in its job definition, as well as the atomic conditionsthe
most basic components of an overall condition. This information is very
useful when troubleshooting a job.
For example, in the sample Job Activity Console shown in Figure 10-1 on
page 10-8, the job named DripCoffee has a starting condition called:
SUCCESS(Grinder)
SUCCESS(BoilWater)
10-13
Reports
10
The Reports area displays a real-time report, and it is also included in the
Currently Selected Job region is. This report presents job run information
in the same format as that produced by the autorep command. You can
choose from the following report types:
Summary
Event
None
Summary and Event reports will be run automatically each time the
dialog is refreshed. The default refresh interval is every 5 seconds, but the
interval is user-configurable. If the Event report is chosen, you can watch
the real-time progression of a job, observing, as they occur, the arrival of
the various events, such as the job starting, running, completing, and
restarting.
Control Area
10
The bottom region of the Job Activity Console is the Control area.
10-14
Action Buttons
On the left side of this region is a group of push buttons that can be
pressed to initiate certain actions on the currently selected job or jobs. By
pressing the appropriate button, you can issue an event that will:
Start a job
Kill a job
In each of these cases, a dialog box asks you to confirm, after which the
action is taken immediately, without requiring you to perform any
further actions. If you have initiated an action on multiple jobs, the
dialog will display the following:
Ready to send event event for # jobs
where:
event
10-15
Select the various event parameters you want to specify when sending
the event.
10-16
You specify an event using one of the radio buttons at the top of the
dialog. Just below these buttons is the Job Name field, which by default
contains the name of the currently selected job. You can change this field
if desired.
You can specify when the event is to take effect, either Now (the default),
or at some future time and date. (The current time and date are provided
as examples of the required format.) Use the A.M. and P.M. radio buttons
if you want to specify the time using a 12-hour format. If the time field
contains an hours setting that is less than 13, it is considered a.m., while
any larger value is considered p.m.
The Comment field is a free-form field in which you can enter any text
you want to associate with this event in the database; this field is for
documentation purposes only. For example, if you force a job to start,
you might provide an explanation about why this was necessary.
The AUTOSERV instance field displays the current AutoSys server
identifier; only when events need to be sent to a different AutoSys
instance should this field be changed.
The Global Name and Global Value fields are used when you have
specified a SET_GLOBAL event. Global Name and Global Value can each
be a maximum of 30 characters.
The Signal field is used to specify the signal number if you specified a
SEND_SIGNAL event.
The Queue Priority field is used only when you have specified a
CHANGE_PRIORITY event. This affects the run priority of a job that is in
QUE_WAIT state.
You can only make a selection from the Status pull-down menu if the
Change Status event type (radio button) has been selected. This menu
lets you select a new status for the currently selected job.
10-17
Use the Send Priority radio buttons to specify whether the event is to be
sent with normal priority (the default), placing the event in the queue
with all system-generated events, or with high priority, placing it at the
top of the event queue. The latter is normally reserved for emergencies,
such as killing a job.
The Execute button of the dialog executes, or sends, the event. The Cancel
button cancels the event that was about to be sent. When either button is
pressed, the Send Event dialog is dismissed.
radio buttons.
Note You can select multiple jobs in the Job Activity Console
before you open the Send Event dialog. If you do so, the Send Event
dialog will send this cancel event for all of the selected jobs that
meet the Event Type criteria.
2 Select the Cancel Previously Sent Event radio button.
3 In the Job Name field, enter the job name.
4 Single-click on the Execute button. This process cancels all pending
10-18
radio buttons.
3 Select the Cancel Previously Sent Event radio button.
4 Select the Match on Time radio button.
5 In the Time field (of the Future region), specify the time the event is
scheduled to occur.
6 Single-click the Execute button. This cancels all pending events of the
specified Event Type at the specified Time for the selected job(s).
Notes on Cancelling a Send Event
The Cancel Previously Sent Event feature is designed to be used primarily
on events the that you have sent from the Send Event dialog. If you want
to override a scheduled starting condition for a job, you should use the
one time override job attribute, either from the Job Definition dialog or
from JIL.
If you cancel a future Start Job event for a time-dependent job with no
other starting conditions, the job may never run again without manually
starting it with a Send Event command. For example, jobA is scheduled
to run daily at 11:00. jobA starts at 11:00 on Monday and completes at
11:30, at which time the next future Start Job event is sent for 11:00
Tuesday. At 9:00 on Tuesday, you cancel the 11:00 Start Job event. The
job not only does not run at 11:00 on Tuesday, but it will not be
scheduled to run again. To restart the job, you can either update its job
definition, or manually issue a Start Job Send Event.
10-19
Control Buttons
In the middle of the Control area, there are several push buttons that
provide you with control functions for the Console screen. The Job
Definition button displays the Job Definition dialog with the currently
selected job already displayed. This allows you to quickly review the jobs
definition, and change it if necessary (and if permissions allow).
The Dependent Jobs button displays the Dependent Jobs dialog that
contains a list of all the jobs directly dependent on the currently selected
job. This allows you to quickly see which jobs will be affected by the
current job; in particular, which jobs will not run until the current job
completes. This is useful if the currently selected job is running late and
you need to determine which other jobs will be affected.
Figure 10-3 shows the Dependent Jobs dialog for the job BoilWater. As
with the atomic conditions list, any job in this Dependent Jobs List can
be selected, making it the currently selected job (and dismissing the
dialog).
The Dependent Jobs dialog can be dismissed by pressing the Close
button, or by selecting another job in the Job Activity Console.
Figure 10-3 Dependent Jobs Dialog Box for the Job BoilWater
10-20
10-21
Using the this dialog, you can quickly return to any previously selected
job by single-clicking on the jobs name.
Alarm Button
The large Alarm button serves both as an indicator that a new alarm has
been detected and as way to display the Alarm Manager dialog. When a
new alarm occurs, the Alarm button changes to the color red. When this
happens, and you press the button, its color returns to green, and the
Alarm Manager dialog is displayed. If the Alarm Manager dialog is
already on the screen, but is obscured by the Job Activity Console,
pressing the Alarm button will bring the Alarm Manager dialog to the top
of the display. The Alarm button can also be used to update the Alarm
Manager dialog, even if Freeze Frame is in effect.
Exit Button
The Exit button is used to close the Job Activity Console, including the
Alarm Manager. When this button is pressed, a verification dialog
displays asking you to confirm the exit.
10-22
10
The resizing handles of the Job Activity Console let you move the
boundary lines between the three regions of the window. You change
these boundaries using the small square handle at the right edge of each
regions horizontal separators; these separators are blue by default.
To adjust a boundary, you simply click and hold on a resizing handle and
drag it up or down. By doing so, your screen display can be adjusted to
reveal more jobs. For example, you can borrow display space from the
Currently Selected Job region, and even the Control area, to view more
jobs in the Job List. In fact, if the upper handle is pulled all the way down
to the bottom of the Console screen, the entire Job Activity Console can
be used to display the Job List. You can expose the buttons in the Control
area later by pulling the lower handle back up. (You can alter the Job
Activity Console display size using the resizing handles surrounding the
dialog as well.)
10
The Job Selection dialog provides a way to specify which jobs you want
to view, filtering out all other jobs. You specify the jobs you want to view
by name, job status, and machine on which the job ran (or is currently
running).
To display the Job Selection dialog
From the Job Activity Console, choose View Select Jobs.
10-23
10
If you select the All Jobs option, all jobs are selected, ignoring any entries
in the Job Name or Box Name field. However, you can select jobs by
name.
10-24
When specifying a job name in the Job Name field, you can enter either
the entire name or a partial name with the asterisk ( * ) wildcard
character representing one or more characters. You can use this wildcard
in more than one character position. For example, specifying the job
name *a* would match the jobs Dad, Bead, Bat, and so forth.
In a similar fashion, you can specify a box name in the Box Name field
to select all jobs in the specified box.
Note If you use the wildcard character to specify all box names, and
a box has other boxes inside of it, the name of the nested box job will
be listed multiple times in the Job List.
The Box Levels field lets you indicate how many levels of nesting you
want to view for a Box Job. You can enter any valid positive number.
0
Indicates that the box specified in the Box Name field and
only the first level nesting of its direct descendents are to
be displayed.
All
Indicates that the box specified in the Box Name field and
all of its direct descendents (including nested boxes and
the jobs in those boxes) are to be displayed. This is the
default.
When selecting jobs based on box name, each level of box/job will be
indented two spaces to indicate the nesting. This convention is shown in
the Job List in Figure 10-6.
10-25
10
From the Job Selection dialog, you can select jobs based on their current
status, such as STARTING, RUNNING, INACTIVE, and so forth. The
default is to display all job statuses. You can select any combination of
the statuses. All Statuses overrides any specific status selections.
10-26
10
From the Job Selection dialog, you can select jobs based on the name of
the machine on which it ran (or is currently running). On the right side
of this dialog is a list of all the machines that are referenced in any job or
machine definition, or which have run an AutoSys job. From this list, you
can choose one, several, or All Machines (the default).
Note Virtual machines will appear in this list, but cannot be used to
Selecting Machines
To choose a single machine
Single-click on that machine.
10-27
10
The Job Selection dialog lets you specify the sort order in which the jobs
should be listed. You can choose one of the following sort criteria:
10-28
Start Time
End Time
Job Name
Job Status
Machine Name
Unsorted
10
Clicking the Cancel button dismisses the Job Selection dialog without
changing the selection criteria.
10
The Options menu of the menu bar contains a single option, Console
Clock Perspective. You have three choices: Server Time, Current Job
Time, or Local Machine Time. This option controls the time perspective
of the display.
Note The Console Clock Perspective does not change the Start Time
10
The Alarm Manager lets you view alarms as they arrive, acknowledge
them, and change their status from Open to Acknowledged or Closed.
This feature provides a useful tracking mechanism for all the alarms
issued on your system.
10-29
The Alarm Manager dialog has a menu bar and the following three
regions:
10-30
Alarm List
Control
10
The Alarm Manager menu bar, at the top of the dialog, contains two
menus: View and Options.
View menu
Options menu
Alarm List
10
The Alarm List region of the dialog displays a list of all the alarms that are
currently in the system, and that meet the viewing criteria specified by the
user, which may include closed alarms. The default is to display all Open
and Acknowledged alarms, of any type, regardless of the time they were
generated.
Each entry in the Alarm List contains the following information about a
single alarm:
Alarm type.
Any comment associated with the alarm at the time it was generated.
10-31
Hold the <Control> key and single-click on each alarm that you want
to select. Holding the <Control> key and single-clicking on a selected
alarm will deselect the alarm.
Single-clicking anywhere in the alarm list will deselect all currentlyselected alarms.
Note You can configure the widths of the columns in the Alarm List
using the X resource file, described in the Alarm List Column Width on
page 10-45.
10
The Currently Selected Alarm region of the dialog displays the currently
selected alarm, and lets you enter a response in the Response edit box.
The Response edit box accepts multiple lines of text. The entered text is
automatically word-wrapped, with lines breaking at appropriate spaces.
You can use the mouse to edit text. In addition, you can use the arrow
and backspace keys as well as the <Tab> and <Enter> keys.
The User field, beneath the Response edit box, shows the user who
invoked the Alarm Manager. This read-only field shows which user
responded to the alarm field.
10-32
The Alarm State region lets you change the alarm state to Acknowledged
or Closed. Once an alarm is changed from the Open state, you cannot put
it back in the Open state.
Control
10
The third region of the Alarm Manager dialog is the Control region, at the
bottom of the dialog. In this region, there are several buttons used to
control the Alarm Manager. They are:
Freeze Frame
Select Job
New Alarm
10-33
Click Apply. This action does not dismiss the Alarm Manager.
Typically, you would use the Apply button to register changes, since the
Alarm Manager would probably be running on a continual basis.
10-34
10
The Alarm Selection dialog lets you dynamically control which alarms
are displayed. Alarms can be selected by type of alarm, state of alarm
(Open, Acknowledged, or Closed), and by the date and time of the
alarms occurrence.
Note Alarms that have been archived cannot be displayed.
10-35
The Alarm Selection dialog is divided into three regions, described in the
next sections:
Select by Type
Select by State
Select by Time
Select by Type
10
In the Select by Type region of the dialog, a list of all possible alarm types
is displayed. From this list, you can select one, several, or all types of
alarms. The default is All alarm types.
To choose a single alarm from the list
Single-click on the alarms name.
Select by State
10
You can also select alarms by the state of the alarm. You can select any or
all of the states by toggling on the appropriate buttons, or the All States
toggle. The default is to display all Open and Acknowledged alarms.
10-36
Select by Time
10
By default, alarms are shown regardless of the time they were generated.
You can choose to display only alarms that were generated during a
specific date and time window. Fields are provided to specify a From
Date, From Time, To Date, and To Time. You can specify dates without
times. However, you cannot specify times without dates.
The current system date and time are automatically filled in for your
convenience. You use a 24-hour format when specifying times.
To make the alarm selection take effect
Choose OK. This sets your selections and dismisses the Alarm
Selection dialog.
Or
Choose Apply. This sets your selections without dismissing the dialog.
10
The fonts and colors that are used in the Job Activity window as well
as the Operator Console dialogs.
The Operator Console GUI icon text and the Operator Console title
bar text.
10-37
10
The following resource controls the time interval after which the
Operator Console will be refreshed (specified in milliseconds).
*refreshTime:
10
The following resource controls the time interval after which the database
will be searched for the arrival of new alarms, and the Alarm Manager
will be refreshed (specified in milliseconds).
*pollTime:
10-38
Changing Fonts
10
The fonts used in the Operator Console fall into the following three
categories:
10
10-39
10
10
The following label resources should be the same, for consistency across
the application. They should also be fixed and be of the same type as the
list fonts given below, except that those probably shouldnt be bold.
*jobListForm*jobListLabel.fontList:
*dependHeadLabel*fontList:
*atomicsForm*atomicsLabel.fontList:
*alarmListForm*alarmListLabel*fontList:
10
The following list resources should be the same, for consistency across
the application. They should also be fixed and be of the same type as the
label fonts above, except that these probably shouldnt be bold (typically
called medium).
*jobListForm*fontList:
*dependList*fontList:
*atomicsForm*fontList:
*alarmListForm*fontList:
10-40
Object Color
10
The following resources affect the colors of the various objects within the
Operator Console. We recommend that the default colors be used, since
they match those used in the main AutoSys graphical user interface.
10-41
10-42
Border Colors
The following resources set the decorative dark blue borders of the
interface:
*workAreaForm.background:
*workAreaForm*XmPanedWindow.background:
*workAreaForm*controlForm*XmSeparator.background:
10-43
10
The following resources set the lengths of the various fields (columns) in
the Job List of the Job Activity Console. Specify a number of characters.
(The lines beginning with # are comments.)
#job name:
*nameLength:
#job description:
*descLength:
#job status:
*statusLength:
#command to be executed, according to job
#definition:
*commandLength:
#machine job is (or was) associated with, when it
#runs (or ran):
*machineLength:
#spacing between columns in all lists:
*fieldSpacing:
10-44
10
The following two resources force the Console size to be a specified width
and height. Keep in mind that this will override the resizing that occurs
as a function of the chosen font.
*maxAppWidth:
*maxAppHeight:
10
The following resource specifies the default report type to be run for the
currently selected job, at each Console refresh. Options are: None,
Summary, and Detail.
*reportType:
10
10-45
10
The following resources specify the title bar text and the icon text. By
default the title bar text is Job Activity Console and the icon text is
JAC.
Autocons.shellTitle:
Autocons.iconTitle:
Note When changing icon text, be sure the length of the new text
string does not exceed the recommended maximum length for icon
title text for your windowing system. Some window managers can
display long icon text strings, while others will truncate them. Ensure
the text string you specify for your icons displays appropriately. Also,
some window managers allow you to change the size of icons and
icon text font.
10
The last column of buttons in the Control area of the Job Activity
Console are user configurable. You may associate any command with
these buttons, and specify your own button labels. The following
resource specifications specify labels and commands for the three
configurable buttons.
Autocons*userButton1Label:
Autocons*userButton1Command:
Autocons*userButton2Label:
Autocons*userButton2Command:
Autocons*userButton3Label:
Autocons*userButton3Command:
10-46
characters or less.
10-47
necessary, replace this path with the actual path on your system. If you
have the full InfoReports product installed on your machine, you can
replace this path with the path to your InfoReports installation.
4 The default example assumes the reports (.rep files) are located in the
/autosys/inforeports/reports directory. If necessary, replace this
jobfind.rep
lastrun.rep
lastnrun.rep
10-48
printer.
For details on this script, see the PLATINUM InfoReports Installation and
Configuration Guide on the PLATINUM documentation CD.
10
10-49
10-50
11
Monitoring and Reporting
Jobs
This chapter describes how to define AutoSys monitors and reports using
essential and optional monitor/report attributes. It also explains how to
define monitors and reports using both the GUI and JIL.
About Monitors and Browsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-3
Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Defining Monitors and Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-4
Using the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Using JIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-5
Chapter Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-6
Essential Monitor/Report Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
Common Essential AttributesGeneral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
Common Essential AttributesEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-7
Essential Report Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11-10
11-1
11-2
11
Monitors provide you with a real-time view of the system. Reports (or
Browsers) provide you the ability to examine historical information
about job executions using a variety of reporting views.
Monitors and reports are simply applications that run against the
AutoSys database. Since all information is in the database, monitors and
reports that retrieve information from the database provide a complete
picture of the state of the entire system. Monitors and reports can run
with any AutoSys database, and Dual Event servers can be in use. Also,
monitors and reports can be run on any AutoSys client machine.
Monitors and reports enable you to filter and screen only the
information you are interested in from of a vast collection of data. That
is, they are tools that can give you information meaningful to you.
Both monitors and reports filter events by the following:
Type of event
11-3
Monitors
11
Monitors provide a real-time view of the AutoSys system. These are the
two steps necessary to use a monitor:
Reports
11
A report (or browser) is a query run against the database, based on the
selection criteria defined for that report. Its primary function is to enable
you to quickly get very specific information, such as the finish time of the
database backup for the last two weeks or all jobs that have an alarm
associated with them. In addition, all job levels in Box Jobs can be
reported if desired.
Like monitors, a report definition is stored in the database, enabling
reports to be run at any time, without redefining the criteria to AutoSys.
Reports can only display events that are still in the database. Archived
events are inaccessible and cannot be displayed.
11
There are a number of attributes that are used to define and describe
monitors and reports. Using these attributes, you can specify everything
from the name to be assigned to the new monitor or report, to the events
you are interested in tracking.
11-4
You can specify monitors and reports to AutoSys using either of the
following:
11
Panel.
2 In the GUI Control Panel, click Monitor/Browser button, which
Using JIL
11
11-5
Chapter Organization
11
In this chapter, monitor and report attributes fit into two categories
(sections): essential and optional. Essential attributes must be specified
in order for a definition to be valid, and optional attributes are not
required.
For each attribute described in this chapter, the following is indicated (as
shown in the diagram below):
Its name
Mode
mode
Attribute description...
JIL Keyword
11-6
11
11
The following attributes are required for both monitors and reports.
Although defaults might be available, the attributes are still essential in
that every monitor or report must include them, whether by default or by
explicit specification.
Monitor/Report Name
insert_monbro: monbro_name
Name
Mode
mode
Mode
11
11-7
As described in the next section, monitors and reports can track events by
filtering at several levels. Monitors and reports can also track events based
on selected jobs. The events to be tracked are determined by the
combination of the various event filters and the job filter, which are
specified by using any of the essential attributes.
All Events
all_events
ALL EVENTS
Alarms
alarm
Alarms
11-8
This attribute specifies whether all job status events should be tracked.
Job status events occur whenever a jobs status changes. If this attribute is
set to yes, the individual job status events shown below and a few
AutoSys-internal job status events, will be tracked.
Alarms can also be tracked in addition to job status events.
Running
success
Success
failure
Failure
terminated
Terminated
starting
Starting
restart
ReStarting
Job Filter
job_filter
Job Filter
11-9
11
This attribute specifies that only events in the current or most recent
execution of the specified job(s) will be reported. This feature is useful for
getting a sense of what is happening right now. For example, you could
select the job status event restarting, turn off job filtering, and set this
attribute to yes to see all the jobs that have been automatically restarted
by AutoSys in their current or latest run.
This attribute specifies that only events occurring after a certain date and
time for the specified job(s) will be reported. This attribute cannot be
used in a monitor definition because monitors only show events as they
occur.
11-10
11
11
Sound
sound
Sound
This attribute specifies whether the sound facility should be used. If the
workstation running the monitor has sound capabilities, AutoSys will
use them to announce the events as they occur. The announced message
is pieced together from pre-recorded sound clips.
Note It is strongly recommended that you use the sound attribute
for monitoring AutoSys, especially alarms. It frees you from needing
to look through output files to see if there are any problems.
For details on recording sound and a list of machines for which AutoSys
supports sound, see the record_sounds command in Chapter 1, AutoSys
Commands, in the AutoSys Reference Guide for UNIX.
11-11
11
11
11
11-12
11-13
The buttons at the top of the dialog are the dialogs control buttons. They
perform the following actions:
Clear
Delete
Save
Run MonBro
Exit
11-14
11
In this section, youll define one monitor and one report. In the next
section, describing the use of JIL, the examples from this section will be
used to demonstrate the JIL statements you need to create the same
definitions.
Defining a Monitor
First, you will define a monitor with the name Regular. This monitor
will monitor all alarms, plus job status events when a job changes state
to running, success, failure, or terminated for the current job run.
To open the Monitor/Browser dialog
In the GUI Control Panel, single-click on the Monitor/Browser
button, and the Monitor/Browser dialog appears.
11-15
11-16
Note If you want to run the monitor immediately, you must save it
first, then click on the Run MonBro button. When running a monitor
or a report from the GUI, an xterm window is created to display the
monitor or report output.
Defining a Report
Next, you will define a report with the name Alarm_Rep. This report
will report all alarms on any job, from December 22, 1997, at 12:00 to
the present.
To define the example report
1 Click the Clear button to clear the dialog and begin a new report.
2 In the Name field, enter the reports name: Alarm_Rep
3 In the Mode field, single-click the Browser button.
4 In the Monitor/Browse these Types of Events region of the dialog,
button next to the words Current Run Only, and enter the date and
time in the Events After Date/Time text field as follows (or you can
enter a different, appropriate time):
12/22/1997 12:00
Your entries in the Monitor/Browser dialog should look like those shown
in Figure 11-3.
11-17
11-18
11
To define a monitor or report using JIL, use the same syntax as that used
to specify a job. This is the syntax:
sub-command:monbro_name
attribute_keyword:value
where:
monbro_name
The following JIL script creates a monitor that will sound an alarm
whenever a job finishes successfully:
insert_monbro: Job_Success
mode: monitor /* "m" may be specified instead */
sound: yes
success: yes
job_filter: all
Note The JIL examples in the following sections include the monitor
11-19
For a list of machines for which AutoSys supports sound, see the
record_sounds command in Chapter 1, AutoSys Commands, in the AutoSys
Reference Guide for UNIX.
Defining Monitors
First, you will define a monitor with the name Regular. This monitor
will monitor all alarms, plus job status events when a job changes state
to running, success, failure, and terminated. It sounds an audible alarm
whenever any of the events occur (for a list of machines for which
AutoSys supports sound, see the record_sounds command in Chapter 1,
AutoSys Commands, in the AutoSys Reference Guide for UNIX).
These are the JIL statements for this monitor definition:
/* Monitor for all ALARMS, and
* Job EVENTS: RUNNING,SUCCESS,FAILURE & TERMINATED
*
* Sound is ON!
*/
insert_monbro: Regular
mode: m
sound: y
alarm: y
running: y
success: y
failure: y
terminated: y
11-20
Defining a Report
Next, you will define a report with the name Alarm_Rep. This report
will report all alarms on any job, from June 1, 1997, at 2:00 a.m., to the
present.
insert_monbro: Alarm_Rep
mode: b
alarm: y
after_time: "06/01/1997 2:00"
Notice that quotes are required in the previous example, because the time
contains a special character, the colon.
Note Reports can only display events that are still in the database.
Running a Monitor
11
To run a monitor
Enter the name in the Name field of the Monitor/Browser dialog, and
single-click the Run MonBro button.
Or
11-21
11
There is a set of X resources you can use to customize the appearance and
behavior of the Monitor/Browser GUI. In particular, these resources
allow you to control:
The time interval after which the Monitor/Browser GUI will drop the
connection to the database.
The Monitor/Browse GUI icon text and the Monitor/Browse title bar
text.
11
The following resource controls the time interval after which the
Monitor/Browser GUI will drop the connection to the database:
! TimeOut to drop DB connections (in minutes)
*DBDropTime: 400
11-22
11
The following resources specify the title bar text and the icon text. By
default the title bar text is Monitor/Browser and the icon text is
MonBro.
Autosc.shellTitleMonBro:
Autosc.iconTitleMonBro:
Note When changing icon text, be sure the length of the new text
string does not exceed the recommended maximum length for icon
title text for your windowing system. Some window managers can
display long icon text strings, while others will truncate them. Ensure
the text string you specify for your icons displays appropriately. Also,
some window managers allow you to change the size of icons and
icon text font.
11-23
11-24
12
Maintaining AutoSys
This chapter describes the procedures for maintaining AutoSys and the
AutoSys database.
Maintaining the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Starting the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-3
Monitoring the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-6
Stopping the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-7
Shadow Event Processor Rollover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-8
Running AutoSys in Test Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-10
AutoSys Maintenance Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-12
Backing up AutoSys Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-13
Restoring AutoSys Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-15
AutoSys Database Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-16
Event Server Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-16
Database Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-18
General Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12-19
Daily Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
DBMaint Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12-20
12-1
Maintaining AutoSys
12-2
Maintaining AutoSys
Maintaining the Event Processor
12
The Event Processor is the engine of AutoSys. When the Event Processor
is not running, you cannot initiate new actions. You can stop the Event
Processor, however, and the actions that have already started will run to
completion.
12
eventor Command
The eventor command performs these tasks:
12-3
Maintaining AutoSys
Maintaining the Event Processor
Invokes a restart procedure that looks for any events that are hung in
the processing state. Because events are processed one at a time,
there can only be one event hung in the processing state at a time. If
there is an event in this state, it is requeued for processing. Normally,
events will only be in this state if the Event Processor was stopped
while it was processing an event.
Note If the event being processed was a STARTJOB event, and the
job it started is still alive, it will not be started again. Also, if an
event is in the processing state for a long time, this does not
imply that the job associated with that event is in some unusual
state. It could be that the command is lengthy, or is waiting for
machine resources.
12-4
Maintaining AutoSys
Maintaining the Event Processor
Note If you do not want eventor to run the tail command, you
can use the -q option when you start the Event Processor. Several
command line options allow you to start the Event Processor
without some of the checks being performed; however, these
options should be used by an experienced AutoSys administrator
for special circumstances only.
For more information about the eventor command, see its entry in
Chapter 1, AutoSys Commands of the AutoSys Reference Guide for UNIX.
12-5
Maintaining AutoSys
Maintaining the Event Processor
12
This log file contains a record of all the actions taken by the Event
Processor, including startup and shutdown information.
If the $AUTOUSER directory is NFS mounted, you can view this output from
any machine on the network.
To view the log file
Type the following UNIX command:
tail -f $AUTOUSER/out/event_demon.$AUTOSERV
Or
When you execute this command, the last ten lines of the log file are
displayed, and then all additions to the log are automatically
displayed as they occur.
To terminate the autosyslog process
Press <Control+c>.
Note We recommend that you use the autosyslog -e command to
follow the behavior of the Event Processor. It displays the log file,
which generates information on all Event Processor activity.
12-6
Maintaining AutoSys
Maintaining the Event Processor
The Event Processor log has a file system threshold setting. The Event
Processor shuts down if there is less than 8 kilobytes of disk space
available. However, if the amount of available disk space falls below that
specified by the FileSystemThreshold parameter in the configuration file,
the Event Processor issues warnings in the Event Processor log file.
For information on the FileSystemThreshold parameter, see the Event
Processor Log Disk Space section in Chapter 13, Configuring AutoSys.
12
Superuser.
2 Issue the following command:
sendevent -E STOP_DEMON
12-7
Maintaining AutoSys
Maintaining the Event Processor
12
12-8
Maintaining AutoSys
Maintaining the Event Processor
Similarly, if the Primary Event Processor cannot locate and signal the
Shadow Event Processor, the Primary processor checks the Third
Machine for the .dibs file, and follows the same procedure as the
Shadow Event Processor (as described above).
If the Primary Event Processor and an Event Server are on the same
machine, the Event Processor failure could also mean an Event Server
failure. In this situation, if Dual Event Servers are configured, AutoSys
will roll over to the Shadow Event Processor and to Single Server mode.
AutoSys uses the Third Machine and the existence of the .dibs file to
resolve contentions and to eliminate the case where one processor takes
over because its own network is down. However, the Shadow Event
Processor is not guaranteed to take over in 100% of the cases. For
example, in the case of network problems, AutoSys might not be able to
determine which Event Processor is the healthy one, and it will shut
down both processors.
Note You can specify the Shadow Event Processor and the Third
Machine by modifying the tunable parameters in the AutoSys
configuration file. For information, see Chapter 13, Configuring AutoSys.
machine:
eventor -M shadow_machine
This command starts the Primary and Shadow Event Processors at the
same time.
12-9
Maintaining AutoSys
Running AutoSys in Test Mode
12
If you want to check your AutoSys configuration, you can run AutoSys in
test mode. This process is helpful for troubleshooting problems. Running
the Event Processor in test mode allows you to test the set up as well as
the execution of logic by the jil command, without having to run the
defined jobs. A simple job is run in place of the defined job.
When running in test mode, you can determine the following:
If the Event Processor and the Remote Agents are installed and
configured properly. Running in test mode uses the same mechanisms
of starting jobs and sending events that AutoSys uses in its normal
mode.
You can run the Event Processor at two levels of test mode. You do this
by setting the $AUTOTESTMODE environment variable before starting the
Event Processor. The levels of test mode are determined by the value of
the $AUTOTESTMODE variable. These are the values, which are discussed in
the following sections:
$AUTOTESTMODE = 1
$AUTOTESTMODE = 2
Note The Event Processor cannot run partially in test mode; AutoSys
does not provide a test mode for the database. Therefore, you should
exercise extreme caution when you run in test mode on a live
production system.
12-10
Maintaining AutoSys
Running AutoSys in Test Mode
$AUTOTESTMODE = 1
At the first level of test mode, each job that you specify runs with the
following test mode variations:
Standard output and standard errors for the command are redirected
to the /tmp/autotest.$AUTO_JOB_NAME file, where $AUTO_JOB_NAME is
the job name as defined to AutoSys.
If the job being run in test mode is a File Watcher job, it is not disabled;
it runs as it would in real mode.
$AUTOTESTMODE = 2
The second level of test mode runs with the same behaviors as the first
level with the addition of the following procedures:
12-11
Maintaining AutoSys
AutoSys Maintenance Commands
12
chase
The chase command verifies that the expected jobs are running. It goes
to every machine that should be running a job and verifies that the
following are true:
Errors detected by chase are sent to standard output. The options used
with chase further determine what actions are taken when error
conditions are detected. chase can send alarms to AutoSys to alert you to
the problems it finds (by using the -A option). In addition, it can
automatically restart jobs that are missing in action and that are
defined to be restartable (by using the -E option). For more information
about the chase command, see Chapter 1, AutoSys Commands, in the
AutoSys Reference Guide for UNIX.
Note There is no way for chase to tell if a machine is down;
clean_files
The clean_files command deletes old Remote Agent log files. It
performs this task by searching the database for all machines that have
had jobs started on them, and then sending a command to the Remote
Agent on that machine to purge all remaining log files from the
12-12
Maintaining AutoSys
Backing up AutoSys Definitions
Where days specifies that files older than this number of days should be
deleted.
For more information about the clean_files command, see Chapter 1,
AutoSys Commands, in the AutoSys Reference Guide for UNIX.
12
calendar definitions
job definitions
machine definitions
global variables
12-13
Maintaining AutoSys
Backing up AutoSys Definitions
your job definitions, from the UNIX command prompt, execute the
following command:
autorep -M ALL -q >> /directory/autosys.jil
Where directory is the same directory where you saved your job
definitions, a directory outside of the AutoSys directory structure.
Note To append definitions to an existing file, you enter >>
instead of >. We recommend that you append your job, machine,
and monitor and browser definitions to the same file. Then you
have only one file to restore following a system failure.
4 To append your monitor and browser definitions to the same file that
contains your job and machine definitions, from the UNIX command
prompt, execute the following command:
monbro -N ALL -q >> /directory/autosys.jil
12-14
Maintaining AutoSys
Restoring AutoSys Definitions
Where directory is the same directory where you saved your job
definitions, a directory outside of the AutoSys directory structure.
5 To save your global variables to their own file, from the UNIX
definitions automatically.
6 To save your license keys, run the gatekeeper command to print your
12
The procedure in this section assumes that you backed up your AutoSys
definitions by following the procedure in Backing up AutoSys Definitions
on page 12-13.
To restore AutoSys definitions
1 To restore your calendar definitions:
a Open a Calendar Definition window.
b Choose File Import.
12-15
Maintaining AutoSys
AutoSys Database Overview
d Click OK.
2 To restore your job, machine, and monitor and browser definitions,
12
12
An Event Server can be associated with only one instance of AutoSys and
one running Event Processor.
12-16
Maintaining AutoSys
AutoSys Database Overview
Job definitions
Events
Calendar information
Machine definitions
For a list of the database tables and views as well as the event and alarm
codes used in the database, see Chapter 6, Database Tables and Codes, in
the AutoSys Reference Guide for UNIX.
12-17
Maintaining AutoSys
AutoSys Database Overview
How often the database is cleaned. (Every time a job runs, it generates
at least three events and an entry in the job_runs table.)
Database Architecture
12
Event
Server 1
Define
Jobs
OS FILE:
config.$AUTOSERV
Event
Server 2
Event
Processor
Instructs Remote Machine:
Command to execute and
database(s) to send events to.
Remote
Agent
database(s)
Processes
Figure 12-1 shows one instance of AutoSys that is configured with Dual
Event Servers, which are used only by this one instance. Both the Event
Processor and the Remote Agent ensure that events are written to the
appropriate database(s).
12-18
Maintaining AutoSys
General Database Maintenance
12
You can configure AutoSys to maintain itself as it runs. In fact, there are
defaults in place that provide frequent, automatic maintenance. You can
customize the configuration file. In addition to this regularly scheduled
maintenance, you can issue general and AutoSys database maintenance
commands from the command line.
Periodic maintenance is essential to keeping AutoSys working correctly.
Several AutoSys events are generated for each run of each job. If these
events are not pruned from the database periodically, the database will
eventually fill up, bringing AutoSys and its jobs to a halt. Therefore, we
recommend that you use the suggested periodic maintenance practices
described in this section.
12-19
Maintaining AutoSys
General Database Maintenance
12
DBMaint Script
12
Run the AutoSys dbspace command to check the available space in the
database. If the amount of free space is insufficient, it issues warning
messages and generates a DB_PROBLEM alarm.
Note If you use an Oracle database, running DBMaint may report
that your database is close to full when this is not the case. This can
occur because DBMaint calculates how much space is not allocated
for extents. The extents may be nearly empty, but DBMaint reports
the whole extent as used space.
12-20
Maintaining AutoSys
General Database Maintenance
Calculate and update the average job run statistics in the avg_job_run
table. This information is used by AutoSys/Xpert. When dbstatistics
is run, old data is overwritten with the new data.
Events and any alarms associated with them from the event table
autotrack log
12-21
Maintaining AutoSys
Event Server Rollover Recovery
When you modify the script, copy it first, and then add your
enhancements to the copied version. If you modify the script, you should
keep a backup copy of it; then, when you upgrade, you will not lose your
changes. You can use your enhanced script to modify the newly installed
script.
The script name is specified by the DBMaintCmd parameter in the AutoSys
configuration file.
12
12-22
Maintaining AutoSys
Event Server Rollover Recovery
12
If one Event Server crashes, AutoSys will automatically roll over to the
healthy server and continue running in Single Server mode. After you
recover the crashed server, you can reconfigure AutoSys to run in Dual
Server mode again.
Note Do not, under any circumstances, restart the down Event
Server and run in Dual Server mode. Before starting the down server,
you must make sure that the two Event Servers are synchronized,
following the instructions in the Synchronizing the Event Servers section
below.
12
If you have gone into Single Server mode due to problems, and now want
to go back to running Dual Event Servers, you must synchronize the
databases.
Note Before doing this, you must have already installed and
configured your AutoSys system for Dual Event Servers, as described
in the Installing Dual Event Servers section in Chapter 9, Advanced
Configurations of the AutoSys Installation Guide for UNIX.
12-23
Maintaining AutoSys
Improving Database Performance
Or, if you are running a Shadow Event Processor, start the Event
Processors like this:
eventor -M shadow_machine
12
12
12-24
Maintaining AutoSys
Improving Database Performance
For unbundled Sybase only, put your data on a raw partition. This
improves access time.
WARNING Only the database administrator should put your data
on a raw partition.
12
Tune the shared pool size. Make changes to the shared pool size by
altering the init.ora value of SHARED_POOL_SIZE.
To determine if you need to increase the shared pool size, enter the
following query in SQL*Plus:
select sum(pins) Executions,
sum(reloads) Cache Misses while Executing,
((sum(reloads)/sum(pins))*100) Ratio of Misses
from v$librarycache;
The Ratio of Misses should be less than 1%. (The Ratio of Misses
number is displayed as a percentage.) If it is higher than 1%, you
should increase the value of SHARED_POOL_SIZE incrementally
until the value of Executions approaches zero.
12-25
Maintaining AutoSys
Improving Database Performance
Tune the buffer cache. Make changes to the buffer cache by altering
the init.ora value of DB_BLOCK_BUFFERS.
To determine if you need to allocate more memory, enter the
following query as the sys user in SQL*Plus:
select name, value
from v$sysstat
where name in
(db block gets, consistent gets, physical reads);
Maximize disk I/O by separating the data files. If you have disk
contention, place the autodata and autoindexes data files on separate
disk drives, and if possible, different drive controllers.
Tune the sort area. A sort area in memory sorts records before they are
written to disk. Increasing the size of the sort area by increasing the
init.ora value of SORT_AREA_SIZE improves sort efficiency.
To determine if sorting is affecting the performance of your system,
monitor the sorting disk activity in your system by entering the
following query in SQL*Plus:
select name, value from v$sysstat
where name in (sorts (memory), sorts (disk));
If disk sorts are greater than 1% of memory sorts, then increase the
value of SORT_AREA_SIZE.
12-26
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
12
Because you can purchase AutoSys with a bundled Sybase database, this
section is specific to Sybase Event Server maintenance. It contains
information to help you query the database as well as to perform basic
maintenance procedures on Sybase SQL Server databases.
Note The following sections are specifically for bundled Sybase
users. If you are using an existing Sybase or Oracle database with
AutoSys, consult your database administrator for details on starting,
stopping, and configuring your database.
Sybase Architecture
12
12-27
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
Sybase Environment
12
If you are using a Sybase, the following environment variables are used:
DSQUERY
SYBASE
12
12-28
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
Database Users
When using the bundled Sybase version of AutoSys, there are two users
defined by default in the AutoSys database: the system administrator and
the AutoSys user. Each of these users has a default user name and
password.
User
User Name
Default Password
sa
sysadmin
autosys
autosys
System Administrator
AutoSys User
12-29
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
Notice the semi-colon at the end of the command line. It is an end-ofstatement delimiter, replacing the Sybase go.
WARNING After you change the sa password, the old password is
unrecoverable. Make sure that the new password is recorded; otherwise,
the entire database will have to be re-installed.
Starting Sybase
12
Starting Sybase involves executing the command that will bring up the
AutoSys database on the machine where AutoSys has been installed. The
following example is for Sybase-bundled versions of AutoSys. If there is
a pre-existing dataserver at your site, consult your local database
administrator about how to start the database.
To start the bundled Sybase
1 As the user who installed AutoSys, log onto the machine where the
12-30
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
command:
xql -Uautosys -Pautosys -c "select getdate()"
Stopping Sybase
12
You must shut down Sybase before shutting down or rebooting the
machine. Before you shut down Sybase, however, you should shut down
the Event Processor.
To stop Sybase
1 If the Event Processor is running, stop it. To do this, log on as the Exec
12-31
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
Accessing Sybase
12
Note The xql utility functions only with the Sybase database. If you
use an Oracle database, use sqlplus instead.
12-32
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
12
These are reasons you might want to identify the processes that are
connected to the database:
Before you change the autosys user password or shut down AutoSys,
you should ensure that no processes are connected to the database.
You can identify the active processes, then shut them down.
Many GUI processes connected to the database can slow it down. You
can see how many and what type of processes are connected to the
database, and then ask users to shut down the GUIs they are not
currently using.
To see what processes are connected to the database and their status
At the xql prompt, enter the following:
xql>>[AUTOSYSDB][master] 1> select program_name, hostname,
xql>>[AUTOSYSDB][master] 2> hostprocess,
xql>>[AUTOSYSDB][master] 3> status from sysprocesses;
hostprocess
-----------
status
------------
xql
Joe
14050
event_demon
jil
Michelle
Erik
13448
12272
running
sleeping
sleeping
sleeping
sleeping
sleeping
recv sleep
recv sleep
12-33
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
In the example list of processes, xql is the process running your query to
display the processes, and event_demon is the Event Processor. The
processes without names are internal Sybase processes, which you can
ignore.
The following are the most common processes you will see (there are
others):
autocal
event_demon
sendevent
autocons
hostscape
timescape
autosc
jil
xql
auto_remote
jobscape
12
AutoSys jobs are scheduled and run based on the date and time for the
machine on which the database is running. If your jobs do not run when
you expect them to, you can check the database clock.
To display the database date and time
At the xql prompt, enter the following:
xql>>[AUTOSYSDB][master] 1> select getdate();
12
You must back up the AutoSys database periodically, so that you can
recover it in the event of catastrophic system or media failure. You should
decide on a routine for backing up the AutoSys database so that you will
have no trouble recovering a lost database, using the backup database
dump.
This section describes how to create a backup server and dump the
AutoSys database to a file, which you can then back up to tape.
12-34
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
If you have not yet defined a dump device to Sybase, you must define a
disk or tape dump device, as described in Defining a Disk Dump Device on
page 12-35. Then follow the steps in Dumping the Database on
page 12-39.
where:
dump_device
Is the full pathname of the file where the database dump will be
written. Ensure that this file can be created to the appropriate size
for your database, and that it can be mounted on the machine that
hosts the second Event Server.
For example, the following command will define a disk dump device
named autodump, and the database will be dumped to a file named
/backup/autodumpdata (for this example to work, the backup directory
must already exist).
xql>sp_addumpdevice "disk", autodump, "/backup/autodumpdata", 2;
12-35
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
where:
dump_device
12-36
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
When you are finished, you will have two entries in your interfaces file:
one for AUTOSYSDB and another for SYB_BACKUP. Your SYB_BACKUP entry
should look similar to the following:
SYB_BACKUP
query tcp sun-ether fiji 5335
master tcp sun-ether fiji 5335
console tcp sun-ether fiji 5336
The above example creates a backup server on a host named fiji, using
port number 5335. The backup server port can be the same as the port
used by the dataserver.
Note The format of the interfaces file requires that a single tab (do
not use spaces) precede the first word of every line that follows the
SYB_BACKUP line (which should not have any spaces before it). A single
space is used to delimit each element in an entry line. Incorrect
formatting will prevent communication with the database.
12-37
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
where:
SYB_BACKUP
Specifies the backup server port. The backup server port can be the
same as the port used by the dataserver, as long as the backup
server and dataserver are on different machines.
>>
12-38
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
#
SYB_BACKUP
query tli /dev/tcp \x000214d7c0a8f4150000000000000000
master tli /dev/tcp \x000214d7c0a8f4150000000000000000
console tli /dev/tcp \x000214d8c0a8f4150000000000000000
If you already defined a dump device to Sybase, continue with the next
section. Otherwise, you must define a disk or tape dump device to
Sybase, as described in Defining a Dump Device on page 12-35.
12-39
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
where:
database_name
Is the name of the Sybase dump device that you already defined to
Sybase.
For example, the following writes to a dump device named autodump:
xql>dump database autosys to autodump;
transactions can occur while the load is in progress, add the following
database options:
xql>sp_dboption autosys, "no chkpt on recovery", TRUE;
xql>sp_dboption autosys, "dbo use only", TRUE;
xql>sp_dboption autosys, "read only", TRUE;
4 To issue a checkpoint, enter the following:
xql>checkpoint;
5 To load the database backup, enter the following:
xql>load database database_name2 from dump_device;
12-40
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
where:
database_name2
Is the name for the Sybase dump device that you already defined to
Sybase.
For example, the following will load a disk dump named autodump
of the database named autosys:
xql>load database autosys from autodump;
6 After the load has succeeded, enter the following to unset the single
12-41
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
is sysadmin):
xql -Usa -Psysadmin
2 At the xql prompt, enter the following:
xql>>[AUTOSYSDB][master] 1> drop database autosys;
If the AutoSys database is so damaged that drop database does not work,
contact your Technical Support representative.
Note The semicolon at the end of the command line is an
end-of-statement delimiter in xql, replacing the Sybase go.
12-42
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
12-43
Maintaining AutoSys
Maintaining Bundled Sybase SQL Servers
Note For Sybase System 11, you must put the database online.
12-44
13
Configuring AutoSys
The runtime behavior of AutoSys is controlled by the parameters in the
AutoSys configuration file and the environment variables set in the
/etc/auto.profile file. This chapter describes these files.
Note If you are running AutoSys on Windows NT, the configuration
parameters are set through the AutoSys Administrator. For more
information on the AutoSys Administrator, see the AutoSys User Guide
for Windows NT.
AutoSys Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-3
Sample Configuration File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
Configuration File Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-9
Database Time-out Period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-10
Cross-Instance Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
Database Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
Event Processor Cascading Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-12
Machines to Check for Running Event Processors . . . . . . . . . . . . . . . . . . . . 13-13
Third Machine for Event Processor Contention . . . . . . . . . . . . . . . . . . . . . . . 13-14
Event Processor Log Disk Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
Internal Database Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-15
13-1
Configuring AutoSys
13-2
Configuring AutoSys
AutoSys Configuration File
13
The file is instance-specific, and the $AUTOSERV value is the name of the
instance of AutoSys with which the configuration file is associated. The
$AUTOSERV variable must be three uppercase alphabetic characters and
must be unique to each instance of AutoSys.
Note Events have a unique ID called eoid, which is prefixed by the
first three letters of $AUTOSERV. This ensures an events uniqueness and
13-3
Configuring AutoSys
Sample Configuration File
13
13-4
Configuring AutoSys
Sample Configuration File
XInstanceDBDropTime=1
#
# Number of times for Event Processor to attempt to
# Reconnect to Event Servers
#
DBEventReconnect=50
#
# USE the following for Dual DataBases
#DBEventReconnect=50,5
#
# # # # # Event Processor Parameters # # # # #
#
# Event Processor ERRORS
# If there are more than 20 errors in 60 seconds it
# will exit. The MAX value of EDNumErrors is 100.
EDNumErrors=20
EDErrTimeInt=60
#
# Machines for chk_auto_up to inspect to see if an
# Event Processor is running there.
#EDMachines=host1,host2,host3
EDMachines=localhost
#
# For Shadow Event Processor, the Third Machine to
# resolve contention problems between Event
# Processors
#ThirdMachine=a_hostname
13-5
Configuring AutoSys
Sample Configuration File
#
#
#
#
#
#
FileSystemThreshold=32
# Event Processors internal Daily Database
# Maintenance Cycle # #
#
# Daily start-time
DBMaintTime=03:30
# Command to Run to perform Maintenance
#
DBMaintCmd=$AUTOSYS/bin/DBMaint
#
# For Dual Server Mode - transfer events timeout
EvtTransferWaitTime=5
#
# Check Heartbeat every 2 minutes
#Check_Heartbeat=2
#
# Output Directory for the Remote Agent
#
# Note: Some OSs have problems with file locks in /tmp
# If so use some directory other than /tmp.
#
13-6
Configuring AutoSys
Sample Configuration File
AutoRemoteDir=/tmp
#
# Clean Remote Agent files: 1=Remove files if No
# Problems!
CleanTmpFiles=1
#
# Create Remote Agent Output File for Sourcing the
# Environment
# In UNIX: capture std_out & std_err from sourcing
# /etc/auto.profile
# In NT: output the Environment to the file
#
RemoteProFiles=1
#
# Host machines to send SNMP traps to. (Specifying
# a machine ENABLES traps)
#SnmpManagerHosts=host1,host2
#
# Snmp community. This is almost always "public"
#SnmpCommunity=public
# Enable sending HP Operations Center messages (opcmsg)
# for AutoSys alarms.
# This defines the message group under which
# messages will be sent.
#OpcMessageGroup=Job
#
# This parameter sets the amount of time that the
# event_demon will wait for the OpCenter message
# to be sent.
13-7
Configuring AutoSys
Sample Configuration File
#
#OpcWaitTime=4
#
# RESTART configuration stuff
#
# Max number of times to RESTART a job due to system
# errors
MaxRestartTrys=10
#
# Formula for computing the Wait time between
# restart attempts:
# WaitTime = RestartConstant+(Num_of_Trys *
# RestartFactor)
#
# WaitTime = MaxRestartWait
#
RestartConstant=10
RestartFactor=5
MaxRestartWait=300
# Preferred method of Load Balancing
#
Can be:
#MachineMethod=rstatd
#
# List of Signals to Send to a Job for the KILLJOB
# event
KillSignals=2,9
13-8
Configuring AutoSys
Configuration File Parameters
ZTeamJobSupport=0
#
# Specify if standard error and standard output
# files should be appended to or overwritten.
# 0 overwrites the file.
# 1 appends the file.
AutoInstWideAppend=1
#
# Enable PLATINUM Event Management and Data Exchange
# 0 does not send events to PEMS and DEX.
# 1 send events to PEMS and DEX.
#
#AutoPems=1
13
13-9
Configuring AutoSys
Configuration File Parameters
The Event Processor reads the settings in the configuration file on startup
only. Therefore, if you make changes to the file, you must stop and restart
the Event Processor so it can read the new settings.
To stop and restart the Event Processor
1 Stop the Event Processor, using the following command:
sendevent -E STOP_DEMON
2 Restart the Event Processor, like this:
eventor
Or, if you are running AutoSys with a Shadow Event Processor, you
can start both the Primary and the Shadow Event Processors at the
same time, like this:
eventor -M shadow_machine
13
13-10
Configuring AutoSys
Configuration File Parameters
13
XInstanceDBDropTime
The XInstanceDBDropTime parameter specifies how an AutoSys instance
will connect with another AutoSys instance if it has a job defined with a
cross-instance job dependency.
If the value of this parameter is equal to zero, the Event Processor will
connect to the other instance before every new event is sent. After the
event has been sent, the connection will be dropped. Use this option for
instances that are using cross-instance job dependencies infrequently.
If the value of this parameter is equal to one, the Event Processor will
connect to the other instance before the first event is sent, and it will
maintain the connection indefinitely. Use this option for instances that
are using cross-instance job dependencies often.
The following line in the configuration file sets the cross-instance
connection to 1, and thus, the Event Processor will maintain the
connection after making the initial connection:
XInstanceDBDropTime=1
Database Connections
13
13-11
Configuring AutoSys
Configuration File Parameters
DBEventReconnect
The DBEventReconnect parameter controls the number of times an Event
Processor should attempt to connect (or reconnect) to an Event Server
before shutting down, or before rolling over to Single Server Mode. This
parameter is used on start-up and when there is a connection problem
during runtime.
In Single Server Mode, this parameter is set to a simple number, like this:
DBEventReconnect=50
13
To guard against cascading errors, you can set bounds that will force
AutoSys to automatically shut down the Event Processor if too many
errors occur within a certain period of time. The EDNumErrors and
EDErrTimeInt parameters work together to guard against these cascading
Event Processor errors, which are caused by the Event Processor
automatically re-issuing failed directives.
13-12
Configuring AutoSys
Configuration File Parameters
The primary reason for setting these two parameters to shut the Event
Processor down in this situation is to avoid starting any new processes
while there are serious problems in the system.
EDNumErrors, EDErrTimeInt
The EDNumErrors parameter specifies the maximum number of errors that
can happen within the time specified by the EDErrTimeInt parameter, in
order to determine if AutoSys should shut down the Event Processor. If
the specified Number of Errors occurs within the Error Time Interval,
AutoSys shuts down the Event Processor as a safety measure.
If there are more than EDNumErrors errors within EDErrTimeInt seconds,
AutoSys shuts down the Event Processor. The default settings specify to
shut the processor down if more than 20 errors occur within 60 seconds,
and the entries in the configuration file look like this:
EDNumErrors=20
EDErrTimeInt=60
13
EDMachines
The EDMachines parameter specifies a list of valid AutoSys server
machines on the network. AutoSys checks all of the machines on this list
for running Event Processors, both when chk_auto_up is run and when a
new Event Processor is started.
The list should contain all of the machines that could have a started and
running Event Processor on them, so that a new Event Processor cannot
be started on a different machine. Having a complete list of EDMachines
is especially critical when a Shadow Event Processor takeover has
occurred, and your Primary server is configured to automatically restart
the Event Processor.
The entry in the configuration file looks like this:
EDMachines=host1,host2,host3
13-13
Configuring AutoSys
Configuration File Parameters
13
ThirdMachine
When running with a Shadow Event Processor, AutoSys uses a Third
Machine to resolve possible contentions between the two Event
Processors, and to ensure that only one of the processors is running at
any given time.
If the Shadow Event Processor does not receive a ping from the Primary
Event Processor, or if the Primary Event Processor cannot signal the
Shadow Event Processor, the processor(s) connect to this Third Machine
and create a .dibs file that locks the other processor out. The .dibs file
indicates that the one Event Processor has taken over and the other
should shut down.
The Third Machine must have a Remote Agent installation on it. In
addition, the Third Machines hostname must be in the AutoSys
configuration file on both the Primary and Shadow Event Processor
machines. For example, to specify the machine named ferrari as the
Third Machine, enter the following line in the configuration files for both
Event Processor machines:
ThirdMachine=ferrari
Note The Third Machine must have a Remote Agent installed on it,
and it must have a valid client license. In addition, the Third Machine
must be installed on the same type of machine as the Primary and
Shadow Event Processors are installed on, either NT or UNIX.
13-14
Configuring AutoSys
Configuration File Parameters
13
The Event Processor will shut down if there is less than 8 kilobytes of disk
space available to write to the Event Processor log file
(event_demon.$AUTOSERV). If the amount of available disk space falls
below that specified by the FileSystemThreshold parameter, the Event
Processor will issue warnings in the Event Processor log file similar to the
following:
WARNING: The disk partition containing the EP log file is too full!
WARNING: EP will shutdown if partition has less than 8192 bytes
available!
13
Once a day, the Event Processor goes into a database maintenance cycle.
During this time, it does not process any events, and it waits for the
maintenance activities to complete before resuming normal operations.
In the configuration file, you can specify the time of day for this
maintenance cycle, and you can specify a maintenance command. The
time you specify should be during a time of minimal activity.
13-15
Configuring AutoSys
Configuration File Parameters
Updates statistics for the optimizer, checks the available space in the
database, and sends a DB_PROBLEM alarm if the amount of free
space is insufficient.
Cleans out old information from the AutoSys database tables using
the archive_events command.
DBMaintTime, DBMaintCmd
The following entries in the configuration file instruct the Event
Processor to begin its maintenance cycle at 3:30 a.m. every day, and to
execute the $AUTOSYS/bin/DBMaint script at that time:
DBMaintTime=03:30
DBMaintCmd=$AUTOSYS/bin/DBMaint
Event Transfer
13
When in Dual Server Mode, the Event Processor will copy a missing event
from one Event Server to the other Event Server, after a time-out delay.
This time-out delay is specified by the EvtTransferWaitTime parameter in
the configuration file. The default setting of 5 does not usually need to be
modified.
13-16
Configuring AutoSys
Configuration File Parameters
EvtTransferWaitTime
To set the default behavior of 5 seconds for the time-out, the
configuration file contains the following line:
EvtTransferWaitTime=5
Heartbeats
13
Check_Heartbeat
The Check_Heartbeat parameter specifies the interval value (in minutes)
that you want the Event Processor to use when checking for heartbeats. If
there are no applications sending heartbeats, you do not have to set this
parameter. By default, this parameter is commented out in the AutoSys
configuration file.
For example, to instruct the Event Processor to check for missing
heartbeats every two minutes, you would uncomment the following line
in the configuration file:
Check_Heartbeat=2
13-17
Configuring AutoSys
Configuration File Parameters
13
During its operation, the Remote Agent writes output messages to files in
the directory specified by the AutoRemoteDir parameter. For some
operating systems, the locking of files located on the /tmp file system is
not supported (e.g., on SunOS platforms when /tmp is mounted on
tmpfs). Since AutoSys uses the locks to determine if the Remote Agent is
running, another directory must be specified.
The AutoRemoteDir parameter is passed to the Remote Agent by the Event
Processor when it starts. As a result, the Remote Agent log files directory
must already exist, and be writable on every machine running AutoSys.
In a cross-platform environment where a UNIX Event Processor starts an
NT Remote Agent (or vice versa), the path to the log files directory is
translated into the format expected by the recipient platform. A UNIX
Remote Agent will remove the drive letter and colon, if present, and
replace \ characters with / characters. For example, C:\tmp becomes /tmp.
An NT Remote Agent will prepend the system drive letter and colon if
they are not present, and replace all / characters with \ characters. For
example, /tmp becomes C:\tmp.
AutoRemoteDir
The following entry in the configuration file specifies that the Remote
Agents should use the /tmp directory for enterprise-wide logging:
AutoRemoteDir=/tmp
File Maintenance
13
CleanTmpFiles
For every job that AutoSys runs, it creates a file in the Remote Agent Log
directory on the machine where the job runs. If CleanTmpFiles is turned
off, these files remain on each machine until they are removed with the
clean_files command.
13-18
Configuring AutoSys
Configuration File Parameters
Then, upon the successful completion of its tasks, the Remote Agent will
remove the /tmp/auto_rem* file (assuming the default /tmp directory is
specified by the AutoRemoteDir parameter). This is the format of the
Remote Agent log filename, the auto_rem* file that is removed:
auto_rem.joid.run_number.ntry
If the Remote Agent cannot run the job successfully, the files will not be
removed because they are useful to have when diagnosing the run
problem.
Note To view the Remote Agent output file, use the autosys_log
RemoteProFiles
When the RemoteProFiles parameter is turned on, it redirects to a file any
stderr and stdout output generated when the /etc/auto.profile file is
sourced. This parameter is on by default, and the entry in the
configuration file looks like this:
RemoteProFiles=1
The name of the file to which the profile output is written is based on the
log file name. This is the form of the auto_rem_pro* filename:
auto_rem_pro.joid.run_number.ntry
13-19
Configuring AutoSys
Configuration File Parameters
This output file will contain entries if anything specified in the profile file
failed (e.g., environment variables or definitions were not set). For
example, if the profile file attempts to set an environment variable using
setenv, the Bourne shell that AutoSys runs would not be able to process
this C Shell syntax, and the output file would contain the following line:
setenv: not found
Non-fatal errors when a profile file is sourced are not recorded and will
not appear in the output file.
To view the profile output file, use the autosys_log command on the
client machine, like this:
autosys_log -J job_name -p
This command will display the log file first, appending the profile
output, if there is any. If no profile output file exists, the log file will
display this:
File: profile_output_file Does Not Exist.
Note If CleanTmpFiles is turned on (set to 1), the output file will be
removed when the job completes successfully, and the profile log
information will not be available. If CleanTmpFiles is turned off, the
file will remain until it is removed with the clean_files command.
13-20
Configuring AutoSys
Configuration File Parameters
SNMP Connections
13
SnmpManagerHosts
The SnmpManagerHosts parameter specifies the machines to which
AutoSys will send SNMP traps. It contains a list of machines on the
network that are running SNMP managers, such as HPs OpenView or
IBMs NetView, and to which you want to send SNMP traps (i.e., post
SNMP events). By entering the name of a machine with this parameter,
you enable this functionality.
The entry in the AutoSys configuration file would look like this:
SnmpManagerHosts=host1,host2
13-21
Configuring AutoSys
Configuration File Parameters
SnmpCommunity
The SnmpCommunity parameter specifies the SNMP community associated
with all SNMP traps sent by AutoSys. This parameter is effectively a
password that can be used to filter SNMP traps by SNMP managers, such
as HPs OpenView. This value is almost always public, and thus, the entry
in the AutoSys configuration file usually looks like this:
SnmpCommunity=public
Configuring OpenView
To integrate OpenView with AutoSys
1 Install the AutoSys Tools option in the OpenView Misc menu, which
13-22
Configuring AutoSys
Configuration File Parameters
In the autosys file, you must replace AUTOSYSBIN with the actual install
location of the AutoSys binaries. For example, if OpenView and AutoSys
are installed on the same machine, and AutoSys is located in the
/usr/vendors/autosys directory, you would locate the following lines:
Command "AUTOSYSBIN/autocons";
Command "AUTOSYSBIN/autosc";
After you modify the file, copy it to the directory specified below.
For OpenView Operations Center 2.x:
/usr/OV/registration/$LANG
$LANG specifies the language with which OpenView Operations Center
2.x was installed, and this is usually english.
13-23
Configuring AutoSys
Configuration File Parameters
13-24
Configuring AutoSys
Configuration File Parameters
Supplied with your AutoSys release are two trapd.conf fragments that
you can merge into the existing trapd.conf file to configure all AutoSys
traps. These fragments are located in the trapd.auto1 and trapd.auto2
files in the following directory:
$AUTOSYS/snmp
SNMP.
This opens the Event Configuration window.
13-25
Configuring AutoSys
Configuration File Parameters
AutoSys.
The Event Identification list box displays all AutoSys alarm names.
3 Select the event named AS_JobFailure and single-click the Modify
button.
The Modify Event window appears.
4 At the bottom of the Modify Event window, in the Command for
Automatic Action text box, enter the name of the script you want
executed whenever this alarm event is received by OpenView. Then,
click OK.
13-26
Configuring AutoSys
Configuration File Parameters
HP OpenView IT/Operations
13
OpcMessageGroup
This parameter enables IT/O message generation and defines the IT/O
Message Group name under which messages should be posted.
The parameter appears in the configuration file like this:
#OpcMessageGroup=Job
OpcWaitTime
The OpcWaitTime parameter specifies the number of seconds the Event
Processor will wait for an IT/O status message to be sent to the IT/O
Message Agent. This option only applies to configurations that have
enabled IT/O support via the OpcMessageGroup parameter.
The parameter appears in the configuration file like this:
#OpcWaitTime=4
13
MaxRestartTrys
AutoSys attempts to restart a job if it has problems starting the job due to
system problems, such as machine unavailability, the socket connect
timed out, the Remote Agent was unable to start another process, or the
file system space resource check failed. AutoSys attempts to restart a job
the number of times specified by the MaxRestartTrys parameter.
13-27
Configuring AutoSys
Configuration File Parameters
For example, to set the number of job restarts to 5, include the following
line in the configuration file:
MaxRestartTrys=5
Note This parameter governs retries that result because of system or
network problems. It is different from the n_retrys job definition
attribute, which controls restarts when a job fails due to application
failure (e.g., AutoSys is unable to find a file or a command, or
permissions are not properly set).
13
where:
WaitTime
Is the AutoSys counter tracking the number of times the job has
already tried to start.
13-28
Configuring AutoSys
Configuration File Parameters
RestartFactor
Is the maximum amount of time (in seconds) AutoSys will wait before
it attempts to restart a job.
If the calculated WaitTime is greater than the specified value for
MaxRestartWait, then the resulting WaitTime is set to MaxRestartWait.
For example, the entry in the configuration file might look like this:
RestartConstant=10
RestartFactor=5
MaxRestartWait=300
13
MachineMethod
This parameter specifies the method AutoSys will use to determine the
percentage of CPU cycles available on a real machine belonging to a
virtual machine. This method is used to achieve load balancing. The
possible choices are rstatd and vmstat. If MachineMethod is not specified,
vmstat is the default setting.
For example, to set the method to rstatd, enter this in the configuration
file:
MachineMethod=rstatd
If rstatd is chosen, you must ensure that this daemon is running on all
client machines.
To ensure that the daemon is running, do the following:
Send a SIGHUP signal (kill -1) to reset the running inetd process.
13-29
Configuring AutoSys
Configuration File Parameters
machines.
KILLJOB Signals
13
KillSignals
The KillSignals parameter specifies a comma-separated list of signals to
send to a job whenever the KILLJOB event is sent. If the job is running on
a UNIX machine, the parameter specifies a single or comma-delimited
list of UNIX signals to be sent to the job. If a list of signals is specified,
the signals are sent in the order listed, with five second sleeps between
each call.
If the job to be killed is running on a Windows NT machine, this list is
ignored and the job is simply terminated.
To preserve AutoSys backward compatibility, the entry in the
configuration file is:
KillSignals=2,9
We recommend that you set this parameter to 15,9. In most cases, this
will lead AutoSys to return a TERMINATED state for a job that was killed.
If it does not, as might happen for some shells on some operating
systems, set the KillSignals parameter to 9.
Note The KillSignals listed in the configuration file are overridden
when issuing the sendevent command with the -k option.
13-30
Configuring AutoSys
Configuration File Parameters
13
AutoRemPort
The Event Processor communicates to the Remote Agent by way of a
TCP/IP socket connection, and the port number for this socket
connection is specified by the AutoRemPort parameter. The internet
services daemon (inetd) on the client machine uses the port number to
point to the name of the service (found in /etc/services). The service
name is located in the inetd configuration file (/etc/inetd.conf), where
it finds the pathname to the Remote Agent binary.
It is possible to have different versions of AutoSys installed on the same
hardware, where the versions are not cross compatible between the Event
Processor and the Remote Agent. By setting up multiple services and
using different port numbers, you can maintain multiple versions of the
software.
The AutoRemPort number in the configuration file is set at installation
time. If you alter it, you must change both the AutoRemPort number and
the port numbers in all the /etc/services files on all AutoSys client and
all AutoSys server machines.
This is the entry in the configuration file, with the default setting of 5280:
AutoRemPort=5280
Note If you are using NIS or NIS+, and wish to change AutoRemPort,
you must modify /etc/services on your NIS or NIS+ master and push
it to all client machines, and then do a kill -1 process on the inetd.
13
ZTeamJobSupport
The ZTeamJobSupport parameter specifies whether an AutoSys instance
can dispatch jobs on machines managed by Zeke or Team Agent.
13-31
Configuring AutoSys
Configuration File Parameters
If the value of this parameter is equal to zero, then the Event Processor
will not send jobs to Zeke and Team Agent managed machines. If the
value of this parameter is equal to one, then the Event Processor will send
jobs to these machines.
By default, Zeke and Team Agent job support is off, and the entry in the
configuration file looks like this:
ZTeamJobSupport=0
For more information, see Appendix A, Integrating AutoSys with Zeke and
AutoSys/Team Agent.
13
AutoInstWideAppend
The AutoInstWideAppend parameter specifies whether an AutoSys
instance will overwrite or append information to the standard output
and standard error files.
If the value of this parameter is equal to zero, then the files will be
overwritten. If the value of this parameter is equal to one, then new
information will be appended to the files.
By default, new information is appended to the files, and the entry in the
configuration file looks like this:
AutoInstWideAppend=1
Each client machine can override the instance-wide setting by using the
AutoMachWideAppendvariable in the /etc/auto.profile file. If specified,
this variable would appear as shown in the following example:
#AUTOENV#AUTOMachWideAppend=YES
Note If you are running jobs across platforms, the Event Processor
of the issuing instance controls the default behavior. For NT, the
default is to overwrite this file.
13-32
Configuring AutoSys
Configuration File Parameters
Overwrite file
>>
Append file
13
AutoPems
You can enable AutoSys to send events to the PLATINUM Event Manager
and Data Exchange, assuming you already have the Event Manager and
Data Exchange are properly installed. The Event Manager makes
available, via subscription, the entire range of events and messages
supported by each PLATINUM application. The Event Manager can be
used to automate enterprise communication and integration.
If enabled, AutoSys will send events for every AutoSys job to the Event
Manager. Events include alarms and job status changes (job start, job
running, job complete, and completion status). If you have installed the
PLATINUM ProVision product, you can view these events with the
ProVision output browser.
Enabling Event Management integration also enables integration with
ProVision Data Exchange. This instructs AutoSys to write job definition
and job history information to the ProVision repository.
Refer to your ProVision documentation for information on the Event
Manager, Data Exchage, and the output browser.
The AutoPems parameter specifies if AutoSys should send events to the
ProVision Event Manager and Data Exchange. The entry in the
configuration file looks like this:
#AutoPems=1
13-33
Configuring AutoSys
Configuration File Parameters
1
Sends AutoSys events to the PLATINUM Event Manager. This enables
a user to view AutoSys jobs from the ProVision output browser.
0
Does not send AutoSys events to the ProVision Event Manager.
By default, events are not sent. You must remove the comment character
from the beginning of this line to enable this integration.
13
InetdSleepTime
The InetdSleepTime parameter controls how long the inetd waits
between job starts on the same Remote Agent machine. By default, this is
set to 2 seconds, and there is no parameter located in the configuration
file. To reduce the time the inetd waits between job starts on a machine,
you can add the InetdSleepTime parameter to the configuration file and
lower this number, which is specified in seconds.
To lower the default setting, add an entry like this to the configuration
file:
InetdSleepTime=1
Note Setting InetdSleepTime too low for your hardware could
13-34
Configuring AutoSys
The auto.profile File
13
It specifies default settings for AutoSys jobs that do not have a profile
specified in the job definition. A job profile sets environment
variables for a job immediately before the job is started. This job
attribute is discussed in Chapter 4, Job Attributes.
page 13-32
AUTOSV
AUTOSV_DIR
DENY_USER
13-35
Configuring AutoSys
The auto.profile File
13
The Remote Agent looks for the #AUTOENV# descriptors and reads the
variables that follow to set its environment. Do not remove the
#AUTOENV# descriptors from the file. They are required to enable the
Remote Agent to communicate with the AutoSys database.
13-36
Configuring AutoSys
The auto.profile File
13
Sybase
For Sybase, the descriptor looks like this:
################################################
# auto_remote environment variables
# DO NOT REMOVE
#AUTOENV#SYBASE=/usr/vendors/sadb
13-37
Configuring AutoSys
Modifying Remote Agent Settings
Oracle
For Oracle, the descriptors look like this:
################################################
# auto_remote environment variables
# DO NOT REMOVE
#AUTOENV#TNS_ADMIN=/etc
#AUTOENV#ORACLE_HOME=/var/opt/oracle
13
To function correctly, the Remote Agents must have the correct TCP/IP
socket connections, and they must have the appropriate environment set.
The socket connection and environment values are set at installation
time, but you can modify the settings.
13
configuration file)
/etc/services
13-38
Configuring AutoSys
Modifying Remote Agent Settings
The internet services daemon (inetd) on the client machine uses the port
number defined in the AutoSys configuration file to point to the name of
the auto_remote service found in the /etc/services file. The service
name is then located in the internet daemon configuration file (usually
/etc/inetd.conf), where it finds the path to the Remote Agent binary,
like this:
auto_remote stream tcp nowait root \
/usr/vendor/autotree/auto_remote auto_remote
13
If you want to install two different versions of the AutoSys Remote Agent
on the same hardware, it is possible to set up multiple services by using
different port numbers and service names. Each version would point to
its own configuration file.
For example, assume you have one 3.3 Remote Agent using port number
3500. The entry in its AutoSys configuration file (e.g., config.PRD) would
look like this:
AutoRemPort=3500
On the same machine, you could have a 3.4 Remote Agent using port
number 4500. The entry in its AutoSys configuration file (e.g.,
config.DEV) would look like this:
AutoRemPort=4500
13-39
Configuring AutoSys
Configuring Remote Authentication
If you do this, you must also modify the /etc/services file like this:
auto_remote_333500/tcp # AutoSys Version 3.3
auto_remote_344500/tcp # AutoSys Version 3.4
13
You can configure AutoSys to run using the following two methods of
remote authentication:
Unix ruserok() Authentication
When using this method, AutoSys instructs a clients Remote Agent to
make the UNIX system ruserok() call. This function checks the client
machines /etc/hosts.equiv and the users .rhosts files to validate
that the requesting user is registered in that environment.
AutoSys Remote Agent Event Processor Authentication
When using this method, a specific Remote Agent can be bound to
one or more Event Processors. In other words, a Remote Agent will
have to verify its permission to process an Event Processors requests
before starting each job. The Remote Agent does this by reading the
/etc/.autostuff file on the machine where it is running.
Using the autosys_secure command, the AutoSys Edit Superuser can
enable (or disable) remote authentication. By default, remote
authentication is initially disabled. If you enable Remote Agent Event
Processor Authentication, you must configure AutoSys to support it.
13-40
Configuring AutoSys
Configuring Remote Authentication
13
You can configure Remote Agents to only accept jobs from trusted
Event Processors. To configure AutoSys for Remote Agent Event Processor
Authentication, you must do the following:
If both are present, the Remote Agent will only run jobs submitted by
Event Processors listed in the autostuff file.
where:
AUTOSERV
hostname
The file
#Production Instance
#Development Instance
13-41
Configuring AutoSys
Client-Side Security
In this example, PRD is an AutoSys instance name and the Event Processor
for this instance is running on the machine curly. DEV is an AutoSys
instance name and the Event Processor for this instance is running on the
machine moe. These Event Processors are authorized to issue jobs to the
Remote Agent.
Client-Side Security
13
In this example, jobs owned by root, daemon, and admin will not be
launched by the Remote Agent.
If a job owned by one of these users is submitted to run on the Remote
Agent, the job fails as if the job's owner did not have a valid account on
the machine. There will be no job restart attempts, regardless of
MaxRestartTrys setting in the AutoSys configuration file. When this
occurs, the following error appears in the Event Processor log, as a
STARTJOBFAIL alarm on the job:
Permission ERROR: Could not SET uid=<uid> on Host: <host>
13-42
Configuring AutoSys
Configuring ServerVision Monitoring and Reporting
13
You can use the ServerVision GUIs to monitor the realtime resource
usage of an AutoSys job. This integration allows you to view AutoSys jobs
by their job name in the ServerVision GUIs. In addition, AutoSys can
archive a jobs resource usage to generate reports useful for capacity
planning and UNIX process auditing. This section describes the
configuration tasks necessary to enable this integration.
Library Path
13
svload Requirements
13
environment for the AutoSys Event Processor. This must be set to the
directory that contains the ServerVision instances file.
2 The ServerVision instances file must contain entries for all machines
that you will use with the svload executable. For example, to use a
machine named mack, the instances file must contain the
following entry:
[mack]
type=unix
node=mack
3 The ServerVision uvroot environment variable must be set as required
by ServerVision.
4 The ServerVision xuv_net_svc binary must be in your path.
13-43
Configuring AutoSys
Configuring ServerVision Monitoring and Reporting
13
ServerVision. This must be a full path name and it must be the same path
that you specify in your ServerVision instance configuration file.
ServerVision Configurations
13
ServerVision documentation.
13-44
Configuring AutoSys
Configuring ServerVision Monitoring and Reporting
The directory specified with the -d argument must match the directory
you specify with the AUTOSV_DIR variable in the AutoSys
/etc/auto.profile file.
3 Restart the ServerVision instance. From the XUV GUI, select Control
4 Ensure the app_group scan types are on. From the XUV GUI, select
13
CPU utilization
I/O reads
I/O writes
One file is created for each job run. These files are stored in the directory
specified by the AutoRemoteDir parameter in the AutoSys configuration
file. You must run the svarchive utility to process these files and place
the information in the svarchive database table. After the process is
complete, the svarchive utility deletes the files.
13-45
Configuring AutoSys
User-Defined Alarm Callbacks
Note You may want to create an AutoSys job to run the svarchive
13
13-46
DB_ROLLOVER
DB_PROBLEM
EP_ROLLOVER
EP_SHUTDOWN
EP_HIGH_AVAIL
Configuring AutoSys
User-Defined Alarm Callbacks
$2 = Text Message
Notification Example
To have AutoSys call the program /usr/local/bin/pager when the Event
Processor shuts down
1 Copy the sample notification file to:
$AUTOUSER/notify.$AUTOSERV
13-47
Configuring AutoSys
User-Defined Alarm Callbacks
Then, AutoSys will pass pager a numeric code and a text message. The
pager itself must be coded to accept these parameters.
13-48
14
Troubleshooting
Problems with AutoSys usually involve the interactions between the
major AutoSys components, rather than with the individual components
themselves. This chapter presents a number of common AutoSys
problems, their symptoms, and how to resolve them. It provides very
useful information about troubleshooting the primary AutoSys
components.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Event Server Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Event Server is Down (Sybase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
Sybase Deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-6
Not Enough User Connections (Bundled Sybase) . . . . . . . . . . . . . . . . . . . . . . 14-7
archive_events Fails (Bundled Sybase) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-9
Event Server Will Not Start (Bundled Sybase) . . . . . . . . . . . . . . . . . . . . . . . . . 14-11
Event Processor Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-11
Event Processor is Down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
Event Processor Will Not Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-12
Remote Agent Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14-13
Remote Agent Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-13
Remote Agent Will Not Start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-14
14-1
Troubleshooting
14-2
Troubleshooting
Introduction
Introduction
14
When its starting conditions are met, the Event Processor initiates a
Remote Agent on the client machine to execute the job.
The Remote Agent runs the job and sends the exit status of the job
back to the Event Server.
After the job completes, it is not run again until its starting conditions
are met.
14
14
Symptoms
1 When trying to start xql, you get a message like this:
DB-Library error: dbproc NULL
Error in SybInit: dbopen failed
14-3
Troubleshooting
Event Server Troubleshooting
like this:
Client ERROR:
Or
Unable to connect: SQL Server is unavailable or does not exist.
3 When you run chk_auto_up, you receive a message similar to this:
Couldnt connect with Server: AUTOSYSDB:autosys
4 You are unable to insert keys with gatekeeper.
Resolution
This indicates that either the dataserver is down, or the process in
question is unable to access it. To confirm that the dataserver is down, log
onto the server machine and run the chk_auto_up utility. You can also
look at the process table (using the UNIX ps command) for the process
name dataserver.
If the database is indeed down, you must restart it. For directions on how
to do this, see Starting Sybase in Chapter 12, Maintaining AutoSys.
If the database is running, the problem could be that you are pointing to
the wrong dataserver. The DSQUERY environment variable points to the
name of the dataserver (typically AUTOSYSDB). If it is not set properly and
you are not specifying a dataserver name to xql (using the -S server
option), then xql will fail.
The AutoSys environment variables point to the configuration file
$AUTOUSER/config.$AUTOSERV. This file contains the name of the Event
Server. Check to make sure that the environment variables and the
configuration file point to the proper location and Event Server.
Enter the following command for the instance ID:
echo $AUTOSERV
14-4
Troubleshooting
Event Server Troubleshooting
Enter the following command for the Event Server and database name:
get_server $AUTOSERV
Where:
E
Is the name of the database (for Sybase and Microsoft SQL Server).
If the database service is up, and the environment variable is set properly,
then the Sybase interfaces file might not have the proper form, or be in
the proper location. This typically occurs on servers if the environment
has been changed, or, on clients, if the interfaces file has not been
correctly installed.
For more information about the Sybase interfaces file and connecting
to databases, see Chapter 1, Introduction to AutoSys, in the AutoSys
Installation and Getting Started Guide for UNIX.
14-5
Troubleshooting
Event Server Troubleshooting
Sybase Deadlock
14
Symptom
A message similar to the following appears in the Event Processor log
when viewed with the autosyslog -e command or in the Sybase error log
($SYBASE/install/errorlog_EventServer):
Your server command (process id #11) was deadlocked with another
process and has been chosen as deadlock victim. Re-run your
command.
Resolution
A deadlock is a Sybase condition that occurs when two users have a lock
on separate objects, and they each want to acquire an additional lock on
the other users object. The first user is waiting for the second user to let
go of the lock, but the second user will not let go until the lock on the
first users object is freed.
The dataserver detects the situation and chooses the user whose process
has accumulated the least amount of CPU time as the victim. The
dataserver rolls back the victims transaction, notifies the application
with the above error message, and allows the other users processes to
move forward.
sendevent will try to rerun the command until it is successful or until it
reaches the maximum number of tries specified by the -M option.
14-6
Troubleshooting
Event Server Troubleshooting
14
Symptoms
Users cannot make connections to the database; they cannot start the
GUI or send events. When you check the Sybase error log ($SYBASE/
install/errorlog_EventServer) you see one or both of the following
errors:
Not enough User Connections (Sybase error 1601)
No Pss structures available for new process
Resolution
These messages occur because there are more users who want to run jobs
simultaneously than there are user connections; there are not enough
connections available to the database. By default, the bundled Sybase
installation of AutoSys has a limit of 25 user connections. You can
increase the number of user connections, but first you must determine
the maximum number of user connections your system can support.
To determine the maximum number of user connections you can set
for your system
1 Log into the database as the sa.
2 At the isql or xql prompt, enter:
1> select @@max_connections;
14-7
Troubleshooting
Event Server Troubleshooting
3 Enter:
1> select count(*) from master..sysdevices where cntrltype = 0;
14-8
Troubleshooting
Event Server Troubleshooting
14
Symptom
When the transaction log is full, archive_events fails. This usually occurs
because archive_events is not run regularly. We highly recommend that
you run archive_events frequently, ideally as part of the daily database
maintenance cycle by using DBMaint or as a regularly scheduled job.
You can usually avoid a full transaction log by having Sybase truncate the
transaction log during regular checkpoints.
To have Sybase truncate the transaction log
1 Log into the database server as the sa by entering the following
command (if you changed the sa password, use that one instead of
sysadmin):
xql -Usa -Psysadmin
2 To check if the truncate option is set, enter the following commands:
1> sp_helpdb;
14-9
Troubleshooting
Event Server Troubleshooting
Resolution
To resolve the full transaction log problem
1 Log into the database server as the sa by entering the following
command (if you changed the sa password, use that one instead of
sysadmin):
xql -Usa -Psysadmin
2 Use the autosys database by entering the following command:
1> use autosys;
3 Dump the transaction log by entering the following command:
1> dump transaction autosys with no_log;
4 If this fails, enter the following commands:
1> set rowcount 1;
1> dump transaction autosys with no_log;
14-10
Troubleshooting
Event Processor Troubleshooting
5 Log out of the dataserver, and then run archive_events. Begin with a
large number of days and work down until you reach your target
number of days. For example:
archive_events -n 30
archive_events -n 10
14
Symptom
When starting a bundled Sybase Event Server, you get a message similar
to the following:
00: 94/08/18 10:38:37:66 kernel: kcinit:
couldnt open error log
/users/sybase/stdb/install/errorlog_AUTOSYSDB
(os error 13)
Resolution
You are not the same user who last started Sybase, and do not have
permission to write to the Sybase error log file. Become that user, change
the error log file ($SYBASE/install/errorlog_$DSQUERY) permissions, or
delete the old error log file.
14
Output from the Event Processor is redirected into the following log file:
$AUTOUSER/out/event_demon.$AUTOSERV
Everything that the Event Processor does, in the order it was done, is in
this file. Network problems are usually reflected in this file as well. This
file is very useful for reconstructing what happened when a problem
occurs.
14-11
Troubleshooting
Event Processor Troubleshooting
14
Symptoms
1 Jobs do not start.
2 When chk_auto_up is run, it returns a message similar to this:
Could connect with Server: AUTOSYSDB:autosys
No Event Processor is RUNNING on machine: machine
3 The Event Processor log has not registered a date and time stamp for
a period of time. The Event Processor log should register date and time
stamps every minute.
Resolution
Confirm that the Event Processor is down by performing one of the
following actions:
Perform a tail on the log file and check for date stamps.
If the Event Processor is indeed down, log on as the Exec Superuser and
run the eventor command to restart it.
14
Symptom
When running the eventor command, you see an error message similar
to the following:
/usr/autotree/autosys/bin/eventor:/usr/autotree/autouser/out/eve
nt_demon.ACE:Cannot create
14-12
Troubleshooting
Remote Agent Troubleshooting
Resolution
You are not the same user who last started the Event Processor. Ether
become that user, or change permissions on the Event Processor output
file, the $AUTOUSER/out/event_demon.$AUTOSERV file.
14
14
If you suspect problems with the Remote Agent, you can use autoping to
verify your suspicions.
autoping
autoping is used to test the connections between the Event Processor and
the Remote Agent. If you use the autoping -M -D client_hostname
command, and it does not return an error, the Remote Agent should start
properly.
The Remote Agent writes RUNNING and completion statuses directly to
the Event Server.
Database Verification
Use autoping to verify the Remote Agent database connection. To check
the database connections on machine, enter this:
autoping -m machine -D
Instead of a single machine, you can type -m ALL to check all machines.
14-13
Troubleshooting
Remote Agent Troubleshooting
14
The symptoms in this section are similar and result from network
problems.
Symptom
The Event Processors $AUTOUSER/out/event_demon.$AUTOSERV log file
contains a message similar to this:
Attempting to connect to AutoSys Remote Agent
Service on socket=5280: Connection Refused
Attempting to connect to inetd on
socket=5280: Interrupted system call
The connection to machine: spartacus TIMED OUT.
Either that machine, or the network to it, is
having problems.
ERROR trying to start job: test
Error: Connect to socket FAILED.
Command: sleep 1
Machine: spartacus
Resolution
Either there is a network communication problem, or the client machine
is down. The network or machine problems must be resolved before jobs
can be run on that machine.
14-14
Troubleshooting
Remote Agent Troubleshooting
Symptom
The Event Processors $AUTOUSER/out/event_demon.$AUTOSERV log file
contains a message similar to this:
Attempting to connect to AutoSys Remote Agent
Service on socket=5280: Connection Refused
Attempting to connect to inetd on
socket=5280: Interrupted system call
Could NOT connect to machine: spartacus The
internet daemon may not be configured properly.
ERROR trying to start job: test
Error: Connect to socket FAILED.
Command: sleep 1
Machine: spartacus
Resolution
There is a problem with the /etc/services file. To locate this problem,
check the following:
1 Check the /etc/services file to see if the following entry is there:
auto_remote 5280/tcp
2 Confirm that the Remote Agent port number, specified with
AutoRemPort in the AutoSys configuration file
($AUTOUSER/config.$AUTOSERV), is the same number as used in the
/etc/services file.
3 If you are using NIS/NIS+, remake the services and push it out.
14-15
Troubleshooting
Remote Agent Troubleshooting
Symptom
In the Event Processors $AUTOUSER/out/event_demon.$AUTOSERV log file,
you see a message similar to the following:
[spartacus connected]
*** Remote Agent Process not started. ***
socket read <>, rc=0
ERROR trying to start job: test
Error: Auto Remote process did not start.
Command: sleep 1
Machine: spartacus
Resolution
Check that the internet daemon is properly configured on the client
(Remote Agent) machine. There should be an entry in inetd.conf for
auto_remote. If present, this line points to the Remote Agents executable.
Assuming that auto_remote is in the /usr/local/bin directory, and will
be run by the user root, the entry should look like this (on one line):
auto_remote stream tcp nowait root/usr/local/bin/auto_remote auto_remote
14-16
Troubleshooting
Remote Agent Troubleshooting
where:
pid
14
where:
AutoRemoteDir
14-17
Troubleshooting
Remote Agent Troubleshooting
auto_rem.pid
where:
joid
14-18
Troubleshooting
Remote Agent Troubleshooting
For more information about the AutoSys configuration file and the
CleanTmpFiles parameter, see the Configuration File Parameters section of
Chapter 13, Configuring AutoSys.
Symptoms
1 The job is stuck in either the STARTING or RUNNING state as seen in
either the Event Processor log or the output resulting from issuing the
following command:
autorep -J job_name
2 The job has immediately returned as a FAILURE.
Resolution
If you have gotten to this point, the AutoRemoteDir/auto_rem* file should
be present. By looking in this file, you will see how far AutoSys was able
to get. You should check and verify the following items:
1 The correct file is being sourced before running the job command. The
default file is /etc/auto.profile. A job-specific file may be sourced
machine.
4 The permissions are correct on the job command to be executed.
5 The permissions are correct on any standard input/output files
work.
14-19
Troubleshooting
Remote Agent Troubleshooting
14
Symptoms
1 Job is stuck in STARTING state.
2 This problem is detected either in the Event Processor window (or log)
or in the results of running the autorep command on the job, when
the following event appears, then nothing else, yet the job does run to
completion on the client machine:
CHANGE_STATUS Status: STARTING Job: test_install
Resolution
This is a common problem and is nearly always the result of the Remote
Agent being unable to contact the Event Server. First of all, ensure that
network problems are not preventing communication between the
Remote Agent and the Event Server machines. If this is not the problem,
then check the following database-specific solutions.
With Sybase, this problem usually occurs because the interfaces file is not
set up properly on the machine running the Remote Agent. With Oracle,
this problem usually occurs because the SQL*Net V2 connections are not
set up properly.
The Remote Agent must be able to connect to the Event Server in order to
send the RUNNING, SUCCESS, FAILURE, or TERMINATED status events.
14-20
Troubleshooting
Remote Agent Troubleshooting
the
/etc/auto.profile, which looks like this:
#AUTOENV#SYBASE=/usr/home/sybase
2 Check that the Sybase interfaces file has an entry for the dataserver
spaces or tabs.
Each entry line has a single preceding tab.
14-21
Troubleshooting
Remote Agent Troubleshooting
readable, and contains the correct information for the Event Server. By
default, the TNS names file is in one of the following locations:
On most systems, it is in /etc/tnsnames.ora
On some System V systems (e.g., Solaris), it is in
/var/opt/oracle/tnsnames.ora, or in /var/opt/tnsnames.ora
14-22
Troubleshooting
Remote Agent Troubleshooting
For Sybase, try to log onto the Event Server from the remote machine
using xql, like this:
xql -U autosys -P autosys -S AUTOSYSDB
When testing Oracle using sqlplus, be sure that your user environment
is looking at the same tnsnames.ora file as the auto_remote (Remote
Agent). Set TNS_ADMIN to the same value that is in /etc/auto.profile.
Note that the auto_remote only attempts to read the tnsnames.ora file
once. After a bad tnsnames.ora file has been read, correcting it will not
allow a running auto_remote to connect. After you correct the
tnsnames.ora file, you will have to kill the auto_remote and restart the
job.
For Oracle, try to log onto the Event Server from the remote machine
using sqlplus with a V2 connect descriptor, like this:
sqlplus autosys/autosys@AUTOSYSDB
14
Symptom
From the remote machine, xql returns the following message:
DB-Library error: dbproc NULL
Error in SybInit: dbopen failed
Resolution
Check the following:
1 Determine if the dataserver is started and running, and start it if it is
not running.
14-23
Troubleshooting
Remote Agent Troubleshooting
Run xql with the -S and -D options to specify the correct dataserver
and database.
3 If a fully qualified xql statement still fails, then it is a problem with
the interfaces file. For more information about dealing with this file,
see the Resolution section of Remote Agent Starts, Command RunsNo
RUNNING Event is Sent on page 14-20.
14
Symptom
When trying to start a job or trying to start the Event Processor with a
Shadow Event Processor, the following message appears in the Event
Processor log when viewed with the autosyslog -e command:
Unknown Host Machine
Resolution
You may receive this message in the following situations:
1 There is a network problem and a connection cannot be made to the
14-24
Troubleshooting
Remote Agent Troubleshooting
14
If you receive failed to connect to socket errors during a job run, the
job runs more than once. This is the expected behavior of AutoSys when
this error occurs as explained by this scenario:
1 The server opens a connection to the client to run the job.
2 The Remote Agent on the client starts the job, and then tries to
second time.
6 The Remote Agent starts the job and responds to the server in time.
7 The job runs a second time.
Severe performance problems on the client are the main reason this
occurs. For example, the following might affect performance:
Running a full system backup on the client at the same time jobs are
starting might slow down the system so that it cannot respond to the
server.
14-25
Troubleshooting
Job Failure Troubleshooting
Are there too many processes running on the client when you run
jobs?
14
14
Symptom
Jobs run from the command line, but they fail when run by AutoSys.
Resolution
This problem is nearly always the shell environment where the job runs.
The following are the possible reasons for the problem:
1 The profile in the job definition is not a Bourne shell (sh) type profile.
for the job to run. The default profile for all AutoSys jobs is
/etc/auto.profile, not the job owners logon profile
$HOME/.profile. If the job owners profile is not specified in the job
definition, it is never sourced.
To check the difference between the job definition and the user
environment, do the following:
14-26
Troubleshooting
Job Failure Troubleshooting
of the job on the machine where the job will run and enter the
following command:
env >user.env
4 Write the Remote Agent environment to a file by entering the
where:
client_hostname
command:
sendevent -E STARTJOB -J auto_env
6 Check the two files for differences by entering the following
command:
diff /tmp/auto.env user.env
This shows you where the AutoSys environment and the user
environment differ. Make the necessary changes in the job definition
and the user profile.
Also, it is useful to define the std_err_file for the job that fails,
because you can check the errors from the shell for a clue about what
is missing.
14-27
Troubleshooting
Job Failure Troubleshooting
14-28
A
Integrating AutoSys with
Zeke and
AutoSys/Team Agent
This appendix describes how to integrate AutoSys with Zeke and
AutoSys/Team Agent components for an advanced AutoSys
configuration.
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Definition of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3
Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-4
Job Scheduling for the Enterprise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
Installing and Configuring for Enterprise Job Scheduling . . . . . . . . . . . . . . . . . A-6
Install the Basic AutoSys Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-6
Stop the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Configure the AutoSys Machine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-7
Initializing the Communication Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-13
License Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-14
Restart the Event Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-15
A-1
A-2
Introduction
Definition of Terms
Zeke
Team Agent
A-3
Cross-instance
job dependency
Cross-platform
job dependency
Related Documentation
A-4
PLATINUM AutoSys with Zeke and Team Agent let you schedule or
reroute jobs from multiple sources throughout the enterprise. To
accomplish this, the following elements must be present on the AutoSys
machine:
oasis_broker
communication
components
The next section explains how to install and configure these components.
To learn how to implement enterprise job scheduling, see AutoSys and
Zeke Cross-Platform Dependencies on page A-16 and Running AutoSys Jobs
on the Team Agent on page A-20.
A-5
Before you can install and configure the components that must be
present to implement enterprise job scheduling, you must have installed
the Zeke and Team Agent components as instructed by your Zeke and
Team Agent installation documentation, and the AutoSys software as
instructed in the AutoSys Installation and Getting Started Guide for UNIX.
The required software and version levels are listed in the following table:
AutoSys
Zeke
Team Agent
ACF/VTAM level
V3R4M0
TCP/IP
AutoSys/Team
Agent version 1.2
Note AutoSys does not support Zeke or Team Agent licensing and
security, or the Team Agent GUIs, as implemented in Team Agent
version 1.2.
A-6
NETREGID
defprotocol:
tcp
network:
na
node:
na
ipoasislog:
AUTOSYS/log/ipoasis.log
allowsujobs:
no
autosys_communications:AutoSys-OASIS.INS
where:
NETREGID (also called data group name)
A-7
AUTOSYS
Alternatively, you can set ZTEAMDIR from the command line at the time
you want to run Team Agent jobs or exchange job dependencies between
AutoSys and Zeke. Also, you can set this variable when you execute the
eventor command by using the -Z $ZTEAMDIR argument.
Note If you are using an existing installation of Team Agent for
UNIX, set the ZTEAMDIR environment variable to the value set during
the Team Agent installation. For example:
setenv ZTEAMDIR /usr/zteam
A-8
where:
INS
Is a constant.
OASIShost
A-9
entries.
ZTEAMDIR environment
variable is defined.
Zeke instance(s) are defined in the config.EXTERNAL file (if you want
to communicate with Zeke).
If you want to disable both Team Agent and Zeke communication, you
must do the following:
A-10
zappls
zping
ztrace
zglobals
zclients
Note If you prefer to use the Altai Development Lab supplied Team
Agent commands instead of those provided with this AutoSys release,
you should install them in an appropriate location other than the
AutoSys installation directories. However, we recommend that you
install the AutoSys provided communication components to ensure
proper communication between AutoSys and Zeke and Team Agent.
Refer to the PLATINUM AutoSys/Team Agent for UNIX Reference Guide for
details on the usage of these commands.
If you are using an existing installation of Team Agent for UNIX (from the
Altai Development Lab), you do not need to perform the following
configuration stepsthis will already be done. Otherwise, you must
configure the communication components as described in the following
steps.
To configure the communication components
1 Add entries to the /etc/services file following the example below:
zteamclnt
7701/tcp
zclnt
zteamsrvr
7702/tcp
zsrvr
oasisbroker
7998/tcp
oasibrkr
A-11
single entry:
zteamsrvr stream tcp nowait root /usr/autosys/bin/ipoasis \
ipoasis -z /usr/autosys
This assumes that /usr/autosys is the full path defined for both the
$ZTEAMDIR and the $AUTOSYS environment variables.
3 To force the internet services daemon (inetd) to read in the changes
to the configuration file, determine the process ID of the inetd and
A-12
restore the local Team Agent product to the local system, execute the
following command:
$AUTOSYS/bin/zappls -i
2 Register the adjacent Team Agent or Zeke by executing the following
command:
$AUTOSYS/bin/zping -p tcp -t ADDRESS
A-13
License Keys
AutoSys client license keys are required for Team Agent machines in
order for AutoSys to run jobs on those machines.
The client license key is tied to a specific machine. It is generated by the
Customer Service department at the AutoSystems Development Lab
based on the host name and host id of the client machine.
For Team Agent machines, the host name is the NETREGID and the host id
is always 0 (zero).
When you supply the above information to the Customer Service
department, they will provide you with a client key. You install the client
key in the AutoSys database using the gatekeeper command, as shown in
the following example:
gatekeeper <Return>
Utility to Add/Delete or Print KEYs.
Add (A) or Delete (D) or Print (P) ? a
KEY Type: [(c)lient, (s)erver, (t)ime, (x)pert]: c
Hostname: NETREGID
Hostid: 0
KEY: IIJJKKLLMMNNOOPP
***** New Key ADDED! *****
KEY Type: [(c)lient, (s)erver, (t)ime, (x)pert]:<Return>
A-14
Now you can start the Event Processor using the eventor command.
You can also use the Send Event dialog to change the status of a job. This
dialog is accessed from the AutoSys Operator Console.
A-15
Event
Server
MVS
NETREGID: MVSZEKE
Communication
Components *
O
A
Z
E
Event
Processor
Job
S
oasis_broker
Team Agent
(Remote)
A-16
AutoSys jobs can be dependent on the status of Zeke jobs and Zeke jobs
can be dependent on the status of AutoSys jobs. For details on how to
implement this with the Zeke job scheduler, refer to your Zeke
documentation.
For AutoSys jobs, this type of cross-platform dependency is described
below.
To create job scheduler interdependencies
1 AutoSys sends a request to the oasis_broker for the status of a Zeke
request.
4 The job runs as scheduled by the Zeke job scheduler. Zeke can run the
A-17
6 The MVS OASIS sends the status of the job to the communication
From the AutoSys GUIs, you enter this information in the Starting
Condition field of the Job Definition screen. You can use the following
statuses in the condition attribute of an AutoSys job definition
dependent on a Zeke job:
A-18
success
terminated
done
notrunning
Note These limitations do not apply to all AutoSys jobs, only to jobs
A-19
AutoSys can directly schedule jobs on a machine that is running the Team
Agent, assuming the machine running the Team Agent has been defined
to AutoSys. In the following example configuration, the Team Agent is
running on an AS/400 machine. The AutoSys and Team Agent
integration is supported on other operating platforms as well.
AutoSys UNIX or NT
NETREGID: MYMACHIN
Instance: ACE
AS/400
NETREGID = ZASYS400
Communication
Components *
Event
Server
Event
Processor
oasis_broker
T
E
A
M
A
G
E
N
T
Job
A-20
The process by which AutoSys can run jobs directly on a Team Agent
managed machine is described below.
To run jobs on Team Agent managed machine
1 The Event Processor sends the job information to the oasis_broker
RUNNING status.
6 When the job exits, the Team Agent client traps the return code and
status of either SUCCESS (if the job exited with a normal end of job
code, EOJ) or TERMINATED (if the job exited with an abnormal end
of job code, AEOJ).
A-21
Before you can run AutoSys jobs on a Team Agent machine, you must
first define the Team Agent machine to AutoSys using the insert_machine
sub-command. This command adds a new machine definition to the
AutoSys database. It is described in detail in Chapter 9, Load Balancing and
Queuing Jobs. This section pertains specifically to defining a Team Agent
machine.
To define a Team Agent machine, follow this example:
insert_machine: NETREGID
type: z
where:
NETREGID
A-22
Once you have defined a Team Agent machine to AutoSys and that
machine is recorded in the Application Registry Table, you can specify
that machine in an AutoSys job definition, using the machine job
attribute. For example:
insert_job: TEAMJOB
owner: bob@sahara
machine: ZASYS400
command: echo test
The owner identified in the owner attribute of the job definition must
have an account on the target Team Agent machine. The account must
match the owner name exactly in order for the job to run. If the owner is
specified as user@machine), everything after the @ is ignored. (If
necessary, the AutoSys Edit Superuser can change the owner of a job.)
Database Tables
A-23
The valid statuses that AutoSys can get for Zeke and Team Agent managed
jobs are:
STARTING
The job has been passed from the Event Processor to the
oasis_broker.
RUNNING
The job has started and a BOJ (Beginning Of Job) event has been sent
back to the oasis_broker.
SUCCESS
The job has ended and an EOJ (End Of Job) event has been passed
back to the oasis_broker.
TERMINATED
The job has ended and an AEOJ (Abnormal End Of Job) event has
been sent back to the oasis_broker.
Any Zeke or Team Agent managed job without a return code of zero will
be considered TERMINATED.
The following AutoSys attributes are not supported for Zeke or Team
Agent managed jobs. If specified, they will be ignored. The jil attribute
is listed on the left and the corresponding GUI field is shown on the right.
A-24
chk_files
heartbeat_interval
job_load
Job Load
job_terminator
job_type:f
max_exit_success
n_retrys
priority
Que Priority
profile
std_err_file
std_in_file
std_out_file
term_run_time
watch_file
watch_file_min_size
watch_interval
A-25
Cross-Platform Limitations
A-26
Index
Symbols
$AUTORUN 3-30
$AUTOSYS/bin/chk_auto_up 12-32
$AUTOSYS/code/heartbeat.c 4-24
$AUTOSYS/code/heartbeat.sh 4-24
$AUTOSYS/dbobj/create_table 12-32
$AUTOTESTMODE 12-11
$AUTOUSER/autosys.env 12-30
$AUTOUSER/config.$AUTOSERV 13-3
$SYBASE 12-30
$SYBASE/install/RUN_AUTOSYSDB
12-30
/bin/date command 12-11
/etc/.autostuff file 13-40, 13-41
/etc/auto.profile file. See auto.profile file
/etc/services file, Remote Agent port
number 13-39
/tmp/autotest.$JobName 12-11
A
ACTIVATED status 3-10
advanced configuration 13-1 to 13-26
after_time report attribute 11-10
Index-1
Index
Index-2
job_name 4-5
job_terminator 4-15
machine 4-8, 4-9
max_exit_success 4-23
max_run_alarm 4-14
min_run_alarm 4-14
n_retrys 4-16
optional
Box Jobs 4-26
Command Jobs 4-19
File Watcher Jobs 4-25
non-starting parameters 4-13
starting parameters 4-10
override_job 4-22
permission 4-17
priority 4-22, 9-5
run_calendar 4-10
run_window 4-11
start_mins 4-12
start_times 4-11
std_err_file 4-21
std_in_file 4-20
std_out_file 4-20
term_run_time 4-14
timezone 4-16
watch_file 4-9
watch_file_min_size 4-25
watch_interval 4-25
job dependencies 3-18
machine
factor attribute 9-6
max_load 9-5
monitor
alarm_verif 11-11
sound 11-11
Index
monitor/report
alarm 11-8
all_events 11-8
all_status 11-9
essential 11-7
job_filter 11-9
mode 11-7
name 11-7
report
after_time 11-10
currun 11-10
starting conditions 3-18
authentication, remote 13-40
auto.profile file
AutoMachWideAppend variable 13-32
AUTOSV variable 13-44
AUTOSV_DIR variable 13-44
DENY_ACCESS 13-42
Remote Agent settings 13-35
remoteProFiles 13-19
auto_delete 4-17
auto_hold 4-17
auto_remote. See Remote Agent
autocal 8-5
autocons 10-7
autohold job attribute 4-17
AutoInstWideAppend 13-32
AutoMachWideAppend variable 13-32
AutoPems 13-33
autoping 14-13
AutoRemoteDir 13-18
AutoRemPort 13-31, 13-39
autosc 11-5
AUTOSERV environment variable 13-3
autostuff file 13-40, 13-41
AUTOSV environment variable 13-44
B
backups
bundled Sybase 12-34
calendar definitions 12-13
global variables (using autorep) 12-15
job definitions (using autorep) 12-14
machine definitions (using autorep)
12-14
monitor and browser definitions (using
monbro) 12-14
batch files and exit codes 3-26
Box Jobs 3-6, 5-1
basic job definition 3-9
default behavior 5-3
diagram 3-14
examples 5-10
force starting jobs in a box 5-8
guidelines 5-4
non-default terminators 5-6
Index-3
Index
placing job in
GUI 6-18
JIL 7-10
starting conditions 3-6, 3-16
status changes 5-9
box_failure 4-27
box_name 4-13
box_success 4-26
box_terminator 4-15
browsers
backing up definitions 12-14
defined 11-3
restoring definitions from backup file
12-16
C
Calendar Selection dialog 8-16
calendars 8-1 to 8-35
applying rules 8-8
backing up definitions 12-13
blocked dates 8-11
blocking dates 8-18
Calendar Definition window 8-6
clearing 8-8
color key 8-14
combining 8-27
conflicting dates 8-12, 8-14
creating, example 8-14
custom 3-17
customizing Calendar Facility 8-30
date range 8-10, 8-19
date states 8-11
deleting 8-7
Edit menu 8-8
exiting 8-8
exporting 8-8, 8-28, 8-30
exporting definitions to file 12-13
Index-4
Index
components
Event Processor 1-6
Event Server 1-5
Remote Agent 1-7
condition job attribute 4-12
conditions, starting 3-18
configuration file 13-4
AutoInstWideAppend 13-32
AutoPems 13-33
AutoRemoteDir 13-18
AutoRemPort 13-31
Check_Heartbeat 13-17
CleanTmpFiles 13-18
DBEventReconnect 13-12
DBLibWaitTime 13-10
DBMaintCmd 13-16
EDErrTimeInt 13-13
EDMachines 13-13
EDNumErrors 13-13
EvtTransferWaitTime 13-17
FileSystemThreshold 13-15
InetdSleepTime 13-34
KillSignals 13-30
MachineMethod 13-29
MaxRestartTrys 13-27
MaxRestartWait 13-28
OpcMessageGroup 13-27
OpcWaitTime 13-27
RemoteProFiles 13-19
RestartConstant 13-28
RestartFactor 13-28
sample 13-4
SnmpCommunity 13-22
SnmpManagerHosts 13-21
ThirdMachine 13-14
WaitTime 13-28
XInstanceDBDropTime 13-11
ZTeamJobSupport 13-31
configuration, AutoSys 13-1 to 13-26
Control Panel, GUI 6-3
conventions, typographical xxix
cpu, using available cycles to select
machine to run on 9-12
crash recovery, database 12-23, 12-41
cross-instance, database connection 13-11
Currently Selected Job region 10-11
currun report attribute 11-10
custom calendars, overview 3-17
customizing
Calendar Facility 8-30
Job Definition 6-30
Operator Console 10-37, 11-22
D
data exchange (ProVision) 13-33
database
accessing interactively 12-32
administration 12-28
architecture 12-18
backup, bundled Sybase 12-34
changing the sa password 12-29
checking if up 12-31
connection to Job Definition GUI timeout interval 6-31
connection to Monitor/Browser GUI
time-out interval 11-22
connections 13-11
crash recovery 12-23
defined 12-16
defining which to use 12-18
dumping 12-34
identifying connected processes 12-33
maintenance 13-15
maintenance script 13-16
Index-5
Index
database (contd.)
maintenance time 12-20
passwords 2-10
recovery 12-22, 12-41
reloading 12-43
rollover 12-22
shutdown 12-31
starting 12-30
stopping 12-31
stopping service 12-31
storage requirements 12-17
time-out period 13-10
unrecoverable error 12-22
verifying connection 14-13
dataserver, defined 1-5
date dependency 3-17
date range in calendars 8-10, 8-19
date/time job dependencies 3-17
Date/Time Options dialog, example 6-7
date_conditions 4-10
days to run job, setting
GUI 6-22
JIL 7-12
days_of_week 4-10
DB Library 12-27
DB_PROBLEM 13-46
DB_ROLLOVER 13-46
DBDropTime
Job Definition GUI 6-31
Monitor/Browser GUI 11-23
DBEventReconnect 13-12
DBLibWaitTime 13-10
DBMaint script 12-20
DBMaintCmd 13-16
dbstatistics script 12-20
default owner of job 2-11
Index-6
delete job
GUI 6-25
JIL 7-13
DENY_ACCESS AUTOENV setting 13-42
dependency, job
date/time 3-17
exit code 3-25
global variables 3-28
job status 3-18
dependent jobs
creating - GUI 6-15
creating -JIL 7-9
example 3-23
description job attribute 4-13
done condition in job definition 3-19
DSQUERY variable 12-28
Dual Event Servers
crash recovery 12-23
defined 1-6
mode 12-16
synchronizing Event Servers 12-23
Dual Server Mode 12-22
E
EDErrTimeInt 13-13
edit permissions 2-12
Edit Superuser 2-15
EDMachines 13-13
EDNumErrors 13-13
environment variables
AUTOSERV 13-3
DSQUERY 12-28
See also profiles
SYBASE 12-28
user-defined 4-7
EP_HIGH_AVAIL 13-46
EP_ROLLOVER 13-46
Index
EP_SHUTDOWN 13-46
errors
Event Processor handling 13-13
Event Processor time interval 13-13
essential job attributes 4-5
event management (ProVision) 13-33
Event Processor
See also event_demon
allowable time between errors 13-13
authentication on Remote Agent 13-41
automatic shutdown 13-12, 13-13
checking for running 13-13
defined 1-6
error handling 13-13
heartbeat interval 13-17
log
minimum disk space 13-15
viewing 12-6
monitoring 12-4, 12-6
restoring 12-9
running in test mode 12-10
shutdown, automatic 13-12
starting 12-3
stopping 12-7
tail command 12-4
Third Machine 13-14
troubleshooting 14-11
Event Report, from Operator Console
10-14
Event Server
See also database
See also Dual Event Servers
defined 1-5
dual 12-16, 12-18
recovery 12-22
rollover 12-22
synchronizing process 12-23
Index-7
Index
F
factor attribute 9-6
failure condition in job definition 3-19
FAILURE status 3-11
FALSE.EXE 3-28
file locking 13-18
file maintenance 13-18
File Watcher Jobs 3-7
basic job definition 3-9
creating 6-12
FileSystemThreshold 13-15
filter, monitor/report 11-9
force starting jobs
from Job Activity console 10-15
impact on load balancing 9-14
G
gid 2-12, 4-18
global variables
backing up definitions 12-15
job dependencies 3-28
restoring definitions 12-16
setting, in the Send Event dialog 10-17
Graphical Calendar Facility 8-1 to 8-35
Calendar Definition window 8-6
screens 8-5
See also calendars
starting 8-5
group ID 2-12, 4-18
GUI
Advanced Features dialog 6-8
Control Panel 6-3
Date/Time Options dialog 6-7
defined 1-3
defining monitor/reports 11-12
HostScape 6-3
Job Definition dialog 6-4, 6-5
Index-8
JobScape 6-4
Monitor/Browser dialog 6-3
one-time job overrides 6-26
Operator Console 6-3
starting 6-3
time dependencies, setting 6-22
TimeScape 6-4
using to create a job definition 4-4
H
heartbeat_interval 4-24
heartbeats
about 13-17
checking 13-17
code to include 4-24
interval 4-24
time interval 13-17
high availability
Dual Event Servers 1-6
Shadow Event Processor 1-6
HostScape 6-3
HP OpenView IT/Operations settings
13-27
HP OpenView settings 13-22
I
Import/Export File Name (calendar)
dialog 8-28
importing calendars 8-28, 12-15
INACTIVE status 3-10
inetd
job starting inverval 13-34
resetting 13-29
InetdSleepTime 13-34
InfoReports 10-5
accessing from Operator Console 10-47
configuring for printing 10-48
Index
J
JIL
creating a job definition 4-3
defined 1-3
defining jobs 7-3
defining monitors/reports 11-19
defining report 11-21
example 7-16
running 7-6
sub-commands 7-5
syntax rules 7-3
Job Activity Console 10-8
See also Operator Console
starting conditions 10-13
Alarm button 10-22
Alarm Manager dialog 10-29
cancelling a sent event 10-18
Control Area 10-14
action buttons 10-15
control buttons 10-20
Dependent Jobs button 10-20
Freeze Frame button 10-21
Job Definition button 10-20
Report buttons 10-21
Currently Selected Job region 10-11
Dependent Jobs dialog 10-20
InfoReports viewing 10-5
Job List 10-10
Job Path (History) dialog 10-21
Job Selection dialog 10-23
menu bar 10-9
reports 10-14
resizing regions 10-23
Index-9
Index
job_terminator 4-15
jobs
attributes, basic 3-8
backing up definitions 12-14
basic job information 3-4
Box Jobs 5-1
creating - GUI 6-18
creating - JIL 7-10
defined 3-6
changing - GUI 6-20
changing - JIL 7-10
Command Jobs
creating - GUI 6-10
creating - JIL 7-7
defined 3-5
creating
Box Jobs - GUI 6-18
Box Jobs - JIL 7-10
Command Jobs - GUI 6-10
Command Jobs - JIL 7-7
File Watcher Jobs - GUI 6-12
File Watcher Jobs - JIL 7-8
creating a job definition 4-3
custom calendars 3-17
cycles of processing 14-3
date/time dependencies
setting in GUI 6-22
setting in JIL 7-12
days to run, setting 6-22
defined 1-3
defining environment for 4-7
defining in AutoSys 3-30
definition
Box 3-9
Command 3-8
File Watcher 3-9
Index-10
deleting
GUI 6-25
JIL 7-13
dependencies
creating with GUI 6-15
creating with JIL 7-9
exit codes 3-25
global variables 3-28
job status 3-18
time
GUI 6-22
JIL 7-12
edit permissions 2-12
execute permssions 2-13
exit code 3-25
File Watcher
creating - GUI 6-12
creating - JIL 7-8
defined 3-7
force starting 9-14, 10-15
heartbeats from 4-24
number of restart attempts 13-27
overrides
GUI 6-26
JIL 7-14
owner, default 2-11
permissions on NT 2-14
queuing 9-5, 9-18
restart tries 13-27
restoring definitions from backup file
12-16
run number 3-29
saving definitions to backup file 12-14
selection list 6-21
Index
jobs (contd.)
starting conditions 3-15
done 3-19
failure 3-19
notrunning 3-19
success 3-18
terminated 3-19
states 3-10
status
ACTIVATED 3-10
FAILURE 3-11
INACTIVE 3-10
managing 3-24
ON_HOLD 3-12
ON_ICE 3-12
QUE_WAIT 3-11
RESTART 3-11
STARTING 3-10
SUCCESS 3-11
TERMINATED 3-11
status codes 3-10
time dependencies, setting
JIL 7-12
time/date dependencies 3-17
types 3-3
variables for 4-7
JobScape 6-4
K
KILLJOB signals 13-30
KillSignals 13-30
L
load balancing 9-11
example 9-13
force starting jobs 9-14
job attributes required for 9-5
M
machine
attribute 4-8, 4-9
backing up definitions 12-14
client 1-10
defining with JIL 9-3
deleting
real machines 9-9
virtual machines 9-10
factor attribute 9-6
job runs on 4-8
machine attribute 9-4
max_load attribute 9-5
permissions, edit and execute 2-13
priority job attribute 9-5
real 9-3
restoring definitions from backup file
12-16
saving definitions to backup file 12-14
server 1-10
type attribute 9-4
virtual 9-3
defining 9-9
deleting 9-10
MachineMethod 13-29
maintenance
backing up AutoSys definitions 12-13
calendar definitions 12-13
global variables 12-15
job definitions 12-14
machine definitions 12-14
Index-11
Index
maintenance (contd.)
backing up AutoSys definitions (contd.)
monitor and browser definitions
12-14
chase command 12-12
clean_files 12-12
commands 12-12
database 13-15
database time 12-20
files 13-18
restoring AutoSys definitions 12-15
managing job status 3-24
max_exit_success 4-23
max_load machine attribute 9-5
max_run_alarm 4-14
maximum exit code for success 3-19
maximum system load 9-5
MaxRestartTrys 13-27
MaxRestartWait 13-28
method of load balancing 13-29
min_run_alarm 4-14
mode monitor/report attribute 11-7
Monitor/Browser dialog 6-3, 11-12
customizing 11-22
database connection time-out 11-22
icon text 11-23
title bar text 11-23
monitors 11-1 to 11-23
about 11-4
alarm_verif 11-11
backing up definitions 12-14
defined 11-3
defining 11-4, 11-15
GUI 11-12
JIL 11-19
filtering 11-8
filtering events 11-3
Index-12
job_filter 11-9
name 11-7
restoring definitions from backup file
12-16
sound 11-11
status events 11-9
multiple machine queues 9-24
N
n_retrys 4-16
name monitor/report attribute 11-7
NIS, troubleshooting 14-15
notification, user-defined notification
routines 13-46
notrunning condition in job definition
3-19
ntrys 3-29
O
ON_HOLD 3-12
ON_HOLD vs. ON_ICE 3-12
ON_ICE 3-12
one-time job overrides 6-26
OpcMessageGroup 13-27
OpcWaitTime 13-27
Open Client C Library 12-16
OpenView
configuring for SNMP 13-22
OpenView, configuring for SNMP 13-22
Operator Console 6-3
about 10-4
Alarm Manager dialog 10-7
Alarm Selection dialog 10-7
customizing 10-37
Alarm List column width 10-45
alarm poll time interval 10-38
atomic conditions fields 10-44
Index
P
passwords
autosys user 2-10
database 2-10
database system administrator 12-29
permission attribute 4-17
permissions 2-3, 4-17
edit 2-12, 4-18
execute 2-13, 4-18
granting 2-13
machine 2-13
types 2-12
user 2-11
using umask 2-11
Windows NT 2-14
platinum.my file 13-24
port number for Remote Agent 13-31
priority job attribute 4-22, 9-5
profile script 3-5
profiles 4-7
ProVision
data exchange 13-33
event management 13-33
Q
QUE_WAIT status 3-11
queuing
and simple load limiting 9-19
as subset of virtual machine 9-22
jobs 9-18
multiple machine 9-24, 9-25
policies 9-18
with priority 9-20, 9-21
Index-13
Index
R
real machines 9-3
defining 9-3
deleting 9-9
example 9-8
type 9-4
reconnecting to database 13-11
recovery
database 12-41
Sybase database 12-41
Remote Agent
auto_remote service 13-39
database connectivity 14-20
defined 1-7
Event Processor authentication 2-10
heartbeat interval 13-17
log 14-18
modifying settings for 13-38
port number 13-31
security 2-18
security, DENY_ACCESS 13-42
settings 13-38
socket connection 13-38
troubleshooting 14-13
user authentication 2-9
Remote Agent Event Processor
authentication 13-41
Remote Agent log
cleanup 13-18
name assigned 14-18
specifying directory for file 13-18
Remote Agent settings in auto.profile
13-35
remote authentication 13-41
configuring 13-40
Event Processor 2-10
user 2-9
Index-14
RemoteProFiles 13-19
reports 11-1 to 11-23
about 11-4
all_events 11-8
all_status 11-9
defined 11-3
defining 11-4, 11-15
GUI 11-12
JIL 11-19
defining - GUI 11-17
defining - JIL 11-21
filtering 11-8
filtering events 11-3
InfoReports 10-5
job_filter 11-9
name 11-7
Operator Console 10-14
status events 11-9
resource check, file space 4-24, 4-26
resource usage monitoring 13-45
resources
Calendar Facility
date range 8-34
Font Selection 8-32
icon text 8-35
Object Color 8-33
Print Command 8-35
title bar text 8-35
Window Size 8-34
Job Definition 6-30
database connection time-out 6-31
icon text 6-31
title bar text 6-31
Monitor/Browser
database connection time-out 11-22
icon text 11-23
title bar text 11-23
Index
resources (contd.)
Operator Console 10-37, 11-22
alarm list column width 10-45
alarm poll time interval 10-38
atomic condition fields 10-44
border colors 10-43
currently selected job name field
color 10-41
default report type 10-45
font selection 10-40
freeze frame at start up 10-39
icon text 10-46
job list column widths 10-44
label font 10-40
list font 10-40
Operator Console size 10-45
primary interface color 10-43
refresh time interval 10-38
title bar text 10-46
toggle button color 10-43
variable fields background color
10-42
restart attempts, maximum number 13-27
RESTART status 3-11
restart wait time, calculating 13-28
RestartConstant 13-28
RestartFactor 13-28
restoring
calendar definitions 12-15
global variables (using autorep) 12-16
job definitions (using autorep) 12-16
machine definitions (using autorep)
12-16
monitor and browser definitions 12-16
Primary Event Processor 12-9
rollover
Event Server 12-22
Shadow Event Processor 12-8
rstatd 13-29
Rule Specification region 8-18
Run MonBro button 11-14
run number 3-29
RUN_AUTOSYSDB 12-30
run_calendar 4-10
run_num/ntry, defined 3-30
run_window 4-11
RUNNING status 3-10
ruserok 2-9, 13-40
S
scripts
database maintenance 13-16
DBMaint 12-20
start_autodb 12-30
security 2-1, 2-3
DENY_ACCESS Remote Agent setting
13-42
granting permissions 2-13
permission types 2-12
preventing unauthorized access 2-7
Remote Agent 2-18
remote authentication 13-40
superusers, AutoSys 2-15
user permissions 2-11
select getdate 12-31
Send Event dialog 10-16
AUTOSERV instance 10-17
Cancel button 10-18
cancelling an event 10-18
Change Status 10-17
Comment field 10-17
Execute button 10-18
Index-15
Index
Index-16
SQL*Net V2 12-16
standard output/error append parameter
13-32
start interval between jobs 13-34
start_autodb script 12-30
start_mins 4-12
start_times 4-11
starting conditions 3-15, 3-18
in Job Activity Console 10-13
STARTING status 3-10
STARTJOB 7-6
states
job 3-10
See also status
status
job
ACTIVATED 3-10
as job dependency 3-18
FAILURE 3-11
INACTIVE 3-10
monitoring and reporting 11-9
ON_HOLD 3-12
ON_ICE 3-12
QUE_WAIT 3-11
RESTART 3-11
RUNNING 3-10
STARTING 3-10
SUCCESS 3-11
TERMINATED 3-11
tracking changes 11-9
monitor/report
failure 11-9
restart 11-9
running 11-9
starting 11-9
success 11-9
terminated 11-9
Index
status (contd.)
processed vs. unprocessed 3-15
using in job dependencies 3-18
std_err_file 4-21
std_in_file 4-20
std_out_file 4-20
STOP_DEMON 12-7, 12-31, 12-42
success
condition in job definition 3-18
maximum exit code 3-19
SUCCESS status 3-11
Summary Report, from Operator Console
10-14
superusers 2-15
Edit Superuser, defined 2-15
Exec Superuser, defined 2-16
svarchive utility 13-45
svload command 9-15
svload configuration requirements 13-43
Sybase
accessing interactively 12-32
architecture 12-27
bundled 12-27
defining a dump device 12-35
disk dump device 12-35
dumping the database 12-39
loading the database 12-40
tape dump device 12-36
communication with 12-27
database
displaying date and time 12-34
identifying connected processes
12-33
improving performance 12-24
DB Library 12-27
DSQUERY variable 12-28
environment 12-28
T
target machine 4-8
Team Agent support 13-31, A-1
Term Calendar Rule dialog 8-17
Control region 8-24
Rescheduling Rule region 8-22
Term Calendar Viewer 8-9, 8-25
Calendar Display 8-26
Navigation Controls 8-26
term_run_time 4-14
terminated condition in job definition
3-19
TERMINATED status 3-11
test mode
output file 12-11
running in 12-10
ThirdMachine 13-14
time dependencies
in job definition 4-10
overview 3-17
Index-17
Index
U
uid 2-12, 4-18
user ID 2-12, 4-18
user types
group 2-12
owner 2-12
world 2-12
user-defined
alarm callbacks 13-46
environment variables 4-7
load balancing 9-25
users, bundled Sybase 12-28
utilities, provided with AutoSys 1-12
type 9-4
using delete_machine 9-3
using insert_machine 9-3
vmstat 13-29
W
WaitTime 13-28
watch_file 4-9
watch_file_min_size 4-25
watch_interval 4-25
Windows NT
job permissions on 2-14
X
X resources, customizing Calendar Facility
8-30
XInstanceDBDropTime 13-11
xql, example scripts 12-32
Z
Zeke and AutoSys/Team Agent support
A-1 to A-26
Zeke support 13-31
ZTeamJobSupport 13-31
V
variables in a Command Job definition
4-7
virtual machines 9-3
defining 9-3, 9-9
deleting 9-10
example 9-9
Index-18