Scheduling Activities statistics collection
Edit configuration property settings to change the frequency and duration of the jobs that collect server statistics.
Before you begin
To edit configuration files, you must use the wsadmin client.
Procedure
- Use the wsadmin client to access and check out the Activities
configuration files.
- Display the current configuration settings using the following
command:
From the returned list, look at the current values of the settings that begin with jobs.30MinStats, jobs.DailyStats, and jobs.DatabaseRuntimeStats to determine which property values, if any, you want to change:ActivitiesConfigService.showConfig()
- You can change the property values using the following
command:
For example:ActivitiesConfigService.updateConfig(property, value)
- To change the frequency with which the 30MinStats job runs from
every 30 minutes to every 10 minutes, edit the value of the interval
attribute using the following command. The default value is 0 0/30
* * * ? which specifies that the job should run every 30 minutes.
If you change the frequency to something other than 30 minutes, keep in mind that the job name will still be 30MinStats and could lead to some confusion.ActivitiesConfigService.updateConfig("jobs.30MinStats.interval", "0 0/10 * * * ?")
- To change the start time of the DailyStats job from 11 AM to 1
AM, edit the value the interval attribute using the following command.
The default value is 0 0 11 * * ? which specifies that the job should
run daily at 11 AM.
ActivitiesConfigService.updateConfig("jobs.DailyStats.interval", "0 0 1 * * ?")
- To change the frequency with which the DatabaseRuntimeStats job
runs from once every hour to once every 45 minutes, edit the value
of the interval attribute using the following command. The default
value is 0 0 * * * ?, which specifies that the job should run once
every hour, on the hour.
ActivitiesConfigService.updateConfig("jobs.DatabaseRuntimeStats.interval", "0 0/45 * * * ?")
- To change the frequency with which the 30MinStats job runs from
every 30 minutes to every 10 minutes, edit the value of the interval
attribute using the following command. The default value is 0 0/30
* * * ? which specifies that the job should run every 30 minutes.
- Optional: If you want to prevent the statistics
collection job from running altogether, you can use the following
commands to disable the jobs:
ActivitiesConfigService.updateConfig("jobs.30MinStats.enabled", "false") ActivitiesConfigService.updateConfig("jobs.DailyStats.enabled", "false") ActivitiesConfigService.updateConfig("jobs.DatabaseRuntimeStats.enabled", "false")
- After making changes, you must check the configuration files back in and you must do so during the same wsadmin session in which you checked them out for the changes to take effect. See Applying property changes for details.
Example
<scheduledTasks>
<!-- DatabaseRuntimeStats - every hour -->
<task
name="DatabaseRuntimeStats"
description="Actvities Database Statistics Collector Service"
interval="0 0 * * * ?"
startby=""
enabled="true"
scope="cluster"
type="class"
targetName="com.ibm.openactivities.jobs.DatabaseStatisticsCollectorJobWS"
mbeanMethodName=""
serverName="unsupported" >
</task>
<!-- local scoped jobs -->
<!-- DailyStats - every day @ 11 am -->
<task
name="DailyStats"
description="Activities Daily Statistic Collector Service"
interval="0 0 11 * * ?"
startby=""
enabled="true"
scope="local"
type="class"
targetName="com.ibm.openactivities.jobs.StatsPersistJobWS"
mbeanMethodName=""
serverName="unsupported" >
</task>
<!-- 30MinStats - every 30 min -->
<task
name="30MinStats"
description="Activities 30 Minute Statistic Collector Service"
interval="0 0/30 * * * ?"
startby=""
enabled="true"
scope="local"
type="class"
targetName="com.ibm.openactivities.jobs.StatsPersistJobWS"
mbeanMethodName=""
serverName="unsupported" >
</task>
</scheduledTasks>