Oracle-agent僵死进程


1. 现象

1)在Oracle 11.2.0.4环境中存在Zombie processes


2. 检查

2.1 资料

<XXX>agent.bin:在11.2,各个资源的启动、停止和检查都是由agent来执行的。ohasd 会把这些agent启动。

Agent包括两种,一种是ohasd的:
oraagent_grid: 启动/停止/检查/清除ora.asm, ora.evmd, ora.gipcd, ora.gpnpd, ora.mdnsd等资源。
orarootagent_root:启动/停止 /检查/清除 ora.crsd, ora.ctssd, ora.diskmon, ora.drivers.acfs, ora.crf (11.2.0.2)等资源。
oracssdagent_root: 启动/停止/检查 ocssd进程。
oracssdmonitor_root:监控cssdagent进程。

它们的日志位于:<GRID_HOME>/log/<host>/agent/ohasd

另一种是crsd的:
oraagent_grid: 启动/停止/检查/清除 asm, ora.eons, ora.LISTENER.lsnr, SCAN listeners, ora.ons, diskgroup  等资源
oraagent_oracle: 启动/停止/检查/清除 service, database 等资源
orarootagent_root : 启动/停止/检查/清除 GNS, VIP, SCAN VIP and network 等资源.
scriptagent_grid:  应用服务定制的服务。

它们的日志位于:<GRID_HOME>/log/<host>/agent/crsd

2.2 检查确认是由ohasd agent产生的子进程

#  ps -ef|head -1;ps -ef| grep 4784806 |grep -v grep
     UID      PID     PPID   C    STIME    TTY  TIME CMD
    root  4981136  4784806   1                  0:00 <defunct>
    root  4784806        1   0   Dec 26      - 1347:15 /oracle/app/11.2.0/grid/bin/orarootagent.bin
#
# ps -ef|head -1;ps -ef|grep orarootagent.bin |grep -v grep
     UID      PID     PPID   C    STIME    TTY  TIME CMD
    root  4784806        1   0   Dec 26      - 1347:01 /oracle/app/11.2.0/grid/bin/orarootagent.bin
    root  4916142        1   0   Dec 26      - 7578:42 /oracle/app/11.2.0/grid/bin/orarootagent.bin
#
# cat /oracle/app/11.2.0/grid/log/orcl2/agent/ohasd/orarootagent_root/orarootagent_root.pid
4784806
# cat /oracle/app/11.2.0/grid/log/orcl2/agent/crsd/orarootagent_root/orarootagent_root.pid
4916142
#
-- 确认4981136进程是ohasd agent的子进程

ohasd - orarootagent.bin进程是11.2 Gird Infrastructure的Agent后台代理进程,负责监控ora.ctssd、ora.diskmon、ora.crsd、ora.driver.acfs等资源。

3. 处理方案

可以通过kill orarootagent.bin进程达到消除zombie进程的目的,orarootagent.bin进程被KILL之后会被重新respawned启动。
原文地址:https://www.cnblogs.com/binliubiao/p/12519629.html