Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2010
    Posts
    2

    Unanswered: DB2 ps -ef process list

    Quick question,
    when I do a "ps -ef | grep DB2" I get somthing simalr to:

    dbusr 2993 2967 0 Oct 9 ? 0:02 db2logts (DB2xx) 0
    dbusr 2995 2967 0 Oct 9 ? 21:58 db2loggr (DB2xx) 0

    What does the 0 mean at the far right side of the process name? Is that the counnection count? Please explain.

    any docs or reference would be great!

    Thanks in advance.
    Last edited by Knight31337; 12-11-10 at 15:58.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Those are processes related to DB2 transaction logging. The main DB2 process is db2sysc, so you proably want to use lower case db2 (or use the -i option) on your grep. The '"0" is probably the partition number, which is always zero unless you are using DPF.

    Starting with version 9.5, DB2 uses a threaded model, so to see each connection you may want to use the db2pd command (see the Command Reference manual for the appropriate options for db2pd).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Dec 2010
    Posts
    2
    Thanks for the reply, I was doing a grep of capital DB2 to get the list from (DB2xx). I guess thats the SID name in oracle terms. It was speculated that the number after the process could be used to denote the number if any (0 none in our case) of connections to the database. I'm not a db2 guy myself so wanted to confirm.
    I would still like to find some documentation as to what the number means but if this is not a connection count what is the best way to see the connections to the server?

    I found a better example of the process list and number at the far right side at:
    http://publib.boulder.ibm.com/infoce.../r0051955.html
    UID PID PPID C STIME TTY TIME CMD
    db2inst1 3254 3253 0 14:04 pts/1 00:00:00 db2sysc 0
    root 3255 3254 0 14:04 pts/1 00:00:00 db2ckpwd 0
    root 3256 3254 0 14:04 pts/1 00:00:00 db2ckpwd 0
    root 3257 3254 0 14:04 pts/1 00:00:00 db2ckpwd 0
    root 3266 3254 0 14:04 pts/1 00:00:00 db2gds 0
    db2inst1 3267 3254 0 14:04 pts/1 00:00:00 db2licc 0
    db2inst1 3268 3254 0 14:04 pts/1 00:00:00 db2ipccm 0
    db2inst1 3269 3254 0 14:04 pts/1 00:00:00 db2tcpcm 0
    db2inst1 3271 3254 0 14:04 pts/1 00:00:00 db2resync 0
    db2inst1 3273 3254 0 14:04 pts/1 00:00:00 db2acd ,0,0,0,1,0,0,897b50,...
    db2inst1 3297 3266 0 14:04 pts/1 00:00:00 db2loggr (SAMPLE) 0
    db2inst1 3299 3266 0 14:04 pts/1 00:00:00 db2loggw (SAMPLE) 0
    db2inst1 3300 3266 0 14:04 pts/1 00:00:00 db2lfr (SAMPLE) 0
    db2inst1 3301 3266 0 14:04 pts/1 00:00:00 db2dlock (SAMPLE) 0
    db2inst1 3303 3266 0 14:04 pts/1 00:00:00 db2pclnr 0
    db2inst1 3313 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3314 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3315 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3316 3266 0 14:05 pts/1 00:00:00 db2stmm (SAMPLE) 0
    db2inst1 3317 3266 0 14:05 pts/1 00:00:00 db2taskd (TOOLSDB) 0
    db2inst1 3318 3266 0 14:05 pts/1 00:00:00 db2taskd (SAMPLE) 0
    db2inst1 3319 3266 0 14:05 pts/1 00:00:00 db2stmm (TOOLSDB) 0
    db2inst1 3320 3266 0 14:05 pts/1 00:00:00 db2evmgi (DB2DETAILDEADLOCK) 0
    db2inst1 3321 3266 0 14:05 pts/1 00:00:00 db2evmgi (DB2DETAILDEADLOCK) 0
    db2inst1 3341 3266 0 14:05 pts/1 00:00:00 db2loggr (TOOLSDB) 0
    db2inst1 3343 3266 0 14:05 pts/1 00:00:00 db2loggw (TOOLSDB) 0
    db2inst1 3344 3266 0 14:05 pts/1 00:00:00 db2lfr (TOOLSDB) 0
    db2inst1 3345 3266 0 14:05 pts/1 00:00:00 db2dlock (TOOLSDB) 0
    db2inst1 3346 3266 0 14:05 pts/1 00:00:00 db2pclnr 0
    db2inst1 3347 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3348 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3349 3266 0 14:05 pts/1 00:00:00 db2pfchr 0
    db2inst1 3270 3268 2 14:04 pts/1 00:00:01 db2agent (TOOLSDB) 0
    db2inst1 3285 3268 0 14:04 pts/1 00:00:00 db2agent (SAMPLE) 0

    Thanks again for the help.
    Last edited by Knight31337; 12-11-10 at 18:53.

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by Knight31337 View Post
    what is the best way to see the connections to the server?
    db2 list applications

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Quote Originally Posted by Knight31337 View Post
    Thanks for the reply, I was doing a grep of capital DB2 to get the list from (DB2xx). I guess thats the SID name in oracle terms. It was speculated that the number after the process could be used to denote the number if any (0 none in our case) of connections to the database. I'm not a db2 guy myself so wanted to confirm.
    I would still like to find some documentation as to what the number means but if this is not a connection count what is the best way to see the connections to the server?
    I already told you what the 0 means in my previous post. You probably don't know what DPF is if you are not familiar with DB2, but since you are not using DPF, you only have NODE 0 and it will always be 0 on your system. If you had DPF with multiple logical nodes on that server, each node would have its own processes with a node number.

    To see the connections, use the appropriate db2pd command or do a db2 list applications show detail.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •