db2ptree - Show DB2 Process Tree for Sun Solaris
There is the special system command db2ptree which
is applicable only on the Sun Solaris platform and it is installed as a part of
DB2 version 6, 7 or 8 installation on Sun Solaris.
db2ptree is used to show the DB2 processes tree because the ps
command on Sun's operating system does not provide the real process name of the
DB2 processes (instead ps shows only "db2sysc"). With db2ptree we
can see all the DB2 instance processes in the tree structure with the process
real names (db2wdog, db2pfchr, db2resyn, db2gds...).
Command switches:
-i <instance>
-p <pid> Show tree from pid down
-s Show db2watch status for each process
-c Show process uid credentials
-v Show process arguments as well
db2ptree called without any parameters shows the DB2
processes of your current instance.
DB2 regular process list on Solaris:
>> ps -edf | grep db2 | more
...
db2udb1 15318 5126 0 19:37:14 ? 0:00 db2sysc
db2udb1 5443 5128 0 21:40:21 ? 0:01 db2sysc
db2udb1 5117 5108 0 21:40:08 ? 0:00 db2sysc
db2udb1 5116 5105 0 21:40:08 ? 0:00 db2sysc
db2udb1 5115 5107 0 21:40:08 ? 0:00 db2sysc
root 5110 1 0 21:40:07 ? 0:00 db2sysc
root 5105 1 0 21:40:07 ? 0:00 db2sysc
root 5106 1 0 21:40:07 ? 0:00 db2sysc
root 5107 1 0 21:40:07 ? 0:00 db2sysc
root 5108 1 0 21:40:07 ? 0:00 db2sysc
db2udb1 5118 5110 0 21:40:08 ? 0:00 db2sysc
db2udb1 5127 5119 0 21:40:08 ? 0:00 db2sysc
root 5126 5119 0 21:40:08 ? 0:13 db2sysc
root 5128 5117 0 21:40:09 ? 0:01 db2sysc
root 5129 5116 0 21:40:09 ? 0:02 db2sysc
root 5130 5115 0 21:40:09 ? 0:01 db2sysc
root 5131 5118 0 21:40:09 ? 0:02 db2sysc
db2udb1 5134 5118 0 21:40:09 ? 0:00 db2sysc
db2udb1 5135 5115 0 21:40:09 ? 0:00 db2sysc
db2udb1 5136 5117 0 21:40:09 ? 0:00 db2sysc
...
From the above output, you cant recognize the different
db2 processes. Using the db2ptree system command (below), we can see specific
processes:
>> db2ptree | grep 5110
5110 db2wdog 4 ' watchdog process
>> db2ptree | grep 5118
5118 db2sysc 4 ' system controller process
>> db2ptree | grep 5131
5131 db2gds 4 ' generic demon spawner
or the full db2 database process tree:
>> db2ptree
14438 db2wdog 1
14504 db2sysc 1
14512 db2gds 1
4182 db2agnta (ARTIST) 1
14523 db2resyn 1
14524 db2srvlst 1
14585 db2fmtlg 1
14587 db2cart 1
17915 db2loggr (ARTIST) 1
18082 db2dlock (ARTIST) 1
18173 db2pfchr 1
18306 db2pclnr 1
24851 db2event 1
14514 db2fcmdm 1
14521 db2pdbc 1
14522 db2ipccm 1
24755 db2agent (instance) 1
14527 db2panic (idle) 1
24676 db2govd
It is very important for every
DBA to fully understand each database process listed in the output from the
db2ptree command.