IBM Books

Troubleshooting Guide


Using the pstat Command

The pstat command returns information on which processes are running, and which threads within each process are running. This information includes current status (ready, blocked, and so on), and current priorities.

This command helps you determine:

For information on DB2 processes and threads, see Chapter 13, The DB2 Process Model.

The pstat command displays the process ID that has been assigned for tracing on a per-process basis and that is used to get global system information.

Use the pstat command from the OS/2 command prompt. Its syntax is as follows:

                                  .-----------------.
                                  V                 |
>>-+--------+---+------+---pstat-----+-----------+--+----------><
   '-drive:-'   '-path-'             +-/c--------+
                                     +-/s--------+
                                     +-/l--------+
                                     +-/m--------+
                                     '-/p:--pid--'
 

Parameters

If you use the pstat command without specifying any options, all process information will be displayed. If you want particular information only, use one or more of the following parameters:

/C
This switch displays the current process- and thread-related information on the system. It returns the following information for each process:

It returns the following information for each thread:

/S
This switch displays system semaphore information for each thread on the system. It displays the following information for each thread:

/L
This switch displays the run-time libraries that are linked for each process on the system. It returns the following information for each process:

/M
This switch displays the named shared-memory information for each process on the system:

/P: pid
(where pid is the hexadecimal process ID to be displayed) This switch displays information related to the specified process. It returns the following information for the specified process ID:

It returns the following information for each thread of the specified process ID:

The following sample shows an example of pstat output:
                    Process and Thread Information
         Parent
Process  Process  Session  Process                   Thread
  ID       ID       ID      Name                       ID    Priority   Block ID   State
 0279     000A      12     E:\SQLLIB\BIN\DB2SYSC.EXE   01      0200     FE11E6C4   Block
                                                       02      0200     FDFE7870   Block
                                                       03      0200     FE11E544   Block
                                                       04      0200     FE1191D8   Block
                                                       05      0200     FDF58ECC   Block
                                                       06      0200     FE034B24   Block
                                                       07      0200     FE11DA34   Block
                                                       08      0200     FE11DA24   Block
                                                       09      0200     FE11DA58   Block
                                                       0A      0200     FE11DA14   Block


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]