I'm trying to manage various IIS sites and I wanted to know how much memory, net and CPU resources is consuming each IIS app.

Also I would want to know if is any app handling db connection dirtly, I mean, opening a lot of connections, etc.

Is it however possible? ¿What tools do you IIS admins use? ¿How can I learn more about this topic?

My target is IIS 6 on Windows 2003 and ocasionally on a XP development machine.

Thanks in advance


Note: This reply is .NET centric because thats what I find is most commonly used on the Microsoft stack.

CPU/memory stats are per worker process. So if you're looking to get per site information, your first step is going to be separating each site into it's own worker process (application pool).

Once that is complete, you can get per process stats by simply opening up task manager. If you're on windows 2003+ they'll be called w3wp.exe. Open view -> columns, and tick PID to show PID's for each process. Then open up a command prompt and run "iisapp" this will map PID's to App Pool names.

Perfmon (start->run->perfmon) exposes a lot of good information but it's not necessarily easy to access.

There are a million different monitoring packages that can read perfmon information remotely and trigger alerts when thresholds are reached. Anything from Microsoft's Systems Center Operations Manager, to What's Up Gold, to free tools like Nagios.

The thing to remember with perfmon data is it's counters are at the OS and framework level. So you can glean some good information about some of your worker processes, and .NET states.

The answer to your specific question can be found in the .NET data provider for SQL server object. Keep an eye on the connection pool counts for your application.

If you're having a performance issue and you want to capture data from a running process, take a look at IIS DebugDiag. This will allow you to create a memory dmp file when certain conditions are met, and it even has some canned analyzers which will automagically troubleshoot some common problems. Note that out of the box DebugDiag mostly has info on native (read: non-managed) code. If you're using .NET and running into memory issues check out Tess's script for DebugDiag which will do some .NET centric memory analysis on DMG files. Debug Diag .NET Memory Script

The thing is, if you're looking for actual metrics on how long a specific method is running, this sort of information isn't really available without paying for some very nice, but very expensive tools. If you've got a good tools budget (read: more then 10k) I highly recommend AviCode.


IISTracer is a good tool.

From the site:

"IISTracer is a real-time internet web site monitoring tool for Microsoft IIS (all versions). The software lets you show what is happenning on IIS server right now. You can see or log state of each request, incomming/outgoing bytes, http headers and several request running times. IISTracer shows a state of running scripts (.asp, .aspx, asp.net, .cfm, .php, .cgi, ...), applications (.dll, .exe, ..) and a big downloads (.mp3, .zip, ...). It lets you also monitor what script or which client (IP) hangs-up your server. "



PAL - Performance Analysis of Logs (www.codeplex.com/PAL) coupled with some good logparser scripts and the Best Practices Analyzer products from Microsoft are good performance improvement/problem finding tools ...


The sysinternals tools - especially process explorer and process monitor are extremely helpful.


Regarding the DB connection (if it's SQL Server), don't forget the database sever can tell you a bit about connections. If you open the Activity Monitor you can see which processes are accessing which database from which host, including your webservers. You can run the Profiler tool and filter for a particular web server and observe exactly what it's doing in real time, how long queries are taking etc.

Not the answer you're looking for? Browse other questions tagged or ask your own question.