Determining which w3wp process goes to which SharePoint service

This post was originally posted on SharePoint 365, which has since been retired.

SharePoint runs its service applications on IIS application pools, which in turn creates multiple w3wp processes running on your servers. When looking at Task Manager, you will see a long list of w3wp processes. Similar to

task-manager-1.jpg

 

As you can see in my example above, most of my w3wp processes are using unique accounts, so I can quickly look at this list and know what process belongs to which service account. Per Microsoft’s recommendations for installing SharePoint, using a unique account per service is preferred, and this is one of the benefits.

If we didn’t use a unique account per service, this list would show all the w3wp processes using the same account. Exceptionally uninformative.

What happens if one w3wp processor is pinning the processors? Or if one is taking up apparently large amount of RAM? How do we determine which process belongs to which application pool and which application pool belongs to which SharePoint service application or SharePoint site?

Unfortunately there is easy direct method of finding this out. We utilize a few different tools to get it done.

First, let’s get the PID for each process. This is simple through Task Manager.

  • Select the View menu, then select Choose columns.
  • Check off PID.
  • Click OK.

Your process list will now have a PID column.

task-manager-2.jpg

Now we need to match up the PIDs to the IIS application pools. Open a command prompt window and go to c:\windows\system32\inetsrv by typing in

cd c:\windows\system32\inetsrv

Next type in

appcmd list wp

This will return a list of all application pools running, with their PIDs.

cmd-1.jpg

You’ll see in the list the name of each application pool and their PID. The name will match up to the name in IIS Application Pools. Some of these names should be obvious, as they are similar to your web applications. There are a bunch that are uniquely named using a GUID. These ones are the service applications.

Now let’s find out what GUID belongs to which service application.

Open SharePoint 2010 Management Shell (Start > All Programs > Microsoft SharePoint 2010 Products), and type in

Get-SPServiceApplicationPool | select Id, Name

This will return all service applications and which GUID they are using.

cmd-2.jpg

This GUID will match the application pool GUID that we previously saw.

application_pool_ids.jpg

TA DA!

You may also notice that not all of the service applications are being represented in the Task Manager. This is because the services themselves are asleep, and are not running. For example, my Word Automation service isn’t listed in the Task Manager, and since I haven’t used it, it isn’t running. If I were to go in and use it, it would then start up.

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: