Avkash Chauhan's Blog

Windows Azure, Windows 8, Cloud Computing, Big Data and Hadoop: All together at one place.. One problem, One solution at One time...

List of Performance Counters for Windows Azure Web roles

List of Performance Counters for Windows Azure Web roles

Rate This
  • Comments 4

Here is a list of performance counters, which you can use with Windows Azure Web Role:

 

// .NET 3.5 counters

@"\ASP.NET Apps v2.0.50727(__Total__)\Requests Total"

@"\ASP.NET Apps v2.0.50727(__Total__)\Requests/Sec"

@"\ASP.NET v2.0.50727\Requests Queued"

@"\ASP.NET v2.0.50727\Requests Rejected"

@"\ASP.NET v2.0.50727\Request Execution Time"

@"\ASP.NET v2.0.50727\Requests Queued"


// Latest .NET Counters (4.0)

@"\ASP.NET Applications(__Total__)\Requests Total"

@"\ASP.NET Applications(__Total__)\Requests/Sec"

@"\ASP.NET\Requests Queued"

@"\ASP.NET\Requests Rejected"

@"\ASP.NET\Request Execution Time"

@"\ASP.NET\Requests Disconnected"


@"\ASP.NET v4.0.30319\Requests Current"

@"\ASP.NET v4.0.30319\Request Wait Time"

@"\ASP.NET v4.0.30319\Requests Queued"

@"\ASP.NET v4.0.30319\Requests Rejected"



@"\Processor(_Total)\% Processor Time"

@"\Memory\Available MBytes

@"\Memory\Committed Bytes"


@"\TCPv4\Connections Established"

@"\TCPv4\Segments Sent/sec"

@""\TCPv4\Connection Failures"

@""\TCPv4\Connections Reset"


@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Received/sec"

@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Sent/sec"

@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Total/sec"

@"\Network Interface(*)\Bytes Received/sec"

@"\Network Interface(*)\Bytes Sent/sec"


@"\.NET CLR Memory(_Global_)\% Time in GC"

 


You can define "AddAzurePerformanceCounter" class in your Web Role as below:


 


public class AddAzurePerformanceCounter

{

private IList<PerformanceCounterConfiguration> _perfCounters;

       public AddAzurePerformanceCounter (IList<PerformanceCounterConfiguration> counterCollection)

      {

       _perfCounters = counterCollection;

      }


      public void AddPerformanceCounter(string counterName, int minuteInterval)

      {

      PerformanceCounterConfiguration perfCounter = new PerformanceCounterConfiguration();

      perfCounter.CounterSpecifier =counterName;

      perfCounter.SampleRate = System.TimeSpan.FromMinutes(minuteInterval);

      _perfCounters.Add(perfCounter);

      }

}


Add Performance Counters as Below:


AddAzurePerformanceCounter counters = new AddAzurePerformanceCounter(diagConfig.PerformanceCounters.DataSources);


counters.AddPerformanceCounter(@"\Processor(_Total)\% Processor Time", 5);

counters.AddPerformanceCounter(@"\Memory\Available MBytes", 5);

counters.AddPerformanceCounter(@"\ASP.NET v4.0.30319\Requests Current", 5);

counters.AddPerformanceCounter(@"\TCPv4\Connections Established", 5);

counters.AddPerformanceCounter(@"\TCPv4\Segments Sent/sec", 5);

counters.AddPerformanceCounter(@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Received/sec", 5);

counters.AddPerformanceCounter(@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Sent/sec", 5);

counters.AddPerformanceCounter(@"\Network Interface(Microsoft Virtual Machine Bus Network Adapter _2)\Bytes Total/sec", 5);

counters.AddPerformanceCounter(@"\.NET CLR Memory(_Global_)\% Time in GC", 5);

counters.AddPerformanceCounter(@"\ASP.NET Applications(__Total__)\Requests/Sec", 5);





 

Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post
  • Can this be used same for VM Role?

  • Yes.

  • is this true for worker role as well? ( not sure if VM role is same as worker role).

  • @harsh - Web and Worker Roles running nearly identical VM images, so the approach should be fine, but on Worker Role IIS is not running by default so the ASP.NET perf counters won't do much for you.

Page 1 of 1 (4 items)