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

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

Good features for ActiveState Perl on Linux

This is the newest release of Perl.  The releases are starting to appear with more and more features that have been advertised for Perl 6.
 
The feature that is very nice about this is on linux, the release is installed in it’s own directory structure in /opt.  It is up to the user to set the environment to use it.  This allows the user to have more that one perl environment on the machine at one time.
 
Also the way to update is very sweet.  The ppm program has both a shell and a graphical interface.  The graphical has been written in tk and is well laid out.  Very nice.
 
The Database Interfaces are also there for ODBC, Oracle and most of the Open Source types. 
 
This is a very good release.
 
I am also checking out the ActiveState Python and Tcl releases as well.  The reason for investigating these releases is that tools that we use can be customized to use these distributions for coherency and stability.  Just thinking acrossed platforms – AIX, Windows, Sun, Linux, HP and the such.
  • Share/Bookmark

No Comments | Filed under Clair Ross, DB2, Information Management, Linux

Tooling for the future?

Hey everyone. I’ve started to think about the various tools which I’ve put together in the last few years. This is stuff that I’ve written to make my life easier – well, nobody likes to work too hard, do they?! It has done everything from allowing me to automate significant work items on customer sites, to just presenting information in a more managable way.
 
I’m now thinking about ideas for other tooling that would help make tedious or fiddly tasks simpler. Most of the current tooling is Windows based. Some of the tools have been ported to AIX and Linux (premig and some driver DLLs) but the others could make it over there as well.
 
One of my favourites is Restore, which does the whole redirected restore, including the tablespace container work. It’s able to do this because it maps out the tablespace data in the backup, so knows what it needs to reapply. This can then be done with specific targetted paths or files in the config file, or with generic pathing. Works with backups on the filesystem or in TSM. Quite neat, really!
 
More on my DB2 tooling thoughts to come….
  • Share/Bookmark

No Comments | Filed under DB2, DB2 Tools, James Gill