+

Search Tips   |   Advanced Search

Scheduling Activities statistics collection

Edit configuration property settings to change the frequency and duration of the jobs that collect server statistics.

  1. Access the Activities configuration file:

      ./wsadmin -lang jython
      execfile("activitiesAdmin.py")


    ActivitiesConfigService.checkOutConfig("/tmp","cell_name")

    To get cell name...

  2. Display current configuration settings :

      ActivitiesConfigService.showConfig()

    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, to change:

  3. We can change the property values:

      ActivitiesConfigService.updateConfig(property, value)

    For example:

    • 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 . Default is...

        0 0/30 * * * ?

      ...which specifies the job should run every 30 minutes.

        ActivitiesConfigService.updateConfig("jobs.30MinStats.interval", "0 0/10 * * * ?")

      If we change the frequency to something other than 30 minutes, keep in mind the job name will still be 30MinStats and could lead to some confusion.

    • To change the start time of the DailyStats job from 11 AM to 1 AM, edit the value the interval attribute . Default is 0 0 11 * * ? which specifies 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 . Default is 0 0 * * * ?, which specifies the job should run once every hour, on the hour.

        ActivitiesConfigService.updateConfig("jobs.DatabaseRuntimeStats.interval", "0 0/45 * * * ?")

    For information about how to format the value of the interval attribute, see Schedulng tasks.

  4. To prevent the statistics collection job from running altogether, we can use the following commands to disable the jobs:

  5. After making changes, check configuration file back in during the same wsadmin session in which they were checked out.


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>


Parent topic:
Monitoring statistics and metrics


Related:

Scheduling tasks


Related:

Check out the Activities configuration files

Apply property changes in Activities

Manage the scheduler

Start the wsadmin client