Using the onstat -j option

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 24 16:11:30 1995

SHMBASE0x4400000
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 24 16:11:37 1995

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 onstat to gather information about the oninit process, onstat uses information from $INFORMIXDIR/etc/$onconfig to locate shared memory. When you use onstat to gather information about onpload, you must give onstat 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 onstat to attach to onpload shared memory and to enter interactive mode. You can then enter ? or any other bogus request to see a usage message displayed. An example follows:
onstat> ?
Interactive Mode: One command per line, and - are optional.
-rzrepeat option every n seconds (default: 5) and 
zero profile counts
  MT COMMANDS:
allPrint all MT information
athPrint all threads
waiPrint waiting threads
actPrint active threads
reaPrint ready threads
slePrint all sleeping threads
spiprint spin locks with long spins
schprint VP scheduler statistics
lmxPrint all locked mutexes
wmxPrint all mutexes with waiters
conPrint conditions with waiters
stk <tid>Dump the stack of a specified thread
gloPrint MT global information
mem <pool name|session id>print pool statistics.
segPrint memory segment statistics.
rbmprint block map for resident segment
nbmprint 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
iovPrint disk IO statistics by vp
iofPrint disk IO statistics by chunk/file
ioqPrint disk IO statistics by queue
iogPrint AIO global information
iobPrint big buffer usage by IO VP class 
stsPrint max and current stack sizes
qstprint queue statistics
wstprint thread wait statistics
jalPrint all Pload information
jctPrint Pload control table
jpaPrint Pload program arguments
jtaPrint Pload thread array
jmqPrint Pload message queues, jms for summary only
onstat> 
Most of the options are the same as those that you use to gather information about the database server, with the following exceptions:
jalPrint all Pload information
jctPrint Pload control table
jpaPrint Pload program arguments
jtaPrint Pload thread array
jmqPrint Pload message queues, jms for summary only

These options apply only to onpload. You can use onstat -j 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 onstat that do not apply to onpload are not available (for example, -g ses).