« Previous Next »

Answered Thread: IIS Request Monitor not working

Last post 10-24-2009 10:52 PM by jfosciis. 9 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (10 items)

Sort Posts:

  • 10-18-2009, 11:10 PM

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    IIS Request Monitor not working

    I've got an issue that is just odd.  I was trying to capture currently executing requests using the following start/stop commands:

    logman start "IIS Request Trace" -p "IIS: Request Monitor" -ct perf -o iis.etl -ets

    logman stop "IIS Request Trace" -ets

    While the capture is running, I can execute requests against the server, but the log never shows anything other than the start & stop of the capture request.  I have also tried the iisreqmon.exe utility and while the XML is generated, there are no web requests showing - just the app pools with empty web request elements.  I have tried this on two separate Windows Server 2003 R2 SP2 boxes and I get the same results (both Virtual Machines, which shouldn't matter)

    I can use logman to capture other statistics from other providers, but the IIS Request Monitor provider seems to just be broken.  I don't know if R2 + SP2 breaks anything.  Any suggestions would be appreciated.

    Thanks.

  • 10-19-2009, 5:05 PM In reply to

    Re: IIS Request Monitor not working

    I have a Whatsrunning.bat file that I use. Looks like this.

    del c:\iistrace\data\WhatsRunning.etl
    logman start WhatsRunning -p "IIS: Request Monitor" -ets -o c:\iistrace\data\WhatsRunning.etl -max 13
    logman stop WhatsRunning -ets
    tracerpt  c:\iistrace\data\WhatsRunning.etl -o c:\iistrace\reports\WhatsRunning.csv /y
    notepad c:\iistrace\reports\WhatsRunning.csv

    Do a "logman query providers' and see if everything is registered. Compare against another server. I have seen where some of the providers disappear. I think I fixed that by reapplying W2K3 SP2.

    To test that it works, write a little ASP page that calls sleep.exe (from resource kit).

    <html>
    <body>
    <font size="3" face="Comic Sans MS">

    <%' Begin Server Side VB Script
       dim o
       dim rc
     
      set o = createobject("wscript.shell")               ' get handle to shell object

      on error resume next
      server.scripttimeout = 200
      response.write "Sleeping for 120 seconds<br>"
      response.flush
      rc = o.run ("sleep.exe 120",0,true)    ' don't do anything for a while   
      response.write "Done."
    %>
    </font>
    </body>
    </html>

  • 10-19-2009, 6:18 PM In reply to

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    Re: IIS Request Monitor not working

    Thanks for your response. 

    The IIS: Request Montior is definitely listed when I do "logman query providers" - that was one of the first things I checked.  The commands I ran was from a Technet webcast from the Microsoft Operations Team - they made the batch files available.  I will surely try yours as well.

     As I mentioned in my first post, I already did compare this to another server running R2 with SP2.  The IIS Request Monitor provider is there - in fact, if it wasn't, the logman start command would've specified an error, which it didn't.   I also get the same results there - entries indicating the start and stop of the monitoring, but no data in between.  (I have an ASP.Net 2.0 application installed there and I execute it while it's supposedly capturing).

    Also, keep in mind that iisreqmon.exe notes the start/stop, but doesn't capture any requests.  It's almost as if the something's not wired to the request monitor provider, but I get no errors anywhere, including event viewer.  I can execute queries against the other providers and get data.  It's very puzzling.

    I'll do some additional runs and post some results so you can see what I'm referring to.

     Thanks again.

  • 10-20-2009, 12:56 PM In reply to

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    Re: IIS Request Monitor not working

     Madness80,

     I tried your example but had the same problem.  Here are the details.

    I created a page foo.aspx with the following content (yours had syntax that was deprecated)

     <html>
    <body>

    <%
    response.write("Hello World!")
    %>

    </body>
    </html>

    Here's the output from the command shell.


    C:\IISReqMon\test2>logman start WhatsRunning -p "IIS: Request Monitor" -ets -o W
    hatsRunning.etl -max 13

    Name:                      WhatsRunning
    Age Limit:                 15
    Buffer Size:               64
    Buffers Written:           1
    Clock Type:                System
    Events Lost:               0
    Flush Timer:               0
    Buffers Free:              2
    Buffers Lost:              0
    File Mode:                 Sequential
    File Name:                 C:\IISReqMon\test2\WhatsRunning.etl
    Logger Id:                 4
    Logger Thread Id:          212
    Maximum Buffers:           25
    Maximum File Size:         13
    Minimum Buffers:           3
    Number of buffers:         3
    Real Time Buffers Lost:    0

    Provider                                  Flags                     Level
    -------------------------------------------------------------------------------
    * "IIS: Request Monitor"                  0x00000000                0x00
      {3B7B0B4B-4B01-44B4-A95E-3C755719AEBF}  0x00000000                0x00


    The command completed successfully.

    C:\IISReqMon\test2>logman stop WhatsRunning -ets
    The command completed successfully.

    C:\IISReqMon\test2>tracerpt WhatsRunning.etl -o WhatsRunning.csv /y

    Input
    ----------------
    File(s):
         WhatsRunning.etl


    100.00%

    Output
    ----------------
    Text (CSV):         WhatsRunning.csv

    The command completed successfully.

    C:\IISReqMon\test2>

    Here's the content of the WhatsRunning.csv

       Event Name,       Type,        TID,           Clock-Time, Kernel(ms),   User(ms), User Data
      EventTrace,     Header, 0x000009EC,   129005258965000000,         45,          0,    65536, 33620485,     3790,        1, 129005259298593750,   156250,       13, 0x00000000,        2,        1,        4,        0,     2793, 0x00614D28, 0x00614D42,                0,          3579545, 129005258965000000, 0x00000002,        0, 0, 0
    IISRequestMonitor, StartProcessDump, 0x00000F58,   129005258965625000,          0,          0,     3964,        0,        4,        4, "Bugtracker", 129005258576710000, 0, 0
    IISRequestMonitor, StopProcessDump, 0x00000F58,   129005258965625000,          0,          0,     3964, 0, 0
    IISRequestMonitor, StartProcessDump, 0x000000C0,   129005258965625000,          0,          0,      852,        7,        4,        4, "SharePoint - 80", 129005252460000000, 0, 0
    IISRequestMonitor, StopProcessDump, 0x000000C0,   129005258965625000,          0,          0,      852, 0, 0

    It just logs the start/stop for two of the application pools. I get similar results for the other box where it's *just* ASP.net and no SharePoint.

    Here is the output from logman query:


    C:\IISReqMon\test2>logman query providers

    Provider                                 GUID
    -------------------------------------------------------------------------------
    IIS: WWW Global                          {d55d3bc9-cba9-44df-827e-132d3a4596c2}
    .NET Common Language Runtime             {e13c0d23-ccbc-4e12-931b-d9cc2eee27e4}
    ACPI Driver Trace Provider               {dab01d4d-2d48-477d-b1c3-daad0ce6f06b}
    Active Directory: Kerberos               {bba3add2-c229-4cdb-ae2b-57eb6966b0c4}
    IIS: SSL Filter                          {1fbecc45-c060-4e7c-8a0e-0dbd6116181b}
    IIS: Request Monitor                     {3b7b0b4b-4b01-44b4-a95e-3c755719aebf}
    IIS: WWW Server                          {3a2a4e84-4c21-4981-ae10-3fda0d9b0f83}
    IIS: Active Server Pages (ASP)           {06b94d9a-b15e-456e-a4ef-37c984a2cb4b}
    MSSQLSERVER Trace                        {130A3BE1-85CC-4135-8EA7-5A724EE6CE2C}
    Local Security Authority (LSA)           {cc85922f-db41-11d2-9244-006008269001}
    IIS: IISADMIN Global                     {DC1271C2-A0AF-400f-850C-4E42FE16BE1C}
    Processor Trace Information              {08213901-B301-4a4c-B1DD-177238110F9F}
    Windows Kernel Trace                     {9e814aad-3204-11d2-9a82-006008a86939}
    ASP.NET Events                           {AFF081FE-0247-4275-9C4E-021F3DC1DA35}
    NTLM Security Protocol                   {C92CF544-91B3-4dc0-8E11-C580339A0BF8}
    IIS: WWW Isapi Extension                 {a1c2040e-8840-4c31-ba11-9871031a19ea}
    Active Directory: SAM                    {8e598056-8993-11d2-819e-0000f875a064}
    WSAT Trace Provider                      {7f3fe630-462b-47c5-ab07-67ca84934abd}
    HTTP Service Trace                       {dd5ef90a-6398-47a4-ad34-4dcecdef795f}
    Spooler Trace Control                    {94a984ef-f525-4bf1-be3c-ef374056a592}

    Any suggestions would be appreciated.

    Thanks!

     

     

     

  • 10-20-2009, 1:08 PM In reply to

    Re: IIS Request Monitor not working

    I think the problem is that the request monitor only tells you what is running at the time that you enable the trace. Your hello world would execute in milliseconds either before or after the trace. That is why my code called out to sleep.exe.  Just save my page as a ASP and not ASPX. It should run fine. While your browser is waiting for it to finish, go run whatsrunning.bat.

  • 10-20-2009, 3:58 PM In reply to

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    Re: IIS Request Monitor not working

     Ok...I'll give that a shot too, although I'm a bit confused as to why it wouldn't capture all requests between the start/stop.  When I capture with some of the other providers for IIS it actually captures what I do in-between the start/stop.

    The engineer doing the Technet demo I watched did exactly that, though.  He started the capture, requested a page he created that basically caused an exception due to an invalid reference, and stopped it.  The trace log captured it during that short time period.  I'll go back and check - perhaps that's a fine point I missed.

    In another light, though, perhaps that's why it's called "currently executing requests"....as you said it might only capture what's currently executing at the start of the capture, therefore the sleep would keep the request going.

    I'll keep you posted.  Thanks again.

     

     

     

  • 10-20-2009, 4:08 PM In reply to

    Answered Re: IIS Request Monitor not working

    Tracestart.bat **********************

    logman start Dave -pf c:\IIStrace\IISprovider.txt -ets -o c:\IIStrace\data\IIS.etl -max 13
    pause

    Tracestop.bat *******************

    logman stop Dave -ets

    TraceReport.bat ******************************

    tracerpt c:\IIStrace\data\IIS.etl -o c:\IIStrace\reports\dumpfile.csv -summary c:\IIStrace\reports\summary.txt -report

    c:\IIStrace\reports\workload.htm -f html -y
    cscript.exe dumptracereqs.js c:\IIStrace\data\IIS.etl > c:\IIStrace\reports\IISTraceLog.txt
    start c:\IIStrace\reports\workload.htm
    start c:\IIStrace\reports\IISTraceLog.txt
    pause

    IISprovider.txt ************************

    "IIS: WWW Server" 0xFFFFFFFE 3
    "IIS: Active Server Pages (ASP)" 0 1
    "IIS: WWW Global" 0 1
    "IIS: WWW Isapi Extension" 0 1
    "HTTP Service Trace" 0 1
    "ASP.NET Events" 0 1
     

     IISproviderDetailed.txt ***************************

    "IIS: WWW Server" 0xFFFFFFFE 5
    "IIS: Active Server Pages (ASP)" 0 3
    "IIS: WWW Global" 0 3
    "IIS: WWW Isapi Extension" 0 3
    "HTTP Service Trace" 0 3
    "ASP.NET Events" 0 3
    "NTLM Security Protocol" 0 3
    "Local Security Authority (LSA)" 0 3
    "Active Directory: NetLogon" 0 3
    "COM+ Services" 0 3

     

    TraceStartDetailed.bat ******************************************

    logman start Dave -pf c:\IIStrace\IISProviderDetailed.txt -ets -o c:\IIStrace\data\IIS.etl -max 13
    pause

     

  • 10-20-2009, 6:18 PM In reply to

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    Re: IIS Request Monitor not working

    I had to be a bit creative as I had problems with running .asp.  I created a similar one in .aspx and it actually captured it this time.

    So, it does look like it captures "currently executing requests" in a very literal fashion, not just requests that start between the start/stop, but rather requests that are "in progress" at the time the capture is started.

    This makes sense from the perspective of a large production site where you will have lots of requests executing at any given time, but it kind of limits what you can do with the IIS Request Monitor provider for trying to reproduce an issue.  I know there are other providers that help capture data that might be more appropriate.

    Thanks for all your help.  It is greatly appreciated.

  • 10-21-2009, 8:04 AM In reply to

    Re: IIS Request Monitor not working

    What problem are you trying to solve?

     

  • 10-24-2009, 10:52 PM In reply to

    • jfosciis
    • Not Ranked
    • Joined on 10-18-2009, 10:55 PM
    • Posts 6

    Re: IIS Request Monitor not working

    I didn't have a particular problem I was trying to solve - I am trying to learn how to use the tools so that when I do have a problem I'll have a clue. :)

     

Page 1 of 1 (10 items)
Microsoft Communities