Get W3WP List when Debugging

Every since the entry into service of IIS 6 (which comes with Windows 2003) the notion of application pools was introduced. An application pool is a means of isolation a web-application, so that the errors it may encounter will not influence other web applications executing on the server or the IIS server itself. If the default settings for an application pool are used a single w3wp.exe process is used to execute the web-applications that are hosted in the pool. In the diagram below, applications A and B are hosted by pool 1 while applications C and D each have their own dedicated pool, pool 2 and pool 3 respectively.

 

The problem is that when it comes to w3wp.exe processes for the diagram above, there are three of them and just by looking in the task manager there is no easy way to tell them apart. Each instance of a w3wp.exe process has a PID (short for process identifier), but the question is which PID belongs to which application pool.

In IIS 6 (Windows 2003):

The easy way to solve this problem was to call a Visual Basic script file that was located in the %windir%\system32\folder. The file was called iisapp.vbs, and the output of this command listed the instances of w3wp.exe present on the system, their PIDs and to which application pool they belonged to.

 

In IIS 7 (Windows 2008) and IIS 7.5 (Windows 2008 R2)

The Visual Basic script file has been removed. Most of the IIS 6 script files that were dedicated to a single task (like iisapp.vbs) have been integrated into a command line utility that can be used to administer the IIS server as a whole. This utility is called appcmd.exe and it is located in the %windir%\system32\intesrv\ folder.

CAUTION: to access the tool you must launch the command line prompt with administrator rights, otherwise it will not work. To do this simply right click on a command line short cut and chose 'Run as Administrator' from the context menu.

 

Then navigate to the folder where appcmd is located and run the following command: appcmd list wp – this will list all the instances of the w3wp.exe process (worker process) that are present on your server with their respective PIDs and application pools.

 

Other nice commands are appcmd list sites and appcmd list appPools to list the web sites that are present on the server and the application pools on your IIS server

转载于:https://www.cnblogs.com/PeterHome/p/4866086.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值