1.db2_local_ps : This script checks environment variables of the DB2INSTANCE. If it is set and valid, you can proceed(orig: progress); otherwise, it will quit and display a usage message. The other scripts in the chain are called by sequence ‘db2nps’ and ‘db2gdep’ which are both shell scripts.(orig: The other scripts that are in the chain that are called in order by ‘db2nps’ and ‘db2gdep’, both shell scripts.)
2.dbnps : obtains the process name and number and calls the script ‘db2gdep ’ for each process for the information on that specific process.
The output from the ‘db2_local_ps’ follows:
cvross@myhost:~> db2_local_ps
Node 0
UID PID PPID C STIME TTY TIME CMD
db2inst1 20979 20978 0 08:21 pts/1 00:00:00 db2sysc 0
root 20980 20979 0 08:21 pts/1 00:00:00 db2ckpwd 0
root 20981 20979 0 08:21 pts/1 00:00:00 db2ckpwd 0
root 20982 20979 0 08:21 pts/1 00:00:00 db2ckpwd 0
root 20983 20979 0 08:21 pts/1 00:00:00 db2pmd 0
db2inst1 20984 20979 0 08:21 pts/1 00:00:00 db2gds 0
db2inst1 20985 20979 0 08:21 pts/1 00:00:00 db2licc 0
db2inst1 20986 20979 0 08:21 pts/1 00:00:00 db2ipccm 0
db2inst1 20987 20979 0 08:21 pts/1 00:00:00 db2tcpcm 0
db2inst1 20988 20979 0 08:21 pts/1 00:00:00 db2tcpcm 0
db2inst1 20992 20979 0 08:21 pts/1 00:00:00 db2resync 0
db2inst1 20994 20979 0 08:21 pts/1 00:00:00 db2acd 0 ,0,0,0,1,0,0,0,897e0c,14,1e014,2,0,1,11fd0,0×11f90000,0×11f90000,1610000,8b001e,2,530011
db2inst1 21201 20984 0 08:23 pts/1 00:00:00 db2logts (SAMPLEA) 0
db2inst1 21202 20984 0 08:23 pts/1 00:00:00 db2logmgr (SAMPLEA) 0
db2inst1 21203 20984 0 08:23 pts/1 00:00:00 db2loggr (SAMPLEA) 0
db2inst1 21207 20984 0 08:23 pts/1 00:00:00 db2loggw (SAMPLEA) 0
db2inst1 21208 20984 0 08:23 pts/1 00:00:00 db2lfr (SAMPLEA) 0
db2inst1 21209 20984 0 08:23 pts/1 00:00:00 db2dlock (SAMPLEA) 0
db2inst1 21210 20984 0 08:23 pts/1 00:00:00 db2pclnr 0
db2inst1 21211 20984 0 08:23 pts/1 00:00:00 db2pfchr 0
db2inst1 21212 20984 0 08:23 pts/1 00:00:00 db2pfchr 0
db2inst1 21213 20984 0 08:23 pts/1 00:00:00 db2pfchr 0
db2inst1 21214 20984 0 08:23 pts/1 00:00:00 db2stmm (SAMPLEA) 0
db2inst1 21215 20984 0 08:23 pts/1 00:00:00 db2taskd (SAMPLEA) 0
db2inst1 21216 20984 0 08:23 pts/1 00:00:00 db2evmgi (DB2DETAILDEADLOCK) 0
db2inst1 21200 20986 0 08:23 pts/1 00:00:00 db2agent (SAMPLEA) 0
db2inst1 21471 20986 0 08:26 pts/1 00:00:00 db2agent (idle) 0
db2inst1 21472 20986 0 08:26 pts/1 00:00:00 db2agent (idle) 0
This is definitely something worthy to know about. One could alias the command with a name that is more useful for a specific computing environment. Or, just look at the code and roll your own version.
The only caveat with this command is that the db2profile needs to be sourced or the DB2 environment variables need to be loaded in your user profile.