Techie Tip – I need to find out what DB2 LUW V9.5 processes are running on a Linux machine

Question:

I need to find out what DB2 LUW V9.5 processes are running on a Linux machine?   Is there another way other than ‘ps –ef’ or ‘ps aux’ than grepping out the result set?

 

Answer:

There is.  A script by the name db2_local_ps that does the work for you.  It saves time because one does not have to fumble around figuring out the command syntax  to perform the actions to achieve similar results.

 

Actually, there are three scripts that are linked together to do the work.

 

‘db2_local_ps’ is the initial script that is called.  This script checks for the DB2INSTANCE environment variable.  If it is set and valid, you progress.  If not, it exits and a usage message is displayed.

 

The other scripts that are in the chain that are called in order are ‘db2nps’ and ‘db2gdep’, both shell scripts.  ‘db2nps’ 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.

 

Happy Trails. 

 

 

 

 

 

  • Share/Bookmark

1 Comment | Filed under Clair Ross, DB2, DB2 9.5, DB2 Administration, DB2 LUW, Techie Tips

Migration issues from DB2 V8.2 to DB2 9.5 on Sun Solaris 64-bit

1.      During a recent migration exercise at a customer site the following error was encountered whilst migrating one of the databases:

2009-04-08-14.21.06.625141+060 E61438A838         LEVEL: Error (OS)

PID     : 18892                TID  : 164         PROC : db2sysc 0

INSTANCE: db2inst1             NODE : 000

EDUID   : 164                  EDUNAME: db2pclnr (MQTRACK) 0

FUNCTION: DB2 UDB, oper system services, sqloLioAIOCollect, probe:100

MESSAGE : ZRC=0×870F0024=-2029060060=SQLO_MEM “out of memory”

          DIA8533C The system memory limit was reached.

CALLED  : OS, -, aio_return

OSERR   : ENOMEM (12) “Not enough space”

DATA #1 : File handle, PD_TYPE_SQO_FILE_HDL, 8 bytes

0xFFFFFFFF643FD328 : 0000 0005 0000 0000                        ……..

DATA #2 : unsigned integer, 8 bytes

8192

DATA #3 : signed integer, 8 bytes

6684672

DATA #4 : String, 105 bytes

Search for ossError*Analysis probe point after this log entry for further

self-diagnosis of this problem.

 

2009-04-08-14.21.06.628605+060 I62277A2206        LEVEL: Error (OS)

PID     : 18892                TID  : 164         PROC : db2sysc 0

INSTANCE: db2inst1             NODE : 000

EDUID   : 164                  EDUNAME: db2pclnr (MQTRACK) 0

FUNCTION: DB2 Common, OSSe, ossErrorIOAnalysis, probe:100

CALLED  : OS, -, aio_return

OSERR   : ENOMEM (12) “Not enough space”

DATA #1 : String, 110 bytes

A total of 5 analysis will be performed :

 - User info

 - ulimit info

 - Memory info

 

 Target file handle = 5

DATA #2 : String, 190 bytes

  Real user ID of current process       = 10002

  Effective user ID of current process  = 10002

  Real group ID of current process      = 1116

  Effective group ID of current process = 1116

DATA #3 : String, 353 bytes

Current process limits (unit in bytes except for nofiles) :

  mem     (S/H) = unlimited / unlimited

  core    (S/H) = unlimited / unlimited

  cpu     (S/H) = unlimited / unlimited

  data    (S/H) = unlimited / unlimited

  fsize   (S/H) = unlimited / unlimited

  nofiles (S/H) = 65536 / 65536

  stack   (S/H) = 8388608 / unlimited

  rss     (S/H) = 0 / 0

DATA #4 : String, 119 bytes

System RAM information (in megabytes) :

  Total       = 8064

  Free        = 4572

  Available   = -1

  Addressable = -1

DATA #5 : String, 69 bytes

Swap space information (in megabytes) :

  Total = 8194

  Free  = 8194

DATA #6 : String, 117 bytes

Virtual Memory Information (in megabytes) :

  Total     = 16258

  Reserved  = -1

  Available = -1

  Free      = 12766

CALLSTCK:

  [0] 0xFFFFFFFF781947B4 ossLogSysRC + 0×3A0

  [1] 0xFFFFFFFF78186F60 ossErrorNameMapSystem + 0×1AC0

  [2] 0xFFFFFFFF7C45F250 sqloSystemErrorHandler + 0×860

  [3] 0xFFFFFFFF7C4B5A94 __1cUSQdDLO_LIO_HANDLE_DATARsqloLioAIOCollect6MLpnXSQdDLO_LIO_COLLECT_STATUS_ppnLSQdDLO_IO_REQdD__i_ + 0×6E4

  [4] 0xFFFFFFFF7C4B646C sqloLioCollectNBlocks + 0×51C

  [5] 0xFFFFFFFF7ADD789C __1cWsqlbClnrCollectSomeAIO6FpnMSQdDLB_CLNR_CB_L_v_ + 0×74

  [6] 0xFFFFFFFF7ADD82D4 __1cVsqlbClnrCollectAllAIO6FpnMSQdDLB_CLNR_CB__v_ + 0×74

  [7] 0xFFFFFFFF7ADDAAFC __1cQsqlbClnrFindWork6FpnMSQdDLB_CLNR_CB__i_ + 0×11F4

  [8] 0xFFFFFFFF7ADDBAE8 __1cSsqlbClnrEntryPoint6FpCI_v_ + 0xD0

  [9] 0xFFFFFFFF7C4CE414 sqloEDUEntry + 0×3A4

 

DB2 subsequently went into a panic and the instance crashed. This happened for another database as well. We resolved the error by changing the stack size value in unlimit from 8K to “unlimited”.

  • Share/Bookmark

No Comments | Filed under DB2, DB2 8, DB2 9.5, Iqbal Goralwalla, Techie Tips

DB2 9.5 not available for Linux on IA64

For those of you using Linux on the Itanium-64 bit (IA64) platform, note that DB2 9.5 is not available for Linux on IA64. The last supported DB2 version for Linux on IA64 is DB2 9. This is because Linux on IA64 is not a high growth platform for IBM and in fact quite the opposite. Customers appear to be choosing Linux on x86-64 in droves but that is not the case for Linux on IA64 . Moreover, unless demands from the marketplace change, there is no plan for supporting DB2 for Linux on IA64 going forward.

Here are the links which suggest that DB2 9.5 is not available for the Linux on Itanium-64 bit (IA64) platform: 

http://www.ibm.com/developerworks/wikis/display/im/SUSE+Linux+Enterprise+Server+%28SLES%29+10+-+DB2+9.5 

while DB2 9 is supported on Linux on Itanium-64 bit (IA64): 

http://www.ibm.com/developerworks/wikis/display/im/SUSE+Linux+Enterprise+Server+%28SLES%29+10+-+DB2+9 

Iqbal

  • Share/Bookmark

No Comments | Filed under DB2, DB2 9.5, IA64, IBM, Iqbal Goralwalla, Linux, Techie Tips