MSCOM OPS March Debug Madness…5th Session Q & A: Debugging Without the Debugger In IIS and ASP.NET

Friday’s topic Debugging Without the Debugger In IIS and ASP.NET presented by Chris St.Amand, a Sr. Systems Engineer on the MSCOM OPS Debugging Team, proved to be a very popular topic, and a strong ending to MSCOM Ops March Debug Madness webcast series. Chris showed how Event Tracing for Windows (ETW) enables you to extract a wealth of information about the state of IIS and the applications running in its worker processes…all without having to attach a debugger. Our debug had a blast presenting this information. Not only are we glad to be able to share it with you, but we learn a ton of stuff ourselves while putting together these sessions. They are a lot of work…but well worth the effort. Thanks for joining us and don’t forget that you can view these sessions on-demand. Here are the questions and answers generated by this session.

  1. Asked: Where can I find IISREQMON?
    Answered: It is available inside of the IISTools.msi package within the Web Hosting best practices zip: https://download.microsoft.com/download/5/a/3/5a318a80-7c2b-460d-afa2-c65635e9de82/WebHosting.zip
  2. Asked: Do all of the ETW commands require Admin logins to run? As a developer I have a user-mode account.
    Answered: Only users with admin privileges, users in the Performance Log Users group, and applications running as LocalSystem, LocalService or NetworkService can control event tracing sessions.
  3. Asked: Why do you have to provide both the GUID and Provider name in the provider file used with logman?
    Answered: It turns out you only need one of them. Just the provider name enclosed in quotation marks will work (along with your flags and verbosity settings)
    i.e. “IIS: WWW Server” 0xFFFFFFFF 5
  4. Asked: Is logman.exe shipped with Windows Server 2003, or do I need to download/install something on my production server?
    Answered: Both logman.exe and tracerpt.exe ship with Windows Server 2003. You can find them in %windir%\system32
  5. Asked: Why do you have so many more providers than I do? Because you configured them? (with what?)
    Answered: The demos were done on Windows Server 2003 SP1 servers. There were a significant number of providers/events added into SP1. If you’re running a down level OS from SP1 you will probably have fewer providers/events.
  6. Asked: Tracing is done to a file. What is the performance impact of this IO on the real work being done?
    Answered: Tracing does generate quite a bit of disk IO, but I believe it is buffered for performance. Certainly if your disk is already resource strapped, you would need to be aware of this. In our environment, the disk overhead of tracing is not impacting.
  7. Asked: Is Logparser getting shipped with Windows Server 2003 or should I need to download and install it separately?
    Answered: It’s available separately on the download center: https://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&DisplayLang=en
  8. Asked: How can an ASP.NET application add data to an ETW log?
    Answered: This is something that will be possible in the IIS7 timeframe using a new trace listener that you can hook your Trace.Write calls into
  9. Asked: Where can we find more information about these SQL-like statements?
    Answered: www.logparser.com has a repository of some great logparser queries. You can also check the help file that ships with logparser or run “logparser –h FUNCTIONS”
  10. Asked: Is the collection “IIS Trace” created by default on a Windows Server 2003 machine?
    Answered: “IIS Trace” was the random name I gave my trace sessions. The providers and flags for the session you want are all configured in your provider file (supplied to logman using the –pf switch) or directly on your command line using the –p switch.
  11. Asked: I assumed that the workload reports can be generated in XML format for easy parsing?
    Answered: Absolutely. Tracerpt takes a –f switch that will allow you to output the report in XML, TXT or HTML
  12. Asked: Can we setup a custom event to log in the event viewer?
    Answered: You can certainly log any custom information you want from ASP or ASP.NET. You can even create your own custom event log to log to.
  13. Asked: Why is it that some gif files have a cache hit percentage of 83% instead of 100% in the workload report? What does this exactly mean?
    Answered: HTTP.SYS can only cache one content-encoding per response. On our site we have static compression enabled which means a particular static request could have multiple content-encoding types for its response. In that situation IIS will favor placing the compressed content into the HTTP.SYS cache, resulting in non-cached responses for requests that don’t use or support the compression encoding.
  14. Asked: Is there a way to review requests that took place before iisreqmon was run without breaking in with a debugger?
    Answered: iisreqmon will show you all requests that are currently “inflight” waiting to complete, even if they arrived on the server prior to running iisreqmon. If you have requests that are stuck you can run iisreqmon to see what they are without having to worry about having iisreqmon running prior to those requests landing on your server.
  15. Asked: Do ISAPI filters need to explicitly support event tracing in order to get detailed data from the filter when using event tracing?
    Answered: Yes. You can check it out in the Platform SDK