| 订阅 | 在线投稿
分享
 
 
 

用Quick Slice获取Oracle进程的线程状态

2008-07-08 07:36:02 编辑來源:互联网 国际版 评论
 
 
本文为【用Quick Slice获取Oracle进程的线程状态】的汉字拼音对照版显示拼音
  yuWindows NTxitongxiangbizaiUnixhuanjingxiaduimeigeOraclejinchengjianshiqiCPU使shiyonglvshihenrongyidezaiNTxitongzhongzhiyouyigeOraclejinchengjioracle.exezaiWindowshuanjingxiaweilededaoOraclejinchengdemeige线xianchengdezhuangtaikeyi使shiyongQuick SliceyigejiyutuxingyonghujiemiandedulichengxutakeyicongMicrosoftwangzhanshangmianfeixiazaigairuanjianshiyongyusuoyouWindowshuanjingxiadeOracle 8ihe9ixiamianshi使shiyongtadefangfa

  1shouxiannixuyaozhaochuyunxingOraclesuoduiyingdesuoyou线xianchengdeidhao

  SQL> select p.spid "Thread ID", b.name "Background Process", s.username

  "User Name",

  s.osuser "OS User", s.status "STATUS", s.sid "Session ID",

  s.serial# "Serial No.",

  s.program "OS Program"

  from v$process p, v$bgprocess b, v$session s

  where s.paddr = p.addr and b.paddr(+) = p.addr;

  

  xiamianshishuchujieguo

  Thread ID Backg User Name OS User STATUS Session ID Serial No.

  OS Program

  ------------ ----- ---------- ---------- -------- ---------- ----------

  20229 PMON Oracle ACTIVE 1 1

  oracle@db02.s0.gc.media.com (PMON)

  20231 DBW0 Oracle ACTIVE 2 1

  oracle@db02.s0.gc.media.com (DBW0)

  20233 LGWR Oracle ACTIVE 3 1

  oracle@db02.s0.gc.media.com (LGWR)

  20235 CKPT Oracle ACTIVE 4 1

  oracle@db02.s0.gc.media.com (CKPT)

  20237 SMON Oracle ACTIVE 5 1

  oracle@db02.s0.gc.media.com (SMON)

  20239 RECO Oracle ACTIVE 6 1

  oracle@db02.s0.gc.media.com (RECO)

  20241 ARC0 Oracle ACTIVE 7 1

  oracle@db02.s0.gc.media.com (ARC0)

  20243 ARC1 Oracle ACTIVE 8 1

  oracle@db02.s0.gc.media.com (ARC1)

  20245 DMON Oracle ACTIVE 9 1

  oracle@db02.s0.gc.media.com (DMON)

  18460 SYS Oracle ACTIVE 17 22737

  sqlplus@db02.s0.gc.media.com (TNS V1-V3)

  15700 Oracle ACTIVE 12 7

  oracle@db02.s0.gc.sj.ipixmedia.com (LNS0)

  zaibenlizhong线xianchenghaowei20229de线xianchengshiPMON线xianchenghaowei20231de线xianchengshiDBW0dengdeng

  2jiexialaizai"c:Program FilesResource Kit."muluzhongshuangjiwenjianqslice.exe

  3.weilexianshijinchengdemeige线xianchengzhaodaojinchengoracle.exebingshuangjizhi

  lingwaiyigetuxingchuangkoujiangtanchubingxianshisuoyoude线xianchengjiqiCPU使shiyongqingkuang

  4.weileshibiezhexie线xianchengqingjiang线xianchenghaoTIDlieheqianmiandeSQLyujude线xianchenghaoliexiangbijiaoweilepipei线xianchenghaoTIDheOraclejinchengIDnixuyao使shiyongkexuejisuanqijiang线xianchenghaoTIDyoushiliujinzhizhuanhuaweishijinzhi

  hongsetiaodaibiaogai线xianchengzhanyongdeneigaishijianlansetiaodaibiaogai线xianchengzhanyongdeyonghushijian原文
 
 
与Windows NT系统相比,在Unix环境下对每个Oracle进程监视其CPU使用率是很容易的。在NT系统中,只有一个Oracle进程(即,oracle.exe)。在Windows环境下,为了得到Oracle进程的每个线程的状态,可以使用Quick Slice,一个基于“图形用户界面”的独立程序。它可以从Microsoft网站上免费下载。该软件适用于所有Windows环境下的Oracle 8i和9i。下面是使用它的方法: ◆1.首先,你需要找出运行Oracle所对应的所有线程的id号。 SQL> select p.spid "Thread ID", b.name "Background Process", s.username "User Name", s.osuser "OS User", s.status "STATUS", s.sid "Session ID", s.serial# "Serial No.", s.program "OS Program" from v$process p, v$bgprocess b, v$session s where s.paddr = p.addr and b.paddr(+) = p.addr; 下面是输出结果: Thread ID Backg User Name OS User STATUS Session ID Serial No. OS Program ------------ ----- ---------- ---------- -------- ---------- ---------- 20229 PMON Oracle ACTIVE 1 1 oracle@db02.s0.gc.media.com (PMON) 20231 DBW0 Oracle ACTIVE 2 1 oracle@db02.s0.gc.media.com (DBW0) 20233 LGWR Oracle ACTIVE 3 1 oracle@db02.s0.gc.media.com (LGWR) 20235 CKPT Oracle ACTIVE 4 1 oracle@db02.s0.gc.media.com (CKPT) 20237 SMON Oracle ACTIVE 5 1 oracle@db02.s0.gc.media.com (SMON) 20239 RECO Oracle ACTIVE 6 1 oracle@db02.s0.gc.media.com (RECO) 20241 ARC0 Oracle ACTIVE 7 1 oracle@db02.s0.gc.media.com (ARC0) 20243 ARC1 Oracle ACTIVE 8 1 oracle@db02.s0.gc.media.com (ARC1) 20245 DMON Oracle ACTIVE 9 1 oracle@db02.s0.gc.media.com (DMON) 18460 SYS Oracle ACTIVE 17 22737 sqlplus@db02.s0.gc.media.com (TNS V1-V3) 15700 Oracle ACTIVE 12 7 oracle@db02.s0.gc.sj.ipixmedia.com (LNS0) 在本例中,线程号为20229的线程是PMON,线程号为20231的线程是DBW0,等等。 ◆2.接下来,在"c:Program FilesResource Kit."目录中双击文件qslice.exe ◆3.为了显示进程的每个线程,找到进程-oracle.exe并双击之。 另外一个图形窗口将弹出并显示所有的线程及其CPU使用情况。 ◆4.为了识别这些线程,请将线程号(TID)列和前面的SQL语句的线程号列想比较。为了匹配线程号(TID)和Oracle进程ID,你需要使用科学计算器将线程号(TID)由十六进制转化为十进制。 红色条代表该线程占用的内核时间;蓝色条代表该线程占用的用户时间。
󰈣󰈤
 
 
>>返回首页<<
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 
 热帖排行
 
 
王朝网络微信公众号
微信扫码关注本站公众号wangchaonetcn
 
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
©2005- 王朝网络 版权所有