onstat -g dbc command: Print dbScheduler and dbWorker thread statistics

Use the onstat -g dbc command to display statistics about the Scheduler tasks that are currently running, which are handled by dbWorker threads, or scheduled to be run, which are handled by the dbScheduler thread.

Read syntax diagramSkip visual syntax diagram

>>-onstat-- -g--dbc--------------------------------------------><

Example output

Figure 1. onstat -g dbc command output
Worker Thread(0)    46fa6f10         
Task:                47430c18         
Task Name:           mon_config_startup
Task ID:             3
Task Type:           STARTUP SENSOR                                         
Last Error
    Number               -310
    Message              Table (informix.mon_onconfig) already exists in database.
    Time                 09/11/2007 11:41
    Task Name            mon_config_startup

Task Execution:      onconfig_save_diffs

    Total Jobs Executed            10
    Sensors Executed                8
    Tasks Executed                  2
    Purge Requests                  8
    Rows Purged                     0
Worker Thread(1)    46fa6f80         
Task:                4729fc18         
Task Name:           mon_sysenv
Task ID:             4
Task Type:           STARTUP SENSOR                                         
Task Execution:      insert into mon_sysenv select 1, env_name, env_value FROM 

    Total Jobs Executed             3
    Sensors Executed                2
    Tasks Executed                  1
    Purge Requests                  2
    Rows Purged                     0

Scheduler Thread    46fa6f80         
Run Queue
Run Queue Size        0
Next Task             7
Next Task Waittime    57

Output description

Worker Thread
Address of the worker thread in shared memory
Name of the last executed task
Task ID
The task ID from the tk_id column in the sysadmin:ph_task table for this task
Task Type
Type of the task
Last Error
Error number, error message, time (in seconds), and task name from the last error the dbWorker thread encountered. It could be from the previously executed task or from a task executed days ago.
Task Execution
SQL statement or SPL procedure or routine executed as part of the task
The dbWorker thread profile data shows the total jobs executed, number of sensors executed, number of tasks executed, number of purge requests, and the number of rows purged from the result tables for all sensors executed by this dbWorker thread.
Scheduler Thread
Address of the scheduler thread in shared memory
Run Queue
The task ID for the next scheduled task. If no task is scheduled, the value is Empty.
Run Queue Size
The number of tasks that are waiting to be executed by the dbWorker thread
Next Task
The task ID of the next task that will be scheduled to be executed
Next Task Waittime
The number of seconds before the Next Task will be scheduled for execution

Copyright© 2018 HCL Technologies Limited