Here
is a list of performance counters, which you can use with Windows Azure Web
Role:
// .NET @"\ASP.NET @"\ASP.NET @"\ASP.NET @"\ASP.NET @"\ASP.NET @"\ASP.NET // Latest @"\ASP.NET @"\ASP.NET @"\ASP.NET\Requests @"\ASP.NET\Requests @"\ASP.NET\Request @"\ASP.NET\Requests @"\ASP.NET v4.0.30319\Requests @"\ASP.NET v4.0.30319\Request Wait @"\ASP.NET v4.0.30319\Requests @"\ASP.NET v4.0.30319\Requests @"\Processor(_Total)\% Processor @"\Memory\Available MBytes @"\Memory\Committed Bytes" @"\TCPv4\Connections @"\TCPv4\Segments Sent/sec" @""\TCPv4\Connection @""\TCPv4\Connections @"\Network Interface(Microsoft @"\Network Interface(Microsoft @"\Network Interface(Microsoft
@"\Network @"\Network @"\.NET CLR Memory(_Global_)\% |
You
can define "AddAzurePerformanceCounter" class in your Web Role as below:
public class AddAzurePerformanceCounter { private IList<PerformanceCounterConfiguration> _perfCounters; public AddAzurePerformanceCounter (IList<PerformanceCounterConfiguration> { _perfCounters = counterCollection; } public void AddPerformanceCounter(string counterName, int { PerformanceCounterConfiguration perfCounter = new PerformanceCounterConfiguration(); perfCounter.CounterSpecifier perfCounter.SampleRate _perfCounters.Add(perfCounter); } } |
Add Performance Counters as
Below:
AddAzurePerformanceCounter counters = new AddAzurePerformanceCounter(diagConfig.PerformanceCounters.DataSources); counters.AddPerformanceCounter(@"\Processor(_Total)\% counters.AddPerformanceCounter(@"\Memory\Available counters.AddPerformanceCounter(@"\ASP.NET counters.AddPerformanceCounter(@"\TCPv4\Connections counters.AddPerformanceCounter(@"\TCPv4\Segments counters.AddPerformanceCounter(@"\Network counters.AddPerformanceCounter(@"\Network counters.AddPerformanceCounter(@"\Network counters.AddPerformanceCounter(@"\.NET counters.AddPerformanceCounter(@"\ASP.NET |
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.