How to use IIS Manager to get Worker Processes (w3wp.exe) details information ?

In IIS 7.0 and IIS 7.5 we can get the worker process (w3wp.exe) details like Application Pool name, Process ID, CPU Usages from IIS Manager itself. Even you can get details of each worker process for a “Web Gardenscenarios. So when you need to attach some process for debugging from Visual studio, Instead of going to command prompt, you can easily identify the worker process Id from IIS itself.

2

Get Worker Processes ( w3wp.exe) List :

To get list of running worker process, Open IIS Manager ( Run > Inetmgr ), Select root level from left site navigation tree and from “Features View Panel” select “Worker Processes”

1

Click on the “Worker Processes” to get details of all worker process which are currently running as shown in below.

ProcessList

So from the above list of worker processes you can get the details of Application Pool Name, Process ID, state of worker processes along with CPU uses and memory uses.

Attach Worker Processes (w3wp.exe) For Debugging :

From Visual studio Attach Process window you will find the same list of worker process with the same Process ID. So based on your application Pool name you can attach the process and start the debugging.

AttacheProcess

To Know more about attach process while debugging your application is running on IIS, please read one of my complete article – Debug Your ASP.NET Application that Hosted on IIS : Process Attach and Identify which process to attach ( Note: This article was targeted to debugging with IIS 6.0 )

What else we can have from Worker Processes lists in IIS 7 Manager?

We have already identified the worker process and Application Pool name which are more than enough for us to attach a process from Visual Studio. Now what else we can get out of this list ? Yes we can have enough information regarding worker process like

  • Worker Process Current State
  • CPU Uses by the worker process
  • Memory uses by worker process
  • Current Request Handling by Worker Process

What about the current Worker Process (w3wp.exe ) State ?

You can get the current status of worker process from status column. Worker processes having 3 status as listed below

  1. Running
  2. Stopping
  3. Starting

image

RunningState

You must be wondering why there is no “Stopped” Status for Worker Process in IIS ? I will explorer it in a different blog post. Yeah that will be very interesting ! Very soon !

Similar like State you can also monitor CPU % Uses and Memory Uses from the IIS Itself.

What about the Current Request at Worker Process ?

Well, you can view the current request details for a particular worker process from IIS Manager Itself. So, When your worker process is on running mode, If you want to check the what are the thing going on backend, just double click on the particular worker process.

CurrentRequest

From the request details, you can get web site id, URL, HTTP Verbs, client ID and State along with Module Name. I liked the State and Module name column very much. This two columns will let you know where is your current request and which HTTP Module is taking care of that Request.

To know more about how fundamentals How IIS process ASP.NET Request you can read one of my article How IIS Process ASP.NET Request

You can also read “Securely Implement Request Processing, Filtering, and Content Redirection with HTTP Pipelines in ASP.NET” to know more advance topics.

To know more about Worker Process Request read View Currently Executing Requests in a Worker Process (IIS 7)

View Details of Each Worker Process when you are using Web Garden

Before start web garden mode, if you want to know more about Web garden or just wanted to recap please read on of my previous article What is the difference between Web Farm and Web Garden ?

If You have configured your site as Web Garden, you can also get the list of all the worker process in the worker processes list with the different worker Process ID but all worker process should have a “Single Application Pool “ .

ConfigureWebGarden WebGardens

So, from the above diagrams you can see, “WCFSite” has configured as Web Garden mode with Two Worker Process and from the Worker Processes list you can view both the worker process with different Worker Process Id and both of them are listed under same Application Pool.

Note: You will able to see only the worker process which are in running state .


Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.