A day with .Net

My day to day experince in .net

Windows Azure Performance Counter Logs

Posted by vivekcek on April 11, 2012

The Following code in the OnStart() method of WebRole.cs can be used to transfer Performance Counter Logs.

 public override bool OnStart()
            var config = DiagnosticMonitor.GetDefaultInitialConfiguration();

                new PerformanceCounterConfiguration()
                        CounterSpecifier = @"\Processor(_Total)\% Processor Time",
                        SampleRate = TimeSpan.FromSeconds(5.0)

            config.PerformanceCounters.BufferQuotaInMB = 200;
            config.PerformanceCounters.ScheduledTransferPeriod = TimeSpan.FromMinutes(1.0);
            DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config);
            return base.OnStart();


Performance counter log is stored in azure table “WADPerformanceCountersTable”

To view various performance counters in your system go to server explorer and expand your system name.

Processor Time Counter.

Some Performance Counters are:

Processor utilization : Processor\% Processor Time\_Total

Memory utilization: Memory\Available MBytes

Disk Utilization : PhysicalDisk\Bytes/sec\_Total

Network Utilization : Network Interface\Bytes Total/Sec\nic name


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s