使用PsList查看Windows上Oracle的線程等信息

通過這個小文兒,給大家介紹並演示一下Window操作系統上的一個查看進程的小工具pslist,可以通過這個小工具查看得到Oracle線程等相關信息。

1.截止到今天09.08.05,能得到的最新版本是PsList v1.28,下載地址如下

http://technet.microsoft.com/en-us/sysinternals/bb896682.aspx

2.解壓之

3.爲便於在CMD中直接使用,方法如下
1)第一種方法是,修改環境變量,添加指向包含pslist.exe命令的目錄
2)第二種方法是,將解壓後的文件統統拷貝到windows的系統目錄中
對於我本機XP操作系統,對應的系統目錄如下:
C:/>cd %SystemRoot%/system32
C:/WINDOWS/system32>        

4.不加參數使用PsList查看本機啓動的Oracle進程相關信息
通過Thd列可以看到oracle進程中包含22個線程
C:/>pslist oracle

pslist v1.28 - Sysinternals PsList
Copyright ? 2000-2004 Mark Russinovich
Sysinternals

Process information for HOUSWLT:

Name                Pid Pri Thd  Hnd   Priv        CPU Time    Elapsed Time
oracle             7408   8  22  427 259884     0:00:03.515     0:04:39.077

5.使用-d參數進一步查看在XP系統中對應的線程詳細信息
詳細顯示每個線程對應的基本信息。與在linux或UNIX上使用"ps -ef | grep oracle"命令得到的信息相比,這裏不會顯示出具體的線程名信息,僅僅顯示出了線程的ID值(Tid列)。
C:/>pslist -d oracle

pslist v1.28 - Sysinternals PsList
Copyright ? 2000-2004 Mark Russinovich
Sysinternals

Thread detail for HOUSWLT:


oracle 7408:
 Tid Pri    Cswtch            State     User Time   Kernel Time   Elapsed Time
6464   9        94   Wait:Executive  0:00:00.000   0:00:00.031    0:04:44.812
7776   9        84     Wait:UserReq  0:00:00.000   0:00:00.000    0:04:44.687
5268   9        14     Wait:UserReq  0:00:00.000   0:00:00.000    0:04:44.671
2804   8       226     Wait:UserReq  0:00:00.031   0:00:00.015    0:04:41.624
7152   8       302     Wait:UserReq  0:00:00.015   0:00:00.000    0:04:41.624
7156   8       193     Wait:UserReq  0:00:00.000   0:00:00.000    0:04:41.577
4024   8       231     Wait:UserReq  0:00:00.000   0:00:00.031    0:04:41.577
8124   9       609     Wait:UserReq  0:00:00.031   0:00:00.031    0:04:41.562
6844   9       514     Wait:UserReq  0:00:00.046   0:00:00.046    0:04:41.562
7116   8       768     Wait:UserReq  0:00:00.140   0:00:00.046    0:04:41.562
4772   8        36     Wait:UserReq  0:00:00.000   0:00:00.015    0:04:41.546
4156   9       339     Wait:UserReq  0:00:00.125   0:00:00.000    0:04:41.546
 620   8      1217     Wait:UserReq  0:00:00.437   0:00:00.046    0:04:41.546
5960   8       473     Wait:UserReq  0:00:00.015   0:00:00.000    0:04:41.546
4340  10         3       Wait:Queue  0:00:00.000   0:00:00.000    0:04:41.484
5040   8       275     Wait:UserReq  0:00:00.015   0:00:00.015    0:04:36.984
5020   9       181     Wait:UserReq  0:00:00.000   0:00:00.015    0:04:36.984
6832   9        66     Wait:UserReq  0:00:00.000   0:00:00.000    0:04:34.718
4332   9        49     Wait:UserReq  0:00:00.000   0:00:00.015    0:04:31.968
6964   9        38     Wait:UserReq  0:00:00.015   0:00:00.000    0:04:21.968
8008   8        44     Wait:UserReq  0:00:00.000   0:00:00.015    0:04:16.968
 160   8        80     Wait:UserReq  0:00:00.000   0:00:00.031    0:00:09.750

6.使用-m參數查看oracle進程使用內存的情況
C:/>pslist -m oracle

pslist v1.28 - Sysinternals PsList
Copyright ? 2000-2004 Mark Russinovich
Sysinternals

Process memory detail for HOUSWLT:

Name                Pid      VM      WS    Priv Priv Pk   Faults   NonP Page
oracle             7408  372588  150508  254412  269920    52531     16  207

7.更多參數介紹請見下面的【附】

8.OK,從此我多了一個能夠查看Windows進程信息的命令行工具。
BTW,在這個解壓包中還有一些其他的小工具
如pskill可以殺掉不想要的進程,類似UNIX上的kill -9命令
還有psinfo命令顯示Windows系統信息等,有興趣,您也可以熟練使用之。



【附】使用pslist -help命令顯示pslist命令的使用指南,內容描述的非常清晰
C:/>pslist -help

pslist v1.28 - Sysinternals PsList
Copyright ? 2000-2004 Mark Russinovich
Sysinternals

Usage: pslist [-d][-m][-x][-t][-s [n] [-r n] [//computer [-u username][-p password][name|pid]
   -d          Show thread detail.
   -m          Show memory detail.
   -x          Show processes, memory information and threads.
   -t          Show process tree.
   -s [n]      Run in task-manager mode, for optional seconds specified.
               Press Escape to abort.
   -r n        Task-manager mode refresh rate in seconds (default is 1).
   //computer  Specifies remote computer.
   -u          Optional user name for remote login.
   -p          Optional password for remote login. If you don't present
               on the command line pslist will prompt you for it if necessary.
   name        Show information about processes that begin with the name
               specified.
   -e          Exact match the process name.
   pid         Show information about specified process.

All memory values are displayed in KB.
Abbreviation key:
   Pri         Priority
   Thd         Number of Threads
   Hnd         Number of Handles
   VM          Virtual Memory
   WS          Working Set
   Priv        Private Virtual Memory
   Priv Pk     Private Virtual Memory Peak
   Faults      Page Faults
   NonP        Non-Paged Pool
   Page        Paged Pool
   Cswtch      Context Switches

-- The End --

 

文章來源:http://space.itpub.net/519536/viewspace-611379


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章