Sei sulla pagina 1di 29

IBM Tivoli Workload Scheduler

Plan Management

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Agenda

 Database vs planning
 Scheduling objects
 Job stream types and run cycles
 Making occurrences
 Plan generation
 Options settings
 Planning phases
 Automating production
 Troubleshooting and recovery

2 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Modeling database and production plan

DATABASE
WORKSTATIONS PLAN
DOMAINS PLANNED WORK
CALENDARS SCHEDULED
WORK
RESOURCES
WORKLOAD
PROMPTS INSTANCES
VARIABLE TABLES UNPLANNED WORK
EVENTS
JOBS ACTIONS
JOB STREAMS
AD HOC
RERUN
EVENT RULES

3 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler
Database Objects

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Scheduling Objects

Backup Job Objects


 Workstations, workstation classes
 Calendars
 Resources, prompts, variables, and variable tables
 Jobs
?  Stored as rows in a table, along with an abstract
reference
 JOB123 > x'9F7945E725F63005A4E3FBAE8E896727'

 Other than calendars, these are not used in the planning process to
create instances of the job streams in the plan

5 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Job streams

Nightly Job Stream  Job stream name


Backup Job  Validity dates
 Run cycles
Extract Job  Time restrictions
 Scheduling objects
Compile Job

 Also stored in the database


Report Job
with references
 x'1E3C4F64BD5C3235B88E4AC978D5F094'

6 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Job stream selection types

 Draft mode
 Valid only in the
future
 Multiple versions
of the same job
stream

JS-A JS-A JS-A


(1/1/2010) (5/1/2010) (9/1/2010)

7 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Run cycles and time dependency options

Run cycles
 Inclusive
 Exclusive
Time dependencies
 Job stream
 Run cycles

8 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Occurrences

Mo Tu We

7:00 Monday 10:00


JS-A JS-A JS-A

JS-A
8:00
10:01 JS-B JS-B JS-B
JS-A
9:00
JS-B
JS-A
10:00
The combination of job
11:00
JS-A stream selections and
run cycles lead to job
JS-A
12:00 stream occurrences

9 © 2010 IBM Corporation


Plan generation process

IBM Tivoli Workload Scheduler 8.3-8.4-8.5


Customer Education

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

The production planning cycle

Scheduling Objects
WORKSTATIONS
DOMAINS
CALENDARS
RESOURCES
PROMPTS
PRODUCTION
VARIABLES
TRIAL
JOBS FORECAST
JOB STREAMS HISTORY

1
workday
10 days
Workload History
RUNTIMES

SUMMARY

STATISTICS
today tomorrow
HISTORY

11 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Plan types

PLAN TYPES

•PRODUCTION
•TRIAL
•FORECAST
•HISTORY Symphony

1
workday
14 days

Dec 25 2007 today tomorrow Dec 25-27 2008

Preproduction plan

12 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Production Plan Extension


Database

Workstations

Resources

Calendars
Streams
Pre Production ….

Jobs
Job
Plan
10 days

today tomorrow

Symnew

Current
Remove Add detail
Plan Old completed job for next plan New
Extension Symphony streams period Symphony

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Global options affecting plan generation

EnCarryForward
 All: Ignores the Carry Forward key in the job streams definitions, and carries
forward all uncompleted job streams.
 Yes: Carries forward only those uncompleted job streams that have the Carry
Forward key enabled
 No: Nothing carries forward

minLen
 The minimum number of days’ length of the preproduction plan

maxLen
 The maximum number of days’ length of the preproduction plan

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

{Pre}Production planner phases

JOBSTREAMS
RUNCYCLES

LTP
1 2
INSTANCES DEPENDENCIES

X X X X ‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’
Long term planning
Production planning

1 Symnew
‘’ ‘’ ‘’ ‘’

2 Symphony
‘ ‘ ‘
Symphony
3 Sinfonia
‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’

Old production plan end time extension New production plan end time

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Pending and orphan predecessors

JOBSTREAMS pending
RUNCYCLES predecessor

X X X X ‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’ C

Symnew orphan
‘’ ‘’ ‘’ ‘’ predecessor

Sinfonia
Orphaned predecessors ‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’ Pending predecessors are
are on job streams that on job streams in the future
were expected to be in the past the end of the plan
plan but are not there due extension
to deletion, draft mode
selection, run cycle
changes, etc.
© 2010 IBM Corporation
IBM Tivoli Workload Scheduler – distributed technical overview

Trial Plan

A trial plan is a projection of what a production plan would be if it


covered a longer period of time.
For example, if you generate a production plan that covers two days, but
you want to know what the plan would be if it covered three days, you
can generate a trial plan.

Characteristics of a trial plan:


1. It starts when the current production plan starts.
2. It’s based on the status information stored in the current preproduction
plan.
3. It cannot be run to manage production.
4. It can be managed by users with access “build” on trialsked file object
type set in the security file.
5. It produces a file stored in the ~TWSHome/schedTrial directory with
these properties
- Same format as the Symphony file
- The file name starts with a leading “T”.

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Forecast Plan

The Forecast Plan is a projection of how the Production Plan will be in


the future (or even in the past).

Characteristics of a trial plan:


1. It is based on a sample preproduction plan covering the same time
period selected for the forecast plan. This sample preproduction plan
is deleted after the forecast plan is created.
2. It cannot be run to manage production
3. It can be managed by users with access “build” on trailsked file object
type in the security file on the master.
4. It produces a file stored in the ~TWSHome/schedForecast directory
with these properties:
- The same format as the Symphony file
- The file name starts with a leading F.

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Comparison Between Daily, Trial and Forecast Plans

Daily, Trial and Forecast Plans are different and have a different impact
to the possible actions that users can do while they are running:

Daily Plan Trial Plan Forecast Plan

1. Get GLOBAL LOCK 1. Get GLOBAL LOCK 1. Calculate JobStream Instances


2. Calculate JobStream Instances 2. Calculate JobStream Instances 2. Write the new Symphony file.
3. Write the new Symphony file. 3. Release GLOBAL LOCK
4. Release GLOBAL LOCK. 4. Write the new Symphony file.

When the GLOBAL LOCK is teken, database object can’t be changed!

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Final job stream

FINAL

STARTAPPSERVER

MAKEPLAN

SWITCHPLAN

CREATEPOSTREPORTS UPDATESTATS

© 2010 IBM Corporation


Using Planner Commands

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Checking production plan status

planman showinfo
Retrieves information related to production plan status

[twsuser@twsmst ~]$ planman showinfo


Tivoli Workload Scheduler (UNIX)/PLANMAN 8.5.1 (20091127)
Licensed Materials - Property of IBM*
5698-WSH
(C) Copyright IBM Corp. 1998, 2009 All rights reserved.
* Trademark of International Business Machines
Installed for user "twsuser".
Locale LANG set to the following: "en"
Plan creation start time: 02/23/2010 06:00 TZ CST
Production plan start time of last extension: 02/25/2010 06:01 TZ CST
Production plan end time: 02/26/2010 06:00 TZ CST
Production plan time extention: 024:00
Plan last update: 02/25/2010 06:00 TZ CST
Preproduction plan end time: 03/10/2010 06:00 TZ CST
Start time of first not complete preproduction plan job stream instance:
02/24/2010 09:00 TZ CST
Run number: 39
Confirm run number: 39
© 2010 IBM Corporation
Troubleshooting and Recovery

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Resetting the Plan

ResetPlan preproduction plan


[-scratch]

4
1 Stop all agents M201003011159 With –scratch option
‘ ‘ ‘
2 Archive Symphony
(Myyyymmddhhtt)

3 Log statistics
preproduction plan
4 Reset the X X X X ‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’
preproduction plan

4
M201003011159
‘ ‘ ‘ Without –scratch option
5 NOTE
After running
ResetPlan, you must
run JnextPlan
© 2010 IBM Corporation
IBM Tivoli Workload Scheduler – distributed technical overview

Plan recovery

logman
[-prod]
preproduction plan

1 logman –prod X X X ‘ ‘ ‘ ‘ ‘’ ‘’ ‘’ ‘’
Record all
completed job
stream instances Symphony
to the pre- logman -prod
production plan ‘ ‘ ‘

Current time

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Plan recovery procedure

1. Run logman -prod to mark the job streams instances completed. This could be done
periodically throughout the day.
2. Run planman showinfo and capture the "Start time of first not complete preproduction
plan job stream instance"
3. Run ResetPlan without the -scratch, to avoid resetting the proproduction plan
4. Run JnextPlan with -from set to the time captured above, -to set to tomorrow, at the end
of the corrupted Symphony

For example, if on 02/26 there is a Symphony corruption:


planman showinfo shows:
Start time of first not complete preproduction plan job stream instance: 01/30/2010 06:00 TZ GMT-03:00
ResetPlan
JnextPlan -from 01/30/2010 -to 02/27/2010

© 2010 IBM Corporation


Summary

© 2010 IBM Corporation


IBM Tivoli Workload Scheduler – distributed technical overview

Summary

 Database vs planning
 Scheduling objects
 Job stream types and run cycles
 Making occurrences
 Plan generation
 Options settings
 Planning phases
 Automating production
 Troubleshooting and recovery

31 © 2010 IBM Corporation


IBM Tivoli Workload Scheduler
Plan Management
Presenter’s name here

© 2010 IBM Corporation

Potrebbero piacerti anche