Posted by: Jerry Lees
monitoring, VBScript, Web applications, webmaster
One of the most difficult problems with troubleshooting a web application on a server that has many applications on it is determining which one of the applications is causing an issue. Sometimes that is easy because you see an error message or, in those rare cases where you get an actual screenshot, a URL is given to you to go on. However, often you don’t get such useful information! Most times you just notice a w3wp.exe process either taking up to much memory or using to many CPU cycles (or in some cases none at all), but there’s a vbscript solution for this!
The best part is that you don’t have to write a single line of VBScript code! It’s already been written for you my Microsoft! The only thing you need to do is be sure the applications have a different pool name from one another—which is always a good idea.At a command prompt you can run iisapp.vbs to get application pool information associated with a specific w3wp.exe process, like so:cscript c:\WINDOWS\system32\iisapp.vbsThis will return output similar to the following:
W3WP.exe PID: 17632 AppPoolId: Application-1
W3WP.exe PID: 17532 AppPoolId: Application-2
W3WP.exe PID: 5748 AppPoolId: Application-2
W3WP.exe PID: 14040 AppPoolId: Application-1
That’s it… easy as pie!