当前位置:数据库 > DB2 >>

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

示例

  下面的例子显示了在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)
示例

  下面的例子显示了在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)
 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数据库的能力。

Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,