{"id":509,"date":"2013-08-15T16:10:59","date_gmt":"2013-08-15T21:10:59","guid":{"rendered":"http:\/\/www.poweradmin.com\/blog\/?p=509"},"modified":"2015-04-27T08:44:07","modified_gmt":"2015-04-27T13:44:07","slug":"monitoring-asp-net","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/monitoring-asp-net\/","title":{"rendered":"How to Monitor ASP.NET"},"content":{"rendered":"<p><span style=\"font-family: verdana,geneva,sans-serif;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-510 alignright\" style=\"margin-right: 0px; margin-left: 15px;\" title=\"How to Monitor ASP.NET\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/Monitoring-ASP.NET_-300x200.png\" alt=\"Monitoring ASP.NET\" width=\"295\" height=\"199\">Last week we talked about how to monitor IIS. Today we\u2019re going to discuss monitoring ASP.NET. We\u2019ll cover a number of things including: the main implications of monitoring ASP.net, the most important performance counters to look for, performance counter values that should be measured and services dependent on ASP.net that should be monitored.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">If you haven\u2019t read the last blog post about <a href=\"http:\/\/www.poweradmin.com\/blog\/how-to-monitor-iis\/\"><strong><em>Monitoring IIS<\/em><\/strong><\/a>, please take a look at it because it will provide a general idea of how to monitor a Windows web server and will also help you understand better how to monitor ASP.NET. Keep in mind that monitoring IIS and ASP.NET can go hand in hand and many items are similar between both.<\/span><\/p>\n<h2><span style=\"color: #ff8c00; font-family: verdana,geneva,sans-serif;\">So, what exactly is ASP.NET? <\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">ASP.net is a web development platform available in Windows Server. It was built by Microsoft to allow web developers to create web applications that are mainly hosted using IIS. Using ASP.NET developers can create dynamic websites that take advantage of its libraries. By using a programming language such as C# or Visual Basic, the code written in these libraries can be invoked and used in web pages. ASP.net files have the .aspx extension.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">The following excerpt from <a href=\"http:\/\/www.microsoft.com\/web\/platform\/framework.aspx\" rel=\"nofollow\" target=\"_blank\">Microsoft\u2019s website<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a> best describes ASP.NET in a single phrase: <em>\u201cASP.net is a free, fully supported Web application framework that helps you create standards-based Web solutions. It provides a rich set of features and easy integration with databases, web services and rich internet applications. With features such as WebForms, MVC, dynamic data scaffolding, an AJAX framework, templates and themes, hundreds of built in controls and free developer tools, ASP.NET will enable you to build <\/em><em>Web apps better and faster.\u201d<\/em><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\"><a title=\"\" href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/www.png\" target=\"\" rel=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-514 alignleft\" style=\"margin: 0px 25px 15px 0px;\" title=\"\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/www-300x225.png\" alt=\"ASP.Net Building Web Applications\" width=\"300\" height=\"225\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/www-300x225.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/www.png 800w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a><\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">There are many tools that can help you check your Web application performance, but ASP.NET contains other performance counters that can be monitored.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">Also, this web application framework includes a tracing feature in which you can monitor your code and discover any errors related to the executed code.<\/span><\/p>\n<h2><span style=\"font-family: verdana,geneva,sans-serif;\">\u00a0<\/span><\/h2>\n<h2><span style=\"font-family: verdana,geneva,sans-serif;\">\u00a0<span style=\"color: #ff8c00;\">ASP.NET Performance Counters<\/span><\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">When you are monitoring your web applications, in addition to the normal IIS counters, you can also monitor the following performance counters available with ASP.NET:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\Application Restarts<\/strong> \u2013 this is a value that represents the total number of application restarts since the IIS server was last stopped.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\<\/strong><strong>Applications Running<\/strong> \u2013 the total number of ASP.NET applications that are currently running on the web server.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\<\/strong><strong>Request Execution Time<\/strong> \u2013 measures the number of milliseconds taken to execute a request. This counter is important in understanding how your application serves requests. This counter should be monitored carefully because it may indicate that either your app\u2019s code is not efficient or there is a slow performance on your web server which impacts the overall performance of your ASP.NET applications.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\<\/strong><strong>Requests Rejected<\/strong> \u2013 indicates the total number of rejected applications.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\Requests Queued<\/strong> \u2013 the total number of ASP.NET requests that are waiting to be executed.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\<\/strong><strong>Requests Current<\/strong> \u2013 this is the number of requests that are currently managed by the ASP.NET ISAPI. This performance counter will let the application accept requests until the maximum threshold limit is reached. This counter is very helpful in monitoring the total number of requests that impact your application. Any value that is above the number defined in the requestQueueLimit\u00a0parameter (configured in the processModel) will stop the application from accepting new requests.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET\\Worker Process Restarts<\/strong> \u2013 this parameter counts the number of times a certain worker process was restarted. Remember that a worker process is instantiated within an application pool and it\u2019s responsible for executing active requests. It is recommended that each web app should have a separate application pool with at least one worker process.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET Applications\\Requests\/Sec<\/strong> \u2013 this value represents the number of ASP.NET requests per second<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>ASP.NET Applications\\Errors Total<\/strong> \u2013 the total number of ASP.NET errors<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #ff8c00; font-family: verdana,geneva,sans-serif;\">Preferred Performance Counters<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\"><a title=\"\" href=\"http:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/too-many-performance-counters1.png\" target=\"\" rel=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-516 alignright\" style=\"margin-right: 0px; margin-left: 15px;\" title=\"\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/too-many-performance-counters1-300x220.png\" alt=\"Too Many Performance Counters\" width=\"300\" height=\"220\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/too-many-performance-counters1-300x220.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2013\/08\/too-many-performance-counters1.png 500w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a>There are so many ASP.NET performance counters that it is hard to find the best combination of perf counters to be monitored, while not impacting your server\u2019s performance or creating a huge list that cannot be monitored by system administrators.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">Most technical sources suggest the following performance counters should be monitored with all ASP.NET applications:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Microsoft\u00ae .NET CLR Exceptions\\# Exceps thrown \/ sec<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Memory\\Available Mbytes<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Processor(_Total)\\% Processor Time<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Process(aspnet_wp)\\% Processor Time<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Process(aspnet_wp)\\Private Bytes<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Process(aspnet_wp)\\Virtual Bytes<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Process(aspnet_wp)\\Handle Count<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Web Service\\Current Connections<\/strong><\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Web Service\\ISAPI Extension Requests\/sec<\/strong><\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">We have already gone over some of these performance counters in the <a href=\"http:\/\/www.poweradmin.com\/blog\/how-to-monitor-iis\/\">last article<\/a>, so now let\u2019s focus on some of the new items shown here.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>The Microsoft\u00ae .NET CLR Exceptions\\# Exceps thrown \/sec<\/strong> \u2013 this counter measures the number of exceptions thrown by your ASP.NET applications. In normal behavior web apps should not throw these exceptions, so keeping an eye on this counter should alert of any abnormal application performance. As the number of thrown exceptions increases, the application\u2019s performance decreases. Your monitoring tool must be configured to alert administrators if this value is more than 5% of the number of requests per second.<\/span><\/p>\n<h2><span style=\"color: #ff8c00; font-family: verdana,geneva,sans-serif;\">Even More Performance Counters!<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">There are many counters we will not get into, however these are the counters that have a great impact on application performance. Besides ASP.NET counters and application counters, there are others that should be monitored carefully because they indicate the overall resource utilization on your web server:<\/span><\/p>\n<ul>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Processor counter \u2013<\/strong> <strong>%Processor Time%<\/strong> \u2013 this counter indicates the percentage of time threads are using system processors. The maximum threshold for this counter is 70%; any value above this limit indicates that either your applications are not performing well or your hardware components should be upgraded. Remember that this counter measures the performance of all processes running on the IIS server.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Memory counter<\/strong> \u2013 <strong>Available Mbytes<\/strong> \u2013 this counter measures the amount of physical RAM available. If there is less than 20% free of the physical memory, consider replacing some hardware components.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Process Counters<\/strong> \u2013 these are counters that measure the performance of a single process<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>%Processor Time% \u2013 <\/strong>this is the percentage of CPU resources that a single process is using.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Private Bytes \u2013 <\/strong>committed memory used by a process. An abnormal value can indicate memory leaking. Each worker process is instantiated within a process, so monitor these counters carefully. If the physical memory used by a process is more than 60% and the virtual memory is close to 1.6 GB of a virtual address space of 4 GB, it will start affecting your server\u2019s performance.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Thread Count \u2013 <\/strong>this indicates the number of threads active in a process.<\/span><\/li>\n<li><span style=\"font-family: verdana,geneva,sans-serif;\"><strong>Handle Count \u2013 <\/strong>the number of handles in a process. This should be under 10000.<\/span><\/li>\n<\/ul>\n<h2><span style=\"color: #ff8c00; font-family: verdana,geneva,sans-serif;\">Any Suggestions for Other Counters to Monitor for ASP.NET?<\/span><\/h2>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">This should cover most of the important aspects of monitoring ASP.NET. Remember, there are an incredible amount of counters that can be monitored. We hope to have covered the most crucial ones here. However, if you feel there are any we left out that could be very important to others, please feel free to post your thoughts below in our comments section.<\/span><\/p>\n<p><span style=\"font-family: verdana,geneva,sans-serif;\">Thanks, and stay tuned for our last of this 3 part series, regarding monitoring SQL Server. Cheers!<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last week we talked about how to monitor IIS. Today we\u2019re going to discuss monitoring ASP.NET. We\u2019ll cover a number of things including: the main implications of monitoring ASP.net, the most important performance counters to look for, performance counter values that should be measured and services dependent on ASP.net that should be monitored. If you [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":510,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5,6,9,8],"tags":[],"class_list":["post-509","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-general-it","category-how-to","category-tech","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/509","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=509"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions"}],"predecessor-version":[{"id":3584,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/509\/revisions\/3584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/510"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}