分类: Oracle
2011-11-22 14:48:28
通过这个小文儿,给大家介绍并演示一下Window操作系统上的一个查看进程的小工具,可以通过这个小工具查看得到线程等相关信息。
1.截止到今天09.08.05,能得到的最新版本是PsList v1.28,下载地址如下
2.解压之
3.为便于在CMD中直接使用,方法如下
1)第一种方法是,修改环境变量,添加指向包含pslist.exe命令的目录
2)第二种方法是,将解压后的文件统统拷贝到的系统目录中
对于我本机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系统中对应的线程详细信息
详细显示每个线程对应的基本信息。与在或UNIX上使用"ps -ef | grep oracle"命令得到的信息相比,这里不会显示出具体的线程名信息,仅仅显示出了线程的ID值(Tid列)。
C:/>pslist -d oracle
pslist v1.28 - Sysinternals PsList
Copyright ? 2000-2004 Mark Russinovich
Sysinternals
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 --