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

What are Managed Services, and Why Should You Care?

Take a look at Laurie McCabe’s recent article on IT-Director.com to get the lowdown on why IT Managed Services are so important to the small to medium business.

  • Share/Bookmark

No Comments | Filed under DB2 Administration

Simplifying DB2 Adiministration & Development with IBM Data Studio

In this DB2 Chat with the Lab webinar, find out how database developers and DBAs can get their jobs done more efficiently and with less risk using the no-charge capabilities in Data Studio 2.2, and the value-added capabilities in Optim solutions. Experts from the IBM labs will walk you through up and running with Data Studio and cover frequently asked “how-to” questions for using a variety of the features including integration with the new DB2 9.7.

  • Share/Bookmark

No Comments | Filed under DB2, DB2 Administration

Did your DBA team get burnt this summer?

As the bbq summer progressed, temperatures rose (well, there was that one week in May) and we all disappeared off on our Staycations, were the frazzled DBA team the only ones who got burnt?

Burnt-out that is.  There are certain times during the year when the office looks distinctly empty.  Summer holidays and Christmas being the most obvious.  If you add a few summer colds (we’re not mentioning swine flu) and a couple of days off sick, things can get really sticky.

We all know how vital it is that our business critical databases are kept running and we’re able to give customers the high levels of support they depend on.  However, this can be difficult during times when DBA teams are thin on the ground.  Even more so if your DBA team provides cover 24/7.

Knowing that you have a back-up support team can help you to better plan for those times when the team is under extra pressure whether that’s due to holidays, sickness or seasonal spikes in business.

With a Consultancy on Demand contract you can purchase a block of hours and allocate them to be used during the year, when you need that little bit of extra support.

If your DB2 databases are used to support mission critical applications you’re likely to benefit from our Remote DBA service.  Almost like an insurance policy on your database, Remote DBA is there if and when things go wrong. With Proactive Monitoring you can be safe in the knowledge that nothing will get missed.

  • Share/Bookmark

No Comments | Filed under DB2, DB2 Administration, DB2 Monitoring