红联Linux门户
Linux帮助

Linux下使用ps命令来查看Oracle相关的进程

发布时间:2014-11-02 10:38:20来源:linux网站作者:pan_tian

Linux下可以使用ps命令来查看Oracle相关的进程。


Oracle Listener

这个命令会列出Oracle Net Listener的进程

[oracle@ linux ~]$ ps -ef | grep tnslsnr 
oracle1999 29986  0 09:47 pts/200:00:00 grep tnslsnr 
oracle3647 1  0 Jul03 ?00:00:34 /u01/oracle/mc3yd213/db/tech_st/11.1.0/bin/tnslsnr mc3yd213 -inherit 
oracle6431 1  0 Jul03 ?00:00:00 /u01/oracle/mc3yd213/apps/tech_st/10.1.2/bin/tnslsnr APPS_mc3yd213 -inherit 
oracle   13616 1  0 May27 ?00:00:40 /u01/oracle/mc3yd213/apps/tech_st/10.1.2/bin/tnslsnr LISTENER -inherit 
[oracle@ linux ~]$


Oracle Background Process

[oracle@ linux ~]$ ps -ef | grep -i "ora_" 
oracle1887 1  0 09:42 ?00:00:00 ora_w000_mc3yd213 
oracle2159 1  0 09:54 ?00:00:00 ora_j000_mc3yd213 
oracle2167 29986  0 09:55 pts/200:00:00 grep -i ora_ 
oracle3516 1  0 Jul03 ?00:02:00 ora_pmon_mc3yd213 
oracle3518 1  0 Jul03 ?00:02:08 ora_vktm_mc3yd213 
oracle3522 1  0 Jul03 ?00:00:27 ora_diag_mc3yd213 
oracle3524 1  0 Jul03 ?00:00:18 ora_dbrm_mc3yd213 
oracle3526 1  0 Jul03 ?00:00:35 ora_psp0_mc3yd213 
oracle3528 1  0 Jul03 ?00:05:59 ora_dia0_mc3yd213 
oracle3530 1  0 Jul03 ?00:00:19 ora_mman_mc3yd213 
oracle3532 1  0 Jul03 ?00:01:06 ora_dbw0_mc3yd213 
oracle3534 1  0 Jul03 ?00:02:53 ora_lgwr_mc3yd213 
oracle3536 1  0 Jul03 ?00:02:08 ora_ckpt_mc3yd213 
oracle3538 1  0 Jul03 ?00:01:36 ora_smon_mc3yd213 
oracle3540 1  0 Jul03 ?00:00:06 ora_reco_mc3yd213 
oracle3542 1  0 Jul03 ?00:02:01 ora_mmon_mc3yd213 
oracle3544 1  0 Jul03 ?00:03:20 ora_mmnl_mc3yd213 
oracle3564 1  0 Jul03 ?00:00:09 ora_fbda_mc3yd213 
oracle3569 1  0 Jul03 ?00:00:16 ora_qmnc_mc3yd213 
oracle3584 1  0 Jul03 ?00:00:36 ora_q000_mc3yd213 
oracle3586 1  0 Jul03 ?00:00:15 ora_q001_mc3yd213 
oracle3690 1  0 Jul03 ?00:02:30 ora_cjq0_mc3yd213 
oracle3707 1  0 Jul03 ?00:00:28 ora_smco_mc3yd213 
oracle7676 1  0 Jul03 ?00:42:49 ora_m000_mc3yd213 
[oracle@ linux ~]$ 

eg.ora_pmon_mc3yd213 is PMON process,PMON (Process MONitor) is an Oracle background process created when you start a database instance. The PMON process will free up resources if a user process fails (eg. release database locks).

这些后台进程,从数据库里也是能查到的,可以使用下边这个SQL来查后台进程,在program列中,你就能看到SMON,MMON,CKPT,PMON,MMAN,MMNL...后台进程

select * FROM v$session WHERE type ='BACKGROUND';

关于后台进程,可以参见Oracle Background processes


Oracle Management Agent

[oracle@ linux ~]$ ps -ef | grep emagent 
oracle2097 29986  0 09:51 pts/200:00:00 grep emagent 
oraem 3130 1  0 May24 ?00:08:57 /opt/oracle/oraem/agent10g/perl/bin/perl /opt/oracle/oraem/agent10g/bin/emwd.pl agent /opt/oracle/oraem/agent10g/sysman/log/emagent.nohup 
oraem 3150  3130  0 May24 ?00:25:56 /opt/oracle/oraem/agent10g/bin/emagent 
[oracle@ linux ~]$