How to list process IDs for IIS7 worker processes

25Feb11

In Microsoft IIS7, all management commands have been consolidated under the appcmd.exe commandline tool. In the past there was a collection of VBscripts that allowed you to script access to IIS.

One of the things that I need to do that can’t be done in the GUI is to list which application pools are running under which w3wp.exe worker process instances. Using the Windows task manager will show you the process IDs but won’t show you which application pools are being served by each. The inetmgr tool will show you the application pools but won’t show you the process information.

Under IIS6 there was a script called iisapp.vbs that would show you the running w3wp processes, their PIDs and the application pool that they were serving. Under IIS7 this functionality has been merged into appcmd.exe.

Appcmd was not in the path for me, so I had to add it using:

c:\> set path=%path%;C:\Windows\System32\inetsrv

Then we can run

C:\Program Files (x86)\ICW>appcmd list wp

to get:

WP "5260" (applicationPool:CRMAppPool)
WP "5736" (applicationPool:SharePoint - 80)
WP "4460" (applicationPool:SecurityTokenServiceApplicationPool)
WP "4700" (applicationPool:2d129968e2144980a7614f288ac778fd)
WP "5684" (applicationPool:Sitecore6.0AppPool)

Short and sweet.

Advertisements


One Response to “How to list process IDs for IIS7 worker processes”

  1. 1 jc

    thanks – this was the command I was searching today and found here just what I was looking for


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: