Job Management Partner 1/Automatic Job Management System 3 Overview
The number of logs to keep is a setting that specifies how many generations are to be saved as the execution results of a jobnet. The setting applies only to a root jobnet. Once you set the number of logs to keep, you can view the execution results for the set number of generations (executions) in the Daily Schedule or Monthly Schedule window. You can also view past execution results by running the ajsshow command. For details on the ajsshow command, see ajsshow in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1. As the number of logs to keep, you can set any number from 1 to 99. Using the extended feature, you can set a maximum of 999 generations, depending on the environment settings for the Manager's scheduler service. For details on setting the Manager's scheduler service environment, see MAXSAVEGEN in 2.2 Setting up the scheduler service environment in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2. However, a high setting will simply increase the number of saved records (given by the following equation: number of logs to keep setting x number of registered units). This means that all sorts of operations involving database access, such as canceling jobnet registration, will take a very long time. If you are using the extended feature for maximum number of logs to keep, make sure the setting will not degrade system performance. You should also promptly delete past results (by date specification) when they are no longer required.
Note that the extended feature is not supported in JP1/AJS3 - Manager 06-71 or earlier versions.
Past execution results are automatically deleted when they exceed the number of generations set as the number of logs to keep. This is referred to as jobnet generation management. Examples of jobnet generation management when executing a jobnet and notes on using this feature are given next.
- Organization of this subsection
- (1) Example of jobnet generation management
- (2) Example of jobnet generation management when "Now running" generations exceed the number of logs to keep
- (3) Example of generation management of a jobnet with a start condition
- (4) Example of generation management of a jobnet with a start condition (upgrade installation from version 8 or earlier)
- (5) Notes on setting a large number of logs to keep for a jobnet with a start condition (upgrade installation from version 8 or earlier)
(1) Example of jobnet generation management
Jobnet generation management is performed at the execution start time of the next generation.
The following figure shows an example of jobnet generation management.
Figure 4-11 Example of jobnet generation management
In this example, 3 is set as the number of logs to keep in the jobnet definition. When the fourth generation starts execution, the generation executed first is deleted.
(2) Example of jobnet generation management when "Now running" generations exceed the number of logs to keep
Generations in Now running status, and generations in Waiting for start time status when concurrent execution is disabled, are not deleted when the number of logs to keep is exceeded. However, Now running and Waiting for start time generations are counted among those subject to generation management. If the number of Now running or Waiting for start time generations exceeds the number of logs to keep, the excess generations are deleted when execution completes.
An example of this situation is shown below.
Figure 4-12 Jobnet generation management when the "Now running" generations exceed the number of logs to keep (at rerun)
In this example, 2 is set as the number of logs to keep in the jobnet definition. Even though this value is exceeded while the three generations are in Now running status, none of the generations is deleted. Generation management is performed when the next scheduled generation starts. At this point, generations that exceed the setting (2), counting the new generation now running, are deleted, starting from the oldest.
(3) Example of generation management of a jobnet with a start condition
When a jobnet has a start condition, generation management applies to all generations, including the monitoring generations (generations in Now monitoring status) and execution generations initiated by the start condition (generations in Wait for start condition status). Generation management is performed at the following times.
- When monitoring for the start condition begins
- When the start condition is satisfied
In both cases, if the set number of logs to keep is exceeded, execution generations are deleted one by one, starting from the oldest. The monitoring generation is deleted with the last execution generation. If you have performed an upgrade installation from version 8 or earlier, note that the generation management method changed in version 9. For an example, see (4) Example of generation management of a jobnet with a start condition (upgrade installation from version 8 or earlier).
The following figure shows an example of generation management of a jobnet that has a start condition.
Figure 4-13 Generation management of a jobnet with a start condition
When a jobnet with a start condition is registered for execution, a monitoring generation is created whenever the start time arrives (generations 1-0 and 2-0 in the figure). At the same time, one or more execution generations in Wait for start condition status are created, and are executed when the start condition is satisfied (generations, 1-1, 1-2, and 1-3 in the figure).
When the set number of logs to keep is exceeded, the execution generations triggered by the start condition are deleted one by one, starting from the oldest. Deletion is performed when monitoring for a start condition starts or when a start condition is satisfied. The monitoring generation is deleted with the last execution generation.
In the above example, 2 is set as the number of logs to keep. In jobnet generation 1-0, when the start condition is satisfied for the second time, generation 1-3 is created (and placed in Wait for start condition status) and generation 1-1 is deleted. Likewise, generation 1-2 is deleted when the start condition is satisfied a third time. Generation 1-3 is deleted when the start time arrives for the next run of the jobnet, and jobnet generation 2-0 begins. Because generation 1-3 is the last execution generation, generation 1-0 is deleted with it. When specifying the number of logs to keep, bear in mind that all generations, both monitoring and execution generations, are counted and subject to jobnet generation management in this way.
(4) Example of generation management of a jobnet with a start condition (upgrade installation from version 8 or earlier)
If you have performed an upgrade installation from version 8 or earlier, generation management of a jobnet that has a start condition is performed separately for the monitoring generations and the execution generations (generations in Wait for start condition status that will be executed when the start condition is satisfied).
The following figure shows an example of generation management of a jobnet that has a start condition.
Figure 4-14 Generation management of a jobnet with a start condition (upgrade installation from version 8 or earlier)
When a jobnet with a start condition is registered for execution, a monitoring generation is generated at the set start times (generations 1-0, 2-0, and 3-0 in the above figure). At the same time, the system creates one or more execution generations in Wait for start condition status, which are executed when the start condition is satisfied (generations 1-1 to 1-4, 2-1 to 2-3, and 3-1 to 3-4 in the above figure).
Like ordinary jobnet generations, monitoring generations 1-0, 2-0, 3-0 are also subject to generation management based on the number of logs to keep. If a monitoring generation is deleted when the number of logs to keep setting is exceeded, the system also deletes all generations that were triggered by the established start condition and executed while that deleted generation was in Now monitoring status. However, when a monitoring generation has completed, even if the number of generations exceeds the number of logs to keep setting, that monitoring generation will not be deleted as long as there is any generation triggered by the start condition and still in Now running state.
Management of generations initiated by the start condition is performed when the start condition is satisfied. This applies to all the generations initiated by a start condition being monitored by one generation in Now monitoring status. When the start condition is satisfied, the generation in Wait for start condition status is placed in Now running status, and a new Wait for start condition generation is created to wait for the start condition to be satisfied again. This new generation is added to the total resident generations, and the oldest generation exceeding the number of logs to keep is deleted.
In the above example, 2 is set as the number of logs to keep in the jobnet definition. Therefore, in jobnet generation 1-0, when the start condition is satisfied for the second time, generation 1-3 is created (and placed in Wait for start condition status) and generation 1-1 is deleted. When the start condition is satisfied for the third time, 1-4 is created and 1-2 is deleted. The start condition is not satisfied again within the valid range, so the two generations (1-3 and 1-4) are left in generation 1-0. The next generation of the jobnet (2-0) begins running when its start time arrives. Only two monitoring generations (1-0 and 2-0) are now monitoring for the start condition, so generation 1-0 (plus 1-3 and 1-4) still remain. While 2-0 is monitoring, 2-1 is deleted and 2-2 and 2-3 remain. But when generation 3-0 begins running, the number of logs to keep setting is exceeded, so generation 1-0 (plus 1-3 and 1-4) are all deleted at this point.
In this way, when a jobnet has a start condition, not only the monitoring generation but all execution generations executed within that generation are subject to generation management. When setting the number of logs to keep, you should therefore bear in mind how many generations could be initiated by the start condition. Because generation management also applies to generations in Wait for start condition status, we recommend that you set a value of at least 2 as the number of logs to keep. A value of only 1 could result in the execution result of the previous generation being immediately deleted.
However, in regard to setting a high number of logs to keep, note the following points:
(5) Notes on setting a large number of logs to keep for a jobnet with a start condition (upgrade installation from version 8 or earlier)
A start condition might be satisfied dozens or even hundreds of times during one monitoring generation. If you set an exceptionally large value as the number of logs to keep, remember that not only the generations initiated by the start condition but also the monitoring generations will be saved. Suppose, for example, that you set 100 as the number of logs to keep for a daily jobnet where the start condition arises 100 times a day. This means that a total of 10,100 generations will be saved (the 100 monitoring generations, plus 100 generations for each of the past 100 days). In other words, the number of saved generations will be more than the square of the value set as the number of logs to keep.
The number of saved records increases in proportion to the value given by the following equation: number of logs to keep x number of registered units. This has a significant impact on all sorts of operations involving database access, such as canceling jobnet registration. You should therefore consider the effects on system performance when setting the number of logs to keep. Also, be sure to promptly cancel the registration of start-condition monitoring generations that do not need to be kept, and administer the system so as to prevent huge numbers of records resulting from a large number of kept generations.
The following figure shows an example of canceling registration to prevent mass record generation.
Figure 4-15 Example of canceling registration to prevent mass record generation
In this example, the daily jobnet has a start condition that is satisfied 10 times a day. To save each day's execution results, 10 is set as the number of logs to keep. Ten days after registering this jobnet, the number of saved generations will total 110 (Now monitoring generations x 10 days + 10 daily condition-dependent generations x 10 days). But only one day's execution results actually need to be kept. So, by the time the generations on 8/10 complete execution, there will be 99 generations of execution results, from 8/1 to 8/9, that you do not need. To delete these unnecessary generations, you must cancel registration of the jobnets in the period from 8/1 to 8/9. Canceling these jobnets will reduce the number of saved records to just the 11 generations on 8/10, thereby lessening the impact on database operations.
From these considerations, if you anticipate that the start condition will often arise, and you therefore set a high number of logs to keep, you should make a daily habit of canceling registration of the previous day's jobnet at completion of the current day's jobnet.
For details on canceling jobnet registration, see 7.3 Releasing the jobnet from registration for execution in the Job Management Partner 1/Automatic Job Management System 3 Operator's Guide and ajsleave in 2. Commands in the manual Job Management Partner 1/Automatic Job Management System 3 Command Reference 1.
You can change this generation management method to the method used in version 9. In version 9, records are saved only for the specified number of logs to keep. Consequently, there is no need to cancel registration of monitoring generations to prevent mass record generation. To change the method of managing generations of jobnets that have a start condition, set the value of the SAVEGENTYPE environment setting parameter in the jajs_config command. For details about this parameter, see 2.2 Setting up the scheduler service environment in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 2.
When you change from the generation management method used in version 8 and earlier to the method used in version 9, records equivalent to the number of generations saved with the earlier method, minus the number of generations saved with the version 9 method, will be deleted when the scheduler service starts. The time required to delete these records is given by the following equation: number of registered root jobnets with start conditions x specified number of logs to keep x specified number of logs to keep. The time taken will also depend on the hardware you are using. If the time required to delete records is likely to affect operations, delete unwanted generations manually before you change the management method. Deleting records in advance helps to reduce the time taken for the scheduler service to start.
The scheduler service startup time can also be substantially reduced by changing the generation deletion process based on generation management and cancellation of jobnet registration to an asynchronous process. For details, see 6.1.6 Changing the mode in which unregistration or generation management deletes the generations of a jobnet in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1 (Windows) or 14.1.6 Changing the mode in which unregistration or generation management deletes the generations of a jobnet in the Job Management Partner 1/Automatic Job Management System 3 Configuration Guide 1 (UNIX).
Copyright (C) 2009, 2010, Hitachi, Ltd.
Copyright (C) 2009, 2010, Hitachi Solutions, Ltd.