onstat -j command: Provide onpload status information

Use the onstat -j command to provide information about the status of an onpload job.

The onstat -j command provides an interactive mode that is analogous to the onstat -i command.

Read syntax diagramSkip visual syntax diagram
Syntax:

>>-onstat-- -j-------------------------------------------------><

When onpload starts, it writes a series of messages to stdout or to a log file. The following lines show a typical onpload log file:
Mon Jul 23 16:11:30 2010

SHMBASE        0x4400000
CLIENTNUM      0x49010000
Session ID 1

Load Database   -> cnv001
Load Table      -> cnv001a
Load File       -> testrec.dat
Record Mapping  -> cnv001a

Database Load Completed -- Processed 50 Records
Records Inserted-> 50
Detected Errors--> 0
Engine Rejected--> 0

Mon Jul 23 16:11:37 2010

Output description

The two lines that start with SHMBASE and CLIENTNUM provide the information that you need to locate shared memory for an instance of onpload. The oninit process has similar values stored in the $ONCONFIG file. When you use the onstat utility to gather information about the oninit process, the onstat utility uses information from $INFORMIXDIR/etc/$ONCONFIG file to locate shared memory. When you use onstat to gather information about onpload, you must give the onstat utility the name of a file that contains SHMBASE and CLIENTNUM information.

Typically the file that contains the SHMBASE and CLIENTNUM information is the log file. For example, if the onpload log file is /tmp/cnv001a.log, you can enter the following command:
onstat -j /tmp/cnv001a.log
The previous command causes the onstat utility to attach to onpload shared memory and to enter interactive mode. You can then enter a question mark (?) or any other pseudo request to see a usage message displayed. An example follows:
onstat> ?
Interactive Mode: One command per line, and - are optional.
    -rz    repeat option every n seconds (default: 5) and 
            zero profile counts
  MT COMMANDS:
    all   Print all MT information
    ath   Print all threads    
    wai   Print waiting threads
    act   Print active threads
    rea   Print ready threads
    sle   Print all sleeping threads
    spi   print spin locks with long spins
    sch   print VP scheduler statistics
    lmx   Print all locked mutexes
    wmx   Print all mutexes with waiters
    con   Print conditions with waiters
    stk <tid>   Dump the stack of a specified thread
    glo   Print MT global information
    mem <pool name|session id>   print pool statistics.
    seg   Print memory segment statistics.
    rbm   print block map for resident segment
    nbm   print block map for non-resident segments
    afr <pool name|session id> Print allocated poolfragments.
    ffr <pool name|session id> Print free pool fragments.
    ufr <pool name|session id> Print pool usage breakdown
    iov   Print disk IO statistics by vp
    iof   Print disk IO statistics by chunk/file
    ioq   Print disk IO statistics by queue
    iog   Print AIO global information
    iob   Print big buffer usage by IO VP  
    sts   Print max and current stack sizes
    qst   print queue statistics
    wst   print thread wait statistics
    jal   Print all Pload information
    jct   Print Pload control table
    jpa   Print Pload program arguments
    jta   Print Pload thread array
    jmq   Print Pload message queues, jms for summary only
onstat> 
Most of the options are the same as those that you use to gather information about Informix®, with the following exceptions:
jal   Print all Pload information
jct   Print Pload control table
jpa   Print Pload program arguments
jta   Print Pload thread array
jmq   Print Pload message queues, jms for summary only

These options apply only to onpload. You can use the onstat -j command to check the status of a thread, locate the VP and its PID, and then attach a debugger to a particular thread. The options for the onstat utility that do not apply to onpload are not available (for example, onstat -g ses).


Copyright© 2019 HCL Technologies Limited