Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3215648
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:12:08+00:00 2026-05-17T15:12:08+00:00

I am trying to capture the following PerformanceCounters on the Azure WebRole: private string[]

  • 0

I am trying to capture the following PerformanceCounters on the Azure WebRole:

private string[] perfCounters = { @"\Processor(_Total)\% Processor Time", 
                                @"\ASP.NET Applications(__Total__)\Requests/Sec", 
                                @"\Memory\Available Bytes", 
                                @"\ASP.NET\Request Execution Time", 
                                @"\ASP.NET\Requests Queued"};

I have in my WebRole.cs the following code to enable capturing of these perf counters as this:

    DiagnosticMonitorConfiguration config = DiagnosticMonitor.GetDefaultInitialConfiguration();

    int loggingInterval = Int32.Parse(RoleEnvironment.GetConfigurationSettingValue("loggingInterval"));
    config.Logs.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(loggingInterval);

    foreach (String s in perCounters)
    {
      PerformanceCounterConfiguration procTimeConfig = new PerformanceCounterConfiguration();
      procTimeConfig.CounterSpecifier = s;
      procTimeConfig.SampleRate = System.TimeSpan.FromMinutes(1.0);
      config.PerformanceCounters.DataSources.Add(procTimeConfig);
    }
    config.PerformanceCounters.ScheduledTransferPeriod = System.TimeSpan.FromMinutes(1.0);
    DiagnosticMonitor.Start("DiagnosticsConnectionString", config);

As you see, I am setting the scheduled xfer period of perf counters to 1 min.

Now, I am able to get these counters in the WADPerformanceCounters table on my dev fabric, but I am not able to get them on the azure cloud? Can anyone point out what could I be doing wrong here?

Kapil

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:12:08+00:00Added an answer on May 17, 2026 at 3:12 pm

    The problem supposedly was not at the places I was looking at. The fix for this was pretty simple, I deleted the pre-existing deployment and uploaded my cspkg file as a fresh deployment. It seems that th perf counters are picked up based on an xml file under the wad-control-container blob. This xml file is made for each deployment. I realized that the xml file was not getting updated in my case, and when I deleted the deployment and created a new deployment, it was taking the fresh value.

    Thanks
    Kapil

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to capture from the following string: var MyCode = jdgsrtjd; var ProductId
I'm trying to capture shift + tab in c# using the following cpp syntax:
I'm trying to find a way to capture the response of ASP templates for
i am trying to capture the text in the inverted commas in the following
I am trying to capture the following content in PHP using regular expressions: /*
I am trying to capture the first string from a list using an explicit
I am trying to capture screenshots using the BitBlt function. However, every single time
I am trying to capture output from an install script (that uses scp) and
I have an application in which I'm trying to capture the shift key modifier
I'm trying to do an image capture on a high end Nokia phone (N95).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.