onsdag 3 oktober 2007

List IIS App pool processes

A common issue on a shared IIS server is to distinguish the CPU load between different web application when looking in the task manager.

The solution is to create one application pool for each web application in the IIS. IIS will then launch one individual "w3wp.exe" process with its own ID (PID - Process ID) for each application pool.

To list all running processes, Windows Server has a built in vbs-script to display all running application pools (w3wp processes) located in: "c:\windows\system32\iisapp.vbs".

You run this script from a command console using:
c:\windows\system32\cscript.exe iisapp.vbs

The output is a list of each running w3wp process together with its PID which can be matched to the PID in the task manager.

Using one application pool for each web application also has advantages when looking at performance counters as each counter can be selected for each application pool.

Inga kommentarer: