28

I have an IIS6 web server that is hosting two application pools. Occasionally, one of the w3wp processes will spike the CPU for a while, and both app pools seem to suffer the consequences. I'm not sure which one is which, and without that information I don't know which application to blame.

How can I tell which w3wp belongs to which App Pool?

Michael Bray
  • 14,998
  • 7
  • 42
  • 68

6 Answers6

38

For IIS7 you need to use APPCMD from %systemroot%\system32\inetsrv\ as an administrator

i.e.

%systemroot%\system32\inetsrv\appcmd list wp

See http://learn.iis.net/page.aspx/114/getting-started-with-appcmdexe/#HowToUse for more details

Sameer Alibhai
  • 3,092
  • 4
  • 36
  • 36
  • 4
    This worked for me on Windows Server 2008 R2, the accepted answer got a file not found for C:\windows\system32\iisapp.vps – Hardwareguy Jul 25 '14 at 20:32
11

Goto cmd window then type c:\windows\system32\cscript c:\windows\system32\iisapp.vbs.

Now you will get the list of worker processes along with the app pool name.

Adam Lear
  • 38,111
  • 12
  • 81
  • 101
4

lisapp.vbs from microsoft is for exactly that.

MrChrister
  • 3,555
  • 5
  • 22
  • 34
2

There are two ways in which I prefer "task manager" version.

By task manager,

Add "command line" column as shown in the images.

enter image description here enter image description here

By PowerShell,

cd C:\Windows\System32\inetsrv\
.\appcmd list wp

enter image description here

1

You can also use Process Explorer from Sysinternals. Right click the columns at the top and select the "Command Line" column. In the Command Line column you will see the name of the web app included in the full command.

RJ Russell
  • 133
  • 1
  • 3
  • 9
  • I just tried this, as I didn't have IISapp.vbs available. The command line for w3wp.exe is empty. So, no go. – Jørn Jensen Jul 15 '10 at 10:53
  • 1
    This worked great for me on Server 2008. Just make sure you run Process Explorer as administrator or the process details will be empty. – Nick Oct 28 '14 at 18:10
0

You can also get this information from the IIS Debug Diagnostic Tool

JamesRyan
  • 221
  • 1
  • 2
  • 12