阅读内容 

深入了解DB2 Universal Database进程(3)

[日期:2005-11-01] 来源:中国计算机报  作者:佚名 [字体: ]
示例

  下面的例子显示了在AIX上运行ps -ef命令时可能得到的输出: 

DB2start后:
    root 49504     1   0 13:13:07             -  0:00 DB2wdog
DB2inst1 22142 49180   0 13:13:10      -  0:00 db2gds
DB2inst1 43072 49180   0 13:13:17      -  0:00 db2syslog
DB2inst1 45294 74134   0 12:12:43  pts/2  0:00 /usr/bin/ksh
DB2inst1 49180 49504   0 13:13:10      -  0:00 db2sysc
DB2inst1 55920 49180   0 13:13:19      -  0:00 db2resync
DB2inst1 59012 22142   0 13:13:19      -  0:00 db2srvlst
DB2inst1 60680 49180   0 13:13:17      -  0:00 db2ipccm

数据库管理器配置文件有下面的设置,他们影响到你最初看到的进程:

Max number of existing agents           (MAXAGENTS) = 200
Agent pool size                                 (NUM_POOLAGENTS) = 100(calculated)
Initial number of agents in pool          (NUM_INITAGENTS) = 0

  因为NUM_INITAGENTS为0,在DB2start时没有"db2agent(idle)"进程显示。如果在db2agent前把NUM_INITAGENTS设置为5,在运行db2start后将显示下面的额外进程:

DB2inst1 35542 59814   0 16:25:57      -  0:00 db2agent (idle)
DB2inst1 43096 59814   0 16:25:57      -  0:00 db2agent (idle)
DB2inst1 49628 59814   0 16:25:57      -  0:00 db2agent (idle)
DB2inst1 58170 59814   0 16:25:57      -  0:00 db2agent (idle)
DB2inst1 64012 59814   0 16:25:57      -  0:00 db2agent (idle)



  在连接到数据库SAMPLE后(NUM_INITAGENTS仍然为0):

root 49504     1   0 13:13:07    -  0:00 DB2wdog
DB2inst1 25844 35124   0 16:04:50    -  0:00 db2pfchr
DB2inst1 35124 65638   0 16:04:17    -  0:00 db2gds
DB2inst1 35540 35124   0 16:04:50    -  0:00 db2loggr (SAMPLE)
DB2inst1 41940 65638   0 16:04:19    -  0:00 db2resync
DB2inst1 45058 35124   0 16:04:50    -  0:00 db2pfchr
DB2inst1 49300 35124   0 16:04:19    -  0:00 db2srvlst
DB2inst1 49626 35124   0 16:04:50    -  0:00 db2dlock (SAMPLE)
DB2inst1 55852 65638   0 16:04:17    -  0:00 db2ipccm
DB2inst1 58168 35124   0 16:04:50    -  0:00 db2loggw (SAMPLE)
DB2inst1 59048 35124   0 16:04:50    -  0:00 db2pfchr
DB2inst1 64010 55852   0 16:04:50    -  0:00 db2agent (SAMPLE)
DB2inst1 65638 22238   0 16:04:17    -  0:00 db2sysc
DB2inst1 70018 35124   0 16:04:50    -  0:00 db2pclnr
DB2inst1 72120 35124   0 16:04:51    -  0:00 db2event (DB2DETAILDEADLOCK)
DB2inst1 74198 65638   0 16:04:17    -  0:00 db2syslog
DB2inst1 74578     1   0 16:04:47    -  0:00 /home/db2inst1/sqllib/bin/db2bp
  50112C14631 5


  在连接到SAMPLE数据库后,出现了"DB2agent(SAMPLE)"进程。这个进程显示实际上有一个到SAMPLE数据库的连接。如果我们运行下面的命令:

DB2 connect reset


  DB2agent(SAMPLE)将变成db2agent(idle)。这是因为NUM_POOLAGENTS设置为大于0,这意味着代理仍然分配在缓冲池中,虽然它时空闲的。如果NUM_POOLAGENTS设置为0,那么在"connect reset"后,就没有db2agent进程运行了。

  SAMPLE数据库的数据库配置文件有下面的设置:

Number of asynchronous page cleaners   (NUM_IOCLEANERS) = 1
Number of I/O servers                   (NUM_IOSERVERS) = 3

  注意有三个DB2pfchr进程,他们与NUM_IOSERVERS的值相对应,有一个db2pclnr进程与NUM_IOCLEANERS的值相对应。

总结

  还有许多其它的进程可能出现或者不出现,这依赖于不同的DB2行为和配置设定。我们演示了怎样调查哪个进程正在运行、这些进程显示什么信息、以及它们受到数据库设置怎样的影响的示例。现在你能使用这些知识提高管理DB2数据库的能力。

阅读:
录入:

推荐 】 【 打印
上一篇:DB2编程序技巧 (十)
下一篇:
相关新闻      
本文评论       全部评论
发表评论
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款


点评: 字数
姓名:
Advertisement
内容查询


Advertisement