Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Similar to what @Sumo said, you need to use Windows Performance Counters (PC), from the <code>System.Diagnostics</code> namespace.</p> <p>Part of the problem with your question is that you are a little vague about what you want to measure from the perspective of PCs. PCs are very specific and very narrow; they measure one highly detailed metric. You will have to translate your requirements to the specific Windows PC that you want.</p> <p>You said you want to measure:</p> <ul> <li>Total response time </li> <li>Total bytes</li> <li>Throughput (reqs/sec)</li> <li>Ram used </li> <li>Hard Drives space</li> <li>IO issues</li> <li>Server CPU overhead</li> <li>Errors (by error code)</li> <li>MSSQL load</li> </ul> <p>You should also consult the Windows Technet reference at <a href="http://technet.microsoft.com/en-us/library/cc776490(WS.10).aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/cc776490(WS.10).aspx</a> (it's W2K3, but it still applies to W2K8/R2). This will provide you with a wide overview and explanation of all the performance counters that you are looking for.</p> <p>Running down each one:</p> <ul> <li>Total response time</li> </ul> <p>To my knowledge, there are no ASP.NET PCs that list this. And, it probably wouldn't be meaningful to you, anyway, as ASP.NET will also be responding to a wide variety of requests that you probably don't care how long it takes (i.e. anything ending with .axd). What I do in my projects is create a custom PC, but there are other techniques available (like using a custom trace listener).</p> <ul> <li>Total bytes</li> <li>Throughput (reqs/sec)</li> </ul> <p>I believe there are PCs for both of these, although I think Total bytes might be listed under the <strong>Web Service</strong> category, whereas Throughput is probably an ASP.NET category.</p> <ul> <li>RAM used</li> </ul> <p>There is a <strong>Memory</strong> category, but you need to decide whether you are looking for working set size, physical RAM used, etc.</p> <ul> <li>Hard drive free space</li> </ul> <p>Check the <strong>LogicalDisk</strong> category</p> <ul> <li>IO issues</li> </ul> <p>What does this mean? Again, review the available PCs to see what seems most relevant.</p> <ul> <li>Server CPU overhead</li> </ul> <p>You will find this under the <strong>Processor</strong> category</p> <ul> <li>Errors (by error code)</li> </ul> <p>You can get the total number of errors thrown, or the rate at which exceptions get thrown, but if you want to collect the entries in the EventLog, you will need to use the <code>EventLog</code> classes in the <code>System.Diagnostics</code> namespace.</p> <ul> <li>MSSQL load</li> </ul> <p>I didn't find the reference overview of SQL Server PCs, but Brent Ozar is an expert, and he has a list of PCs to check here: <a href="http://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/" rel="nofollow">http://www.brentozar.com/archive/2006/12/dba-101-using-perfmon-for-sql-performance-tuning/</a>. This list is not likely to have changed much for SQL Server 2008/R2.</p> <p><strong>NOTES</strong>:</p> <ul> <li>You may need to make sure that the identity for the application pool running your web application has been added to the computer's user group called Windows Performance Monitor Users.</li> <li>You only need to open your counters for read-only access.</li> <li>Performance Counters are components, and therefore implement <code>IDisposable</code>. Be sure you <code>.Dispose()</code> them (or, better still, use <code>using()</code> statements).</li> <li>Use the <code>.NextValue()</code> method to get your values; there is almost never any need to use <code>.RawValue</code> or <code>.NextSample()</code>.</li> </ul> <p>I'm not giving you exact names for each counter, because it's very important that you really understand what each one measures and how useful it is to you, and only you can answer that. Experiment.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload